/* pieRenderer.c generated by valac 0.56.18, the Vala compiler
 * generated from pieRenderer.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 <gee.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_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;
typedef struct _GnomePiePieRendererPrivate GnomePiePieRendererPrivate;
typedef enum  {
	GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_FULL_PIE,
	GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_LEFT,
	GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_RIGHT,
	GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_TOP,
	GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_BOTTOM,
	GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_LEFT,
	GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_RIGHT,
	GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_LEFT,
	GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_RIGHT
} GnomePiePieRendererShowPieMode;

#define GNOME_PIE_PIE_RENDERER_TYPE_SHOW_PIE_MODE (gnome_pie_pie_renderer_show_pie_mode_get_type ())

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

#define GNOME_PIE_TYPE_CENTER_RENDERER (gnome_pie_center_renderer_get_type ())
#define GNOME_PIE_CENTER_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_CENTER_RENDERER, GnomePieCenterRenderer))
#define GNOME_PIE_CENTER_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_CENTER_RENDERER, GnomePieCenterRendererClass))
#define GNOME_PIE_IS_CENTER_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_CENTER_RENDERER))
#define GNOME_PIE_IS_CENTER_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_CENTER_RENDERER))
#define GNOME_PIE_CENTER_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_CENTER_RENDERER, GnomePieCenterRendererClass))

typedef struct _GnomePieCenterRenderer GnomePieCenterRenderer;
typedef struct _GnomePieCenterRendererClass GnomePieCenterRendererClass;
enum  {
	GNOME_PIE_PIE_RENDERER_0_PROPERTY,
	GNOME_PIE_PIE_RENDERER_QUICKACTION_PROPERTY,
	GNOME_PIE_PIE_RENDERER_ACTIVE_SLICE_PROPERTY,
	GNOME_PIE_PIE_RENDERER_SHOW_HOTKEYS_PROPERTY,
	GNOME_PIE_PIE_RENDERER_SIZE_W_PROPERTY,
	GNOME_PIE_PIE_RENDERER_SIZE_H_PROPERTY,
	GNOME_PIE_PIE_RENDERER_CENTER_X_PROPERTY,
	GNOME_PIE_PIE_RENDERER_CENTER_Y_PROPERTY,
	GNOME_PIE_PIE_RENDERER_PIE_SHOW_MODE_PROPERTY,
	GNOME_PIE_PIE_RENDERER_VISIBLE_SLICE_COUNT_PROPERTY,
	GNOME_PIE_PIE_RENDERER_ORIGINAL_VISIBLE_SLICE_COUNT_PROPERTY,
	GNOME_PIE_PIE_RENDERER_TOTAL_SLICE_COUNT_PROPERTY,
	GNOME_PIE_PIE_RENDERER_MAX_VISIBLE_SLICES_PROPERTY,
	GNOME_PIE_PIE_RENDERER_FIRST_SLICE_IDX_PROPERTY,
	GNOME_PIE_PIE_RENDERER_FIRST_SLICE_ANGLE_PROPERTY,
	GNOME_PIE_PIE_RENDERER_UP_SLICE_IDX_PROPERTY,
	GNOME_PIE_PIE_RENDERER_DOWN_SLICE_IDX_PROPERTY,
	GNOME_PIE_PIE_RENDERER_LEFT_SLICE_IDX_PROPERTY,
	GNOME_PIE_PIE_RENDERER_RIGHT_SLICE_IDX_PROPERTY,
	GNOME_PIE_PIE_RENDERER_ID_PROPERTY,
	GNOME_PIE_PIE_RENDERER_KEY_BOARD_CONTROL_PROPERTY,
	GNOME_PIE_PIE_RENDERER_NUM_PROPERTIES
};
static GParamSpec* gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#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_PIE (gnome_pie_pie_get_type ())
#define GNOME_PIE_PIE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_PIE, GnomePiePie))
#define GNOME_PIE_PIE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_PIE, GnomePiePieClass))
#define GNOME_PIE_IS_PIE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_PIE))
#define GNOME_PIE_IS_PIE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_PIE))
#define GNOME_PIE_PIE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_PIE, GnomePiePieClass))

typedef struct _GnomePiePie GnomePiePie;
typedef struct _GnomePiePieClass GnomePiePieClass;

#define GNOME_PIE_TYPE_ACTION_GROUP (gnome_pie_action_group_get_type ())
#define GNOME_PIE_ACTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_ACTION_GROUP, GnomePieActionGroup))
#define GNOME_PIE_ACTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_ACTION_GROUP, GnomePieActionGroupClass))
#define GNOME_PIE_IS_ACTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_ACTION_GROUP))
#define GNOME_PIE_IS_ACTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_ACTION_GROUP))
#define GNOME_PIE_ACTION_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_ACTION_GROUP, GnomePieActionGroupClass))

typedef struct _GnomePieActionGroup GnomePieActionGroup;
typedef struct _GnomePieActionGroupClass GnomePieActionGroupClass;

#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_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 struct _GnomePieSliceRendererPrivate GnomePieSliceRendererPrivate;

struct _GnomePiePieRenderer {
	GObject parent_instance;
	GnomePiePieRendererPrivate * priv;
};

struct _GnomePiePieRendererClass {
	GObjectClass parent_class;
};

struct _GnomePiePieRendererPrivate {
	gint _quickaction;
	gint _active_slice;
	gboolean _show_hotkeys;
	gint _size_w;
	gint _size_h;
	gint _center_x;
	gint _center_y;
	GnomePiePieRendererShowPieMode _pie_show_mode;
	gint _visible_slice_count;
	gint _original_visible_slice_count;
	gint _total_slice_count;
	gint _max_visible_slices;
	gint _first_slice_idx;
	gdouble _first_slice_angle;
	gint _up_slice_idx;
	gint _down_slice_idx;
	gint _left_slice_idx;
	gint _right_slice_idx;
	gchar* _id;
	gboolean _key_board_control;
	GeeArrayList* slices;
	GnomePieCenterRenderer* center;
	gint activation_range;
};

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

struct _GnomePieSliceRendererClass {
	GObjectClass parent_class;
};

static gint GnomePiePieRenderer_private_offset;
static gpointer gnome_pie_pie_renderer_parent_class = NULL;

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_pie_renderer_show_pie_mode_get_type (void) G_GNUC_CONST ;
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_center_renderer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieCenterRenderer, g_object_unref)
VALA_EXTERN GnomePiePieRenderer* gnome_pie_pie_renderer_new (void);
VALA_EXTERN GnomePiePieRenderer* gnome_pie_pie_renderer_construct (GType object_type);
VALA_EXTERN GnomePieCenterRenderer* gnome_pie_center_renderer_new (GnomePiePieRenderer* parent);
VALA_EXTERN GnomePieCenterRenderer* gnome_pie_center_renderer_construct (GType object_type,
                                                             GnomePiePieRenderer* parent);
static void gnome_pie_pie_renderer_set_quickaction (GnomePiePieRenderer* self,
                                             gint value);
static void gnome_pie_pie_renderer_set_active_slice (GnomePiePieRenderer* self,
                                              gint value);
static void gnome_pie_pie_renderer_set_size_w (GnomePiePieRenderer* self,
                                        gint value);
static void gnome_pie_pie_renderer_set_size_h (GnomePiePieRenderer* self,
                                        gint value);
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 gint gnome_pie_config_get_max_visible_slices (GnomePieConfig* self);
static void gnome_pie_pie_renderer_set_max_visible_slices (GnomePiePieRenderer* self,
                                                    gint value);
static void gnome_pie_pie_renderer_set_show_mode (GnomePiePieRenderer* self,
                                           GnomePiePieRendererShowPieMode show_mode);
VALA_EXTERN GType gnome_pie_pie_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePiePie, g_object_unref)
VALA_EXTERN void gnome_pie_pie_renderer_load_pie (GnomePiePieRenderer* self,
                                      GnomePiePie* pie);
VALA_EXTERN const gchar* gnome_pie_pie_get_id (GnomePiePie* self);
static void gnome_pie_pie_renderer_set_id (GnomePiePieRenderer* self,
                                    const gchar* value);
VALA_EXTERN GType gnome_pie_action_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieActionGroup, g_object_unref)
VALA_EXTERN GeeArrayList* gnome_pie_pie_get_action_groups (GnomePiePie* self);
VALA_EXTERN GType gnome_pie_action_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieAction, g_object_unref)
VALA_EXTERN GeeArrayList* gnome_pie_action_group_get_actions (GnomePieActionGroup* self);
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_load (GnomePieSliceRenderer* self,
                                    GnomePieAction* action,
                                    gint position);
VALA_EXTERN gboolean gnome_pie_action_get_is_quickaction (GnomePieAction* self);
VALA_EXTERN void gnome_pie_pie_renderer_select_by_index (GnomePiePieRenderer* self,
                                             gint index);
VALA_EXTERN gint gnome_pie_pie_renderer_get_quickaction (GnomePiePieRenderer* self);
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_radius (GnomePieTheme* self);
VALA_EXTERN gdouble gnome_pie_theme_get_visible_slice_radius (GnomePieTheme* self);
VALA_EXTERN gdouble gnome_pie_theme_get_max_zoom (GnomePieTheme* self);
VALA_EXTERN gdouble gnome_pie_theme_get_center_radius (GnomePieTheme* self);
VALA_EXTERN gint gnome_pie_pie_renderer_get_total_slice_count (GnomePiePieRenderer* self);
VALA_EXTERN gdouble gnome_pie_theme_get_slice_radius (GnomePieTheme* self);
VALA_EXTERN gdouble gnome_pie_theme_get_slice_gap (GnomePieTheme* self);
VALA_EXTERN gboolean gnome_pie_pie_manager_get_is_auto_shape (const gchar* id);
VALA_EXTERN gboolean gnome_pie_pie_manager_get_is_centered (const gchar* id);
VALA_EXTERN gint gnome_pie_pie_manager_get_shape_number (const gchar* id);
VALA_EXTERN gint gnome_pie_config_get_activation_range (GnomePieConfig* self);
VALA_EXTERN GnomePiePieRendererShowPieMode gnome_pie_pie_renderer_get_pie_show_mode (GnomePiePieRenderer* self);
static void gnome_pie_pie_renderer_set_center_x (GnomePiePieRenderer* self,
                                          gint value);
VALA_EXTERN gint gnome_pie_pie_renderer_get_size_w (GnomePiePieRenderer* self);
static void gnome_pie_pie_renderer_set_center_y (GnomePiePieRenderer* self,
                                          gint value);
VALA_EXTERN gint gnome_pie_pie_renderer_get_size_h (GnomePiePieRenderer* self);
VALA_EXTERN void gnome_pie_pie_renderer_activate (GnomePiePieRenderer* self,
                                      guint32 time_stamp,
                                      gboolean fade_out);
VALA_EXTERN gint gnome_pie_pie_renderer_get_active_slice (GnomePiePieRenderer* self);
VALA_EXTERN gint gnome_pie_pie_renderer_get_first_slice_idx (GnomePiePieRenderer* self);
VALA_EXTERN gint gnome_pie_pie_renderer_get_visible_slice_count (GnomePiePieRenderer* self);
VALA_EXTERN void gnome_pie_slice_renderer_activate (GnomePieSliceRenderer* self,
                                        guint32 time_stamp);
VALA_EXTERN void gnome_pie_slice_renderer_fade_out (GnomePieSliceRenderer* self);
VALA_EXTERN void gnome_pie_center_renderer_fade_out (GnomePieCenterRenderer* self);
VALA_EXTERN void gnome_pie_pie_renderer_cancel (GnomePiePieRenderer* self);
VALA_EXTERN void gnome_pie_pie_renderer_select_up (GnomePiePieRenderer* self);
static void gnome_pie_pie_renderer_move_active_slice (GnomePiePieRenderer* self,
                                               gint extreme,
                                               gint other_extreme);
VALA_EXTERN gint gnome_pie_pie_renderer_get_up_slice_idx (GnomePiePieRenderer* self);
VALA_EXTERN gint gnome_pie_pie_renderer_get_down_slice_idx (GnomePiePieRenderer* self);
VALA_EXTERN void gnome_pie_pie_renderer_select_down (GnomePiePieRenderer* self);
VALA_EXTERN void gnome_pie_pie_renderer_select_left (GnomePiePieRenderer* self);
VALA_EXTERN gint gnome_pie_pie_renderer_get_left_slice_idx (GnomePiePieRenderer* self);
VALA_EXTERN gint gnome_pie_pie_renderer_get_right_slice_idx (GnomePiePieRenderer* self);
VALA_EXTERN void gnome_pie_pie_renderer_select_right (GnomePiePieRenderer* self);
VALA_EXTERN void gnome_pie_pie_renderer_select_nextpage (GnomePiePieRenderer* self);
static void gnome_pie_pie_renderer_set_first_slice_idx (GnomePiePieRenderer* self,
                                                 gint value);
static void gnome_pie_pie_renderer_set_visible_slice_count (GnomePiePieRenderer* self,
                                                     gint value);
static void gnome_pie_pie_renderer_reset_slice_anim (GnomePiePieRenderer* self);
static void gnome_pie_pie_renderer_calc_key_navigation_pos (GnomePiePieRenderer* self);
VALA_EXTERN void gnome_pie_pie_renderer_set_key_board_control (GnomePiePieRenderer* self,
                                                   gboolean value);
VALA_EXTERN gint gnome_pie_pie_renderer_get_original_visible_slice_count (GnomePiePieRenderer* self);
VALA_EXTERN void gnome_pie_pie_renderer_select_prevpage (GnomePiePieRenderer* self);
VALA_EXTERN void gnome_pie_slice_renderer_reset_anim (GnomePieSliceRenderer* self);
VALA_EXTERN void gnome_pie_pie_renderer_select_by_string (GnomePiePieRenderer* self,
                                              const gchar* search);
VALA_EXTERN const gchar* gnome_pie_action_get_name (GnomePieAction* self);
VALA_EXTERN gint gnome_pie_pie_renderer_slice_count (GnomePiePieRenderer* self);
VALA_EXTERN void gnome_pie_pie_renderer_draw (GnomePiePieRenderer* self,
                                  gdouble frame_time,
                                  cairo_t* ctx,
                                  gint mouse_x,
                                  gint mouse_y);
VALA_EXTERN gboolean gnome_pie_pie_renderer_get_key_board_control (GnomePiePieRenderer* self);
VALA_EXTERN gdouble gnome_pie_pie_renderer_get_first_slice_angle (GnomePiePieRenderer* self);
VALA_EXTERN gdouble gnome_pie_theme_get_active_radius (GnomePieTheme* self);
VALA_EXTERN void gnome_pie_center_renderer_draw (GnomePieCenterRenderer* self,
                                     gdouble frame_time,
                                     cairo_t* ctx,
                                     gdouble angle,
                                     gint slice_track);
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_pie_renderer_on_mouse_move (GnomePiePieRenderer* self);
VALA_EXTERN void gnome_pie_center_renderer_set_active_slice (GnomePieCenterRenderer* self,
                                                 GnomePieSliceRenderer* active_slice);
VALA_EXTERN void gnome_pie_slice_renderer_set_active_slice (GnomePieSliceRenderer* self,
                                                GnomePieSliceRenderer* active_slice);
static void gnome_pie_pie_renderer_set_first_slice_angle (GnomePiePieRenderer* self,
                                                   gdouble value);
static void gnome_pie_pie_renderer_set_pie_show_mode (GnomePiePieRenderer* self,
                                               GnomePiePieRendererShowPieMode value);
VALA_EXTERN gint gnome_pie_pie_renderer_get_max_visible_slices (GnomePiePieRenderer* self);
static void gnome_pie_pie_renderer_set_total_slice_count (GnomePiePieRenderer* self,
                                                   gint value);
static void gnome_pie_pie_renderer_set_original_visible_slice_count (GnomePiePieRenderer* self,
                                                              gint value);
static void gnome_pie_pie_renderer_set_up_slice_idx (GnomePiePieRenderer* self,
                                              gint value);
static void gnome_pie_pie_renderer_set_right_slice_idx (GnomePiePieRenderer* self,
                                                 gint value);
static void gnome_pie_pie_renderer_set_down_slice_idx (GnomePiePieRenderer* self,
                                                gint value);
static void gnome_pie_pie_renderer_set_left_slice_idx (GnomePiePieRenderer* self,
                                                gint value);
VALA_EXTERN gboolean gnome_pie_pie_renderer_get_show_hotkeys (GnomePiePieRenderer* self);
VALA_EXTERN void gnome_pie_pie_renderer_set_show_hotkeys (GnomePiePieRenderer* self,
                                              gboolean value);
VALA_EXTERN gint gnome_pie_pie_renderer_get_center_x (GnomePiePieRenderer* self);
VALA_EXTERN gint gnome_pie_pie_renderer_get_center_y (GnomePiePieRenderer* self);
VALA_EXTERN const gchar* gnome_pie_pie_renderer_get_id (GnomePiePieRenderer* self);
static void gnome_pie_pie_renderer_finalize (GObject * obj);
static GType gnome_pie_pie_renderer_get_type_once (void);
static void _vala_gnome_pie_pie_renderer_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_gnome_pie_pie_renderer_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);

static inline gpointer
gnome_pie_pie_renderer_get_instance_private (GnomePiePieRenderer* self)
{
	return G_STRUCT_MEMBER_P (self, GnomePiePieRenderer_private_offset);
}

static GType
gnome_pie_pie_renderer_show_pie_mode_get_type_once (void)
{
	static const GEnumValue values[] = {{GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_FULL_PIE, "GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_FULL_PIE", "full-pie"}, {GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_LEFT, "GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_LEFT", "hpie-left"}, {GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_RIGHT, "GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_RIGHT", "hpie-right"}, {GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_TOP, "GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_TOP", "hpie-top"}, {GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_BOTTOM, "GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_BOTTOM", "hpie-bottom"}, {GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_LEFT, "GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_LEFT", "cpie-top-left"}, {GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_RIGHT, "GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_RIGHT", "cpie-top-right"}, {GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_LEFT, "GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_LEFT", "cpie-bot-left"}, {GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_RIGHT, "GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_RIGHT", "cpie-bot-right"}, {0, NULL, NULL}};
	GType gnome_pie_pie_renderer_show_pie_mode_type_id;
	gnome_pie_pie_renderer_show_pie_mode_type_id = g_enum_register_static ("GnomePiePieRendererShowPieMode", values);
	return gnome_pie_pie_renderer_show_pie_mode_type_id;
}

GType
gnome_pie_pie_renderer_show_pie_mode_get_type (void)
{
	static volatile gsize gnome_pie_pie_renderer_show_pie_mode_type_id__once = 0;
	if (g_once_init_enter (&gnome_pie_pie_renderer_show_pie_mode_type_id__once)) {
		GType gnome_pie_pie_renderer_show_pie_mode_type_id;
		gnome_pie_pie_renderer_show_pie_mode_type_id = gnome_pie_pie_renderer_show_pie_mode_get_type_once ();
		g_once_init_leave (&gnome_pie_pie_renderer_show_pie_mode_type_id__once, gnome_pie_pie_renderer_show_pie_mode_type_id);
	}
	return gnome_pie_pie_renderer_show_pie_mode_type_id__once;
}

GnomePiePieRenderer*
gnome_pie_pie_renderer_construct (GType object_type)
{
	GnomePiePieRenderer * self = NULL;
	GeeArrayList* _tmp0_;
	GnomePieCenterRenderer* _tmp1_;
	GnomePieConfig* _tmp2_;
	GnomePieConfig* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	self = (GnomePiePieRenderer*) g_object_new (object_type, NULL);
	_tmp0_ = gee_array_list_new (GNOME_PIE_TYPE_SLICE_RENDERER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->slices);
	self->priv->slices = _tmp0_;
	_tmp1_ = gnome_pie_center_renderer_new (self);
	_g_object_unref0 (self->priv->center);
	self->priv->center = _tmp1_;
	gnome_pie_pie_renderer_set_quickaction (self, -1);
	gnome_pie_pie_renderer_set_active_slice (self, -2);
	gnome_pie_pie_renderer_set_size_w (self, 0);
	gnome_pie_pie_renderer_set_size_h (self, 0);
	self->priv->activation_range = 300;
	_tmp2_ = gnome_pie_config_get_global ();
	_tmp3_ = _tmp2_;
	_tmp4_ = gnome_pie_config_get_max_visible_slices (_tmp3_);
	_tmp5_ = _tmp4_;
	gnome_pie_pie_renderer_set_max_visible_slices (self, _tmp5_);
	gnome_pie_pie_renderer_set_show_mode (self, GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_FULL_PIE);
	return self;
}

GnomePiePieRenderer*
gnome_pie_pie_renderer_new (void)
{
	return gnome_pie_pie_renderer_construct (GNOME_PIE_TYPE_PIE_RENDERER);
}

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

void
gnome_pie_pie_renderer_load_pie (GnomePiePieRenderer* self,
                                 GnomePiePie* pie)
{
	GeeArrayList* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gint count = 0;
	gint _tmp34_;
	GnomePiePieRendererShowPieMode showpie = 0;
	gint sz0 = 0;
	GnomePieConfig* _tmp35_;
	GnomePieConfig* _tmp36_;
	GnomePieTheme* _tmp37_;
	GnomePieTheme* _tmp38_;
	gdouble _tmp39_;
	gdouble _tmp40_;
	GnomePieConfig* _tmp41_;
	GnomePieConfig* _tmp42_;
	GnomePieTheme* _tmp43_;
	GnomePieTheme* _tmp44_;
	gdouble _tmp45_;
	gdouble _tmp46_;
	GnomePieConfig* _tmp47_;
	GnomePieConfig* _tmp48_;
	GnomePieTheme* _tmp49_;
	GnomePieTheme* _tmp50_;
	gdouble _tmp51_;
	gdouble _tmp52_;
	GnomePieConfig* _tmp53_;
	GnomePieConfig* _tmp54_;
	GnomePieTheme* _tmp55_;
	GnomePieTheme* _tmp56_;
	gdouble _tmp57_;
	gdouble _tmp58_;
	gint sz = 0;
	gint _tmp59_;
	gint mouse_x = 0;
	gint mouse_y = 0;
	GdkSeat* seat = NULL;
	GdkDisplay* _tmp85_;
	GdkSeat* _tmp86_;
	GdkSeat* _tmp87_;
	GdkSeat* _tmp88_;
	GdkDevice* _tmp89_;
	gint _tmp90_ = 0;
	gint _tmp91_ = 0;
	GdkRectangle monitor = {0};
	GdkDisplay* _tmp92_;
	GdkMonitor* _tmp93_;
	GdkRectangle _tmp94_ = {0};
	gint monitor_x = 0;
	GdkRectangle _tmp95_;
	gint monitor_y = 0;
	GdkRectangle _tmp96_;
	gint reduce_szx = 0;
	gint reduce_szy = 0;
	gboolean _tmp97_ = FALSE;
	const gchar* _tmp98_;
	const gchar* _tmp99_;
	gint _tmp111_;
	GnomePieConfig* _tmp137_;
	GnomePieConfig* _tmp138_;
	gint _tmp139_;
	gint _tmp140_;
	GnomePieConfig* _tmp141_;
	GnomePieConfig* _tmp142_;
	GnomePieTheme* _tmp143_;
	GnomePieTheme* _tmp144_;
	gdouble _tmp145_;
	gdouble _tmp146_;
	gint szx = 0;
	gint szy = 0;
	GnomePiePieRendererShowPieMode _tmp147_;
	gint rc = 0;
	GnomePieConfig* _tmp148_;
	GnomePieConfig* _tmp149_;
	GnomePieTheme* _tmp150_;
	GnomePieTheme* _tmp151_;
	gdouble _tmp152_;
	gdouble _tmp153_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (pie != NULL);
	_tmp0_ = self->priv->slices;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp0_);
	_tmp1_ = gnome_pie_pie_get_id (pie);
	_tmp2_ = _tmp1_;
	gnome_pie_pie_renderer_set_id (self, _tmp2_);
	count = 0;
	{
		GeeArrayList* _group_list = NULL;
		GeeArrayList* _tmp3_;
		GeeArrayList* _tmp4_;
		gint _group_size = 0;
		GeeArrayList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _group_index = 0;
		_tmp3_ = gnome_pie_pie_get_action_groups (pie);
		_tmp4_ = _tmp3_;
		_group_list = _tmp4_;
		_tmp5_ = _group_list;
		_tmp6_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_group_size = _tmp7_;
		_group_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			GnomePieActionGroup* group = NULL;
			GeeArrayList* _tmp10_;
			gpointer _tmp11_;
			_group_index = _group_index + 1;
			_tmp8_ = _group_index;
			_tmp9_ = _group_size;
			if (!(_tmp8_ < _tmp9_)) {
				break;
			}
			_tmp10_ = _group_list;
			_tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, _group_index);
			group = (GnomePieActionGroup*) _tmp11_;
			{
				GeeArrayList* _action_list = NULL;
				GnomePieActionGroup* _tmp12_;
				GeeArrayList* _tmp13_;
				GeeArrayList* _tmp14_;
				gint _action_size = 0;
				GeeArrayList* _tmp15_;
				gint _tmp16_;
				gint _tmp17_;
				gint _action_index = 0;
				_tmp12_ = group;
				_tmp13_ = gnome_pie_action_group_get_actions (_tmp12_);
				_tmp14_ = _tmp13_;
				_action_list = _tmp14_;
				_tmp15_ = _action_list;
				_tmp16_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp15_);
				_tmp17_ = _tmp16_;
				_action_size = _tmp17_;
				_action_index = -1;
				while (TRUE) {
					gint _tmp18_;
					gint _tmp19_;
					GnomePieAction* action = NULL;
					GeeArrayList* _tmp20_;
					gpointer _tmp21_;
					GnomePieSliceRenderer* renderer = NULL;
					GnomePieSliceRenderer* _tmp22_;
					GeeArrayList* _tmp23_;
					GnomePieSliceRenderer* _tmp24_;
					GnomePieSliceRenderer* _tmp25_;
					GnomePieAction* _tmp26_;
					GeeArrayList* _tmp27_;
					gint _tmp28_;
					gint _tmp29_;
					GnomePieAction* _tmp30_;
					gboolean _tmp31_;
					gboolean _tmp32_;
					gint _tmp33_;
					_action_index = _action_index + 1;
					_tmp18_ = _action_index;
					_tmp19_ = _action_size;
					if (!(_tmp18_ < _tmp19_)) {
						break;
					}
					_tmp20_ = _action_list;
					_tmp21_ = gee_abstract_list_get ((GeeAbstractList*) _tmp20_, _action_index);
					action = (GnomePieAction*) _tmp21_;
					_tmp22_ = gnome_pie_slice_renderer_new (self);
					renderer = _tmp22_;
					_tmp23_ = self->priv->slices;
					_tmp24_ = renderer;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp23_, _tmp24_);
					_tmp25_ = renderer;
					_tmp26_ = action;
					_tmp27_ = self->priv->slices;
					_tmp28_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp27_);
					_tmp29_ = _tmp28_;
					gnome_pie_slice_renderer_load (_tmp25_, _tmp26_, _tmp29_ - 1);
					_tmp30_ = action;
					_tmp31_ = gnome_pie_action_get_is_quickaction (_tmp30_);
					_tmp32_ = _tmp31_;
					if (_tmp32_) {
						gnome_pie_pie_renderer_set_quickaction (self, count);
					}
					count = count + 1;
					_tmp33_ = count;
					_g_object_unref0 (renderer);
					_g_object_unref0 (action);
				}
			}
			_g_object_unref0 (group);
		}
	}
	_tmp34_ = self->priv->_quickaction;
	gnome_pie_pie_renderer_select_by_index (self, _tmp34_);
	showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_FULL_PIE;
	gnome_pie_pie_renderer_set_show_mode (self, showpie);
	_tmp35_ = gnome_pie_config_get_global ();
	_tmp36_ = _tmp35_;
	_tmp37_ = gnome_pie_config_get_theme (_tmp36_);
	_tmp38_ = _tmp37_;
	_tmp39_ = gnome_pie_theme_get_radius (_tmp38_);
	_tmp40_ = _tmp39_;
	_tmp41_ = gnome_pie_config_get_global ();
	_tmp42_ = _tmp41_;
	_tmp43_ = gnome_pie_config_get_theme (_tmp42_);
	_tmp44_ = _tmp43_;
	_tmp45_ = gnome_pie_theme_get_visible_slice_radius (_tmp44_);
	_tmp46_ = _tmp45_;
	_tmp47_ = gnome_pie_config_get_global ();
	_tmp48_ = _tmp47_;
	_tmp49_ = gnome_pie_config_get_theme (_tmp48_);
	_tmp50_ = _tmp49_;
	_tmp51_ = gnome_pie_theme_get_max_zoom (_tmp50_);
	_tmp52_ = _tmp51_;
	_tmp53_ = gnome_pie_config_get_global ();
	_tmp54_ = _tmp53_;
	_tmp55_ = gnome_pie_config_get_theme (_tmp54_);
	_tmp56_ = _tmp55_;
	_tmp57_ = gnome_pie_theme_get_center_radius (_tmp56_);
	_tmp58_ = _tmp57_;
	sz0 = (gint) fmax ((2 * _tmp40_) + ((2 * _tmp46_) * _tmp52_), 2 * _tmp58_);
	sz = sz0;
	_tmp59_ = self->priv->_total_slice_count;
	if (_tmp59_ > 0) {
		GnomePieConfig* _tmp60_;
		GnomePieConfig* _tmp61_;
		GnomePieTheme* _tmp62_;
		GnomePieTheme* _tmp63_;
		gdouble _tmp64_;
		gdouble _tmp65_;
		GnomePieConfig* _tmp66_;
		GnomePieConfig* _tmp67_;
		GnomePieTheme* _tmp68_;
		GnomePieTheme* _tmp69_;
		gdouble _tmp70_;
		gdouble _tmp71_;
		gint _tmp72_;
		GnomePieConfig* _tmp73_;
		GnomePieConfig* _tmp74_;
		GnomePieTheme* _tmp75_;
		GnomePieTheme* _tmp76_;
		gdouble _tmp77_;
		gdouble _tmp78_;
		GnomePieConfig* _tmp79_;
		GnomePieConfig* _tmp80_;
		GnomePieTheme* _tmp81_;
		GnomePieTheme* _tmp82_;
		gdouble _tmp83_;
		gdouble _tmp84_;
		_tmp60_ = gnome_pie_config_get_global ();
		_tmp61_ = _tmp60_;
		_tmp62_ = gnome_pie_config_get_theme (_tmp61_);
		_tmp63_ = _tmp62_;
		_tmp64_ = gnome_pie_theme_get_slice_radius (_tmp63_);
		_tmp65_ = _tmp64_;
		_tmp66_ = gnome_pie_config_get_global ();
		_tmp67_ = _tmp66_;
		_tmp68_ = gnome_pie_config_get_theme (_tmp67_);
		_tmp69_ = _tmp68_;
		_tmp70_ = gnome_pie_theme_get_slice_gap (_tmp69_);
		_tmp71_ = _tmp70_;
		_tmp72_ = self->priv->_total_slice_count;
		_tmp73_ = gnome_pie_config_get_global ();
		_tmp74_ = _tmp73_;
		_tmp75_ = gnome_pie_config_get_theme (_tmp74_);
		_tmp76_ = _tmp75_;
		_tmp77_ = gnome_pie_theme_get_visible_slice_radius (_tmp76_);
		_tmp78_ = _tmp77_;
		_tmp79_ = gnome_pie_config_get_global ();
		_tmp80_ = _tmp79_;
		_tmp81_ = gnome_pie_config_get_theme (_tmp80_);
		_tmp82_ = _tmp81_;
		_tmp83_ = gnome_pie_theme_get_max_zoom (_tmp82_);
		_tmp84_ = _tmp83_;
		sz = (gint) fmax ((gdouble) sz0, ((((_tmp65_ + _tmp71_) / tan (G_PI / _tmp72_)) + _tmp78_) * 2) * _tmp84_);
	}
	_tmp85_ = gdk_display_get_default ();
	_tmp86_ = gdk_display_get_default_seat (_tmp85_);
	_tmp87_ = _g_object_ref0 (_tmp86_);
	seat = _tmp87_;
	_tmp88_ = seat;
	_tmp89_ = gdk_seat_get_pointer (_tmp88_);
	gdk_device_get_position (_tmp89_, NULL, &_tmp90_, &_tmp91_);
	mouse_x = _tmp90_;
	mouse_y = _tmp91_;
	_tmp92_ = gdk_display_get_default ();
	_tmp93_ = gdk_display_get_monitor_at_point (_tmp92_, mouse_x, mouse_y);
	gdk_monitor_get_geometry (_tmp93_, &_tmp94_);
	monitor = _tmp94_;
	_tmp95_ = monitor;
	monitor_x = _tmp95_.width;
	_tmp96_ = monitor;
	monitor_y = _tmp96_.height;
	reduce_szx = 1;
	reduce_szy = 1;
	_tmp98_ = gnome_pie_pie_get_id (pie);
	_tmp99_ = _tmp98_;
	if (gnome_pie_pie_manager_get_is_auto_shape (_tmp99_)) {
		const gchar* _tmp100_;
		const gchar* _tmp101_;
		_tmp100_ = gnome_pie_pie_get_id (pie);
		_tmp101_ = _tmp100_;
		_tmp97_ = !gnome_pie_pie_manager_get_is_centered (_tmp101_);
	} else {
		_tmp97_ = FALSE;
	}
	if (_tmp97_) {
		if (mouse_x < (sz / 2)) {
			if (mouse_y < (sz / 2)) {
				showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_LEFT;
			} else {
				gboolean _tmp102_ = FALSE;
				if (monitor_y > 0) {
					_tmp102_ = (monitor_y - mouse_y) < (sz / 2);
				} else {
					_tmp102_ = FALSE;
				}
				if (_tmp102_) {
					showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_LEFT;
				} else {
					showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_LEFT;
				}
			}
		} else {
			if (mouse_y < (sz / 2)) {
				gboolean _tmp103_ = FALSE;
				if (monitor_x > 0) {
					_tmp103_ = (monitor_x - mouse_x) < (sz / 2);
				} else {
					_tmp103_ = FALSE;
				}
				if (_tmp103_) {
					showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_RIGHT;
				} else {
					showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_TOP;
				}
			} else {
				gboolean _tmp104_ = FALSE;
				if (monitor_x > 0) {
					_tmp104_ = (monitor_x - mouse_x) < (sz / 2);
				} else {
					_tmp104_ = FALSE;
				}
				if (_tmp104_) {
					gboolean _tmp105_ = FALSE;
					if (monitor_y > 0) {
						_tmp105_ = (monitor_y - mouse_y) < (sz / 2);
					} else {
						_tmp105_ = FALSE;
					}
					if (_tmp105_) {
						showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_RIGHT;
					} else {
						showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_RIGHT;
					}
				} else {
					gboolean _tmp106_ = FALSE;
					if (monitor_y > 0) {
						_tmp106_ = (monitor_y - mouse_y) < (sz / 2);
					} else {
						_tmp106_ = FALSE;
					}
					if (_tmp106_) {
						showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_BOTTOM;
					}
				}
			}
		}
	} else {
		const gchar* _tmp107_;
		const gchar* _tmp108_;
		const gchar* _tmp109_;
		const gchar* _tmp110_;
		_tmp107_ = gnome_pie_pie_get_id (pie);
		_tmp108_ = _tmp107_;
		if (gnome_pie_pie_manager_get_is_centered (_tmp108_)) {
			reduce_szx = 0;
			reduce_szy = 0;
		}
		_tmp109_ = gnome_pie_pie_get_id (pie);
		_tmp110_ = _tmp109_;
		switch (gnome_pie_pie_manager_get_shape_number (_tmp110_)) {
			case 1:
			{
				showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_RIGHT;
				if ((monitor_x - mouse_x) > (sz / 2)) {
					reduce_szx = 0;
				}
				if ((monitor_y - mouse_y) > (sz / 2)) {
					reduce_szy = 0;
				}
				break;
			}
			case 2:
			{
				showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_RIGHT;
				if ((monitor_x - mouse_x) > (sz / 2)) {
					reduce_szx = 0;
				}
				break;
			}
			case 3:
			{
				showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_RIGHT;
				if ((monitor_x - mouse_x) > (sz / 2)) {
					reduce_szx = 0;
				}
				if (mouse_y > (sz / 2)) {
					reduce_szy = 0;
				}
				break;
			}
			case 4:
			{
				showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_BOTTOM;
				if ((monitor_y - mouse_y) > (sz / 2)) {
					reduce_szy = 0;
				}
				break;
			}
			case 6:
			{
				showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_TOP;
				if (mouse_y > (sz / 2)) {
					reduce_szy = 0;
				}
				break;
			}
			case 7:
			{
				showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_LEFT;
				if (mouse_x > (sz / 2)) {
					reduce_szx = 0;
				}
				if ((monitor_y - mouse_y) > (sz / 2)) {
					reduce_szy = 0;
				}
				break;
			}
			case 8:
			{
				showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_LEFT;
				if (mouse_x > (sz / 2)) {
					reduce_szx = 0;
				}
				break;
			}
			case 9:
			{
				showpie = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_LEFT;
				if (mouse_x > (sz / 2)) {
					reduce_szx = 0;
				}
				if (mouse_y > (sz / 2)) {
					reduce_szy = 0;
				}
				break;
			}
			default:
			break;
		}
	}
	gnome_pie_pie_renderer_set_show_mode (self, showpie);
	sz = sz0;
	_tmp111_ = self->priv->_total_slice_count;
	if (_tmp111_ > 0) {
		GnomePieConfig* _tmp112_;
		GnomePieConfig* _tmp113_;
		GnomePieTheme* _tmp114_;
		GnomePieTheme* _tmp115_;
		gdouble _tmp116_;
		gdouble _tmp117_;
		GnomePieConfig* _tmp118_;
		GnomePieConfig* _tmp119_;
		GnomePieTheme* _tmp120_;
		GnomePieTheme* _tmp121_;
		gdouble _tmp122_;
		gdouble _tmp123_;
		gint _tmp124_;
		GnomePieConfig* _tmp125_;
		GnomePieConfig* _tmp126_;
		GnomePieTheme* _tmp127_;
		GnomePieTheme* _tmp128_;
		gdouble _tmp129_;
		gdouble _tmp130_;
		GnomePieConfig* _tmp131_;
		GnomePieConfig* _tmp132_;
		GnomePieTheme* _tmp133_;
		GnomePieTheme* _tmp134_;
		gdouble _tmp135_;
		gdouble _tmp136_;
		_tmp112_ = gnome_pie_config_get_global ();
		_tmp113_ = _tmp112_;
		_tmp114_ = gnome_pie_config_get_theme (_tmp113_);
		_tmp115_ = _tmp114_;
		_tmp116_ = gnome_pie_theme_get_slice_radius (_tmp115_);
		_tmp117_ = _tmp116_;
		_tmp118_ = gnome_pie_config_get_global ();
		_tmp119_ = _tmp118_;
		_tmp120_ = gnome_pie_config_get_theme (_tmp119_);
		_tmp121_ = _tmp120_;
		_tmp122_ = gnome_pie_theme_get_slice_gap (_tmp121_);
		_tmp123_ = _tmp122_;
		_tmp124_ = self->priv->_total_slice_count;
		_tmp125_ = gnome_pie_config_get_global ();
		_tmp126_ = _tmp125_;
		_tmp127_ = gnome_pie_config_get_theme (_tmp126_);
		_tmp128_ = _tmp127_;
		_tmp129_ = gnome_pie_theme_get_visible_slice_radius (_tmp128_);
		_tmp130_ = _tmp129_;
		_tmp131_ = gnome_pie_config_get_global ();
		_tmp132_ = _tmp131_;
		_tmp133_ = gnome_pie_config_get_theme (_tmp132_);
		_tmp134_ = _tmp133_;
		_tmp135_ = gnome_pie_theme_get_max_zoom (_tmp134_);
		_tmp136_ = _tmp135_;
		sz = (gint) fmax ((gdouble) sz0, ((((_tmp117_ + _tmp123_) / tan (G_PI / _tmp124_)) + _tmp130_) * 2) * _tmp136_);
	}
	_tmp137_ = gnome_pie_config_get_global ();
	_tmp138_ = _tmp137_;
	_tmp139_ = gnome_pie_config_get_activation_range (_tmp138_);
	_tmp140_ = _tmp139_;
	_tmp141_ = gnome_pie_config_get_global ();
	_tmp142_ = _tmp141_;
	_tmp143_ = gnome_pie_config_get_theme (_tmp142_);
	_tmp144_ = _tmp143_;
	_tmp145_ = gnome_pie_theme_get_max_zoom (_tmp144_);
	_tmp146_ = _tmp145_;
	self->priv->activation_range = (gint) (((gdouble) _tmp140_) + (sz / (2 * _tmp146_)));
	szx = 1;
	szy = 1;
	_tmp147_ = self->priv->_pie_show_mode;
	switch (_tmp147_) {
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_LEFT:
		{
			szx = 0;
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_RIGHT:
		{
			szx = 2;
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_TOP:
		{
			szy = 0;
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_BOTTOM:
		{
			szy = 2;
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_LEFT:
		{
			szx = 0;
			szy = 0;
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_RIGHT:
		{
			szx = 2;
			szy = 0;
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_LEFT:
		{
			szx = 0;
			szy = 2;
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_RIGHT:
		{
			szx = 2;
			szy = 2;
			break;
		}
		default:
		{
			break;
		}
	}
	if (reduce_szx == 0) {
		szx = 1;
	}
	if (reduce_szy == 0) {
		szy = 1;
	}
	_tmp148_ = gnome_pie_config_get_global ();
	_tmp149_ = _tmp148_;
	_tmp150_ = gnome_pie_config_get_theme (_tmp149_);
	_tmp151_ = _tmp150_;
	_tmp152_ = gnome_pie_theme_get_center_radius (_tmp151_);
	_tmp153_ = _tmp152_;
	rc = (gint) _tmp153_;
	if (szx == 1) {
		gnome_pie_pie_renderer_set_size_w (self, sz);
		gnome_pie_pie_renderer_set_center_x (self, sz / 2);
	} else {
		gnome_pie_pie_renderer_set_size_w (self, (sz / 2) + rc);
		if (szx == 0) {
			gnome_pie_pie_renderer_set_center_x (self, rc);
		} else {
			gint _tmp154_;
			_tmp154_ = self->priv->_size_w;
			gnome_pie_pie_renderer_set_center_x (self, _tmp154_ - rc);
		}
	}
	if (szy == 1) {
		gnome_pie_pie_renderer_set_size_h (self, sz);
		gnome_pie_pie_renderer_set_center_y (self, sz / 2);
	} else {
		gnome_pie_pie_renderer_set_size_h (self, (sz / 2) + rc);
		if (szy == 0) {
			gnome_pie_pie_renderer_set_center_y (self, rc);
		} else {
			gint _tmp155_;
			_tmp155_ = self->priv->_size_h;
			gnome_pie_pie_renderer_set_center_y (self, _tmp155_ - rc);
		}
	}
	_g_object_unref0 (seat);
}

void
gnome_pie_pie_renderer_activate (GnomePiePieRenderer* self,
                                 guint32 time_stamp,
                                 gboolean fade_out)
{
	gboolean _tmp0_ = FALSE;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_active_slice;
	_tmp2_ = self->priv->_first_slice_idx;
	if (_tmp1_ >= _tmp2_) {
		gint _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		_tmp3_ = self->priv->_active_slice;
		_tmp4_ = self->priv->_first_slice_idx;
		_tmp5_ = self->priv->_visible_slice_count;
		_tmp0_ = _tmp3_ < (_tmp4_ + _tmp5_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GeeArrayList* _tmp6_;
		gint _tmp7_;
		gpointer _tmp8_;
		GnomePieSliceRenderer* _tmp9_;
		_tmp6_ = self->priv->slices;
		_tmp7_ = self->priv->_active_slice;
		_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _tmp7_);
		_tmp9_ = (GnomePieSliceRenderer*) _tmp8_;
		gnome_pie_slice_renderer_activate (_tmp9_, time_stamp);
		_g_object_unref0 (_tmp9_);
	}
	if (fade_out) {
		GnomePieCenterRenderer* _tmp17_;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp10_ = FALSE;
				_tmp10_ = TRUE;
				while (TRUE) {
					gint _tmp12_;
					GeeArrayList* _tmp13_;
					gint _tmp14_;
					gpointer _tmp15_;
					GnomePieSliceRenderer* _tmp16_;
					if (!_tmp10_) {
						gint _tmp11_;
						i = i + 1;
						_tmp11_ = i;
					}
					_tmp10_ = FALSE;
					_tmp12_ = self->priv->_visible_slice_count;
					if (!(i < _tmp12_)) {
						break;
					}
					_tmp13_ = self->priv->slices;
					_tmp14_ = self->priv->_first_slice_idx;
					_tmp15_ = gee_abstract_list_get ((GeeAbstractList*) _tmp13_, i + _tmp14_);
					_tmp16_ = (GnomePieSliceRenderer*) _tmp15_;
					gnome_pie_slice_renderer_fade_out (_tmp16_);
					_g_object_unref0 (_tmp16_);
				}
			}
		}
		_tmp17_ = self->priv->center;
		gnome_pie_center_renderer_fade_out (_tmp17_);
	}
}

void
gnome_pie_pie_renderer_cancel (GnomePiePieRenderer* self)
{
	GnomePieCenterRenderer* _tmp7_;
	g_return_if_fail (self != NULL);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gint _tmp2_;
				GeeArrayList* _tmp3_;
				gint _tmp4_;
				gpointer _tmp5_;
				GnomePieSliceRenderer* _tmp6_;
				if (!_tmp0_) {
					gint _tmp1_;
					i = i + 1;
					_tmp1_ = i;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->priv->_visible_slice_count;
				if (!(i < _tmp2_)) {
					break;
				}
				_tmp3_ = self->priv->slices;
				_tmp4_ = self->priv->_first_slice_idx;
				_tmp5_ = gee_abstract_list_get ((GeeAbstractList*) _tmp3_, i + _tmp4_);
				_tmp6_ = (GnomePieSliceRenderer*) _tmp5_;
				gnome_pie_slice_renderer_fade_out (_tmp6_);
				_g_object_unref0 (_tmp6_);
			}
		}
	}
	_tmp7_ = self->priv->center;
	gnome_pie_center_renderer_fade_out (_tmp7_);
}

void
gnome_pie_pie_renderer_select_up (GnomePiePieRenderer* self)
{
	gint _tmp0_;
	gint _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_up_slice_idx;
	_tmp1_ = self->priv->_down_slice_idx;
	gnome_pie_pie_renderer_move_active_slice (self, _tmp0_, _tmp1_);
}

void
gnome_pie_pie_renderer_select_down (GnomePiePieRenderer* self)
{
	gint _tmp0_;
	gint _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_down_slice_idx;
	_tmp1_ = self->priv->_up_slice_idx;
	gnome_pie_pie_renderer_move_active_slice (self, _tmp0_, _tmp1_);
}

void
gnome_pie_pie_renderer_select_left (GnomePiePieRenderer* self)
{
	gint _tmp0_;
	gint _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_left_slice_idx;
	_tmp1_ = self->priv->_right_slice_idx;
	gnome_pie_pie_renderer_move_active_slice (self, _tmp0_, _tmp1_);
}

void
gnome_pie_pie_renderer_select_right (GnomePiePieRenderer* self)
{
	gint _tmp0_;
	gint _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_right_slice_idx;
	_tmp1_ = self->priv->_left_slice_idx;
	gnome_pie_pie_renderer_move_active_slice (self, _tmp0_, _tmp1_);
}

void
gnome_pie_pie_renderer_select_nextpage (GnomePiePieRenderer* self)
{
	gint _tmp0_;
	gint _tmp1_;
	GeeArrayList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_first_slice_idx;
	_tmp1_ = self->priv->_visible_slice_count;
	_tmp2_ = self->priv->slices;
	_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	if ((_tmp0_ + _tmp1_) < _tmp4_) {
		gint _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		GeeArrayList* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		_tmp5_ = self->priv->_first_slice_idx;
		_tmp6_ = self->priv->_visible_slice_count;
		gnome_pie_pie_renderer_set_first_slice_idx (self, _tmp5_ + _tmp6_);
		_tmp7_ = self->priv->_first_slice_idx;
		_tmp8_ = self->priv->_visible_slice_count;
		_tmp9_ = self->priv->slices;
		_tmp10_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp9_);
		_tmp11_ = _tmp10_;
		if ((_tmp7_ + _tmp8_) >= _tmp11_) {
			GeeArrayList* _tmp12_;
			gint _tmp13_;
			gint _tmp14_;
			gint _tmp15_;
			_tmp12_ = self->priv->slices;
			_tmp13_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = self->priv->_first_slice_idx;
			gnome_pie_pie_renderer_set_visible_slice_count (self, _tmp14_ - _tmp15_);
		}
		gnome_pie_pie_renderer_reset_slice_anim (self);
		gnome_pie_pie_renderer_select_by_index (self, -1);
		gnome_pie_pie_renderer_calc_key_navigation_pos (self);
		gnome_pie_pie_renderer_set_key_board_control (self, TRUE);
	} else {
		gint _tmp16_;
		_tmp16_ = self->priv->_first_slice_idx;
		if (_tmp16_ > 0) {
			gint _tmp17_;
			gnome_pie_pie_renderer_set_first_slice_idx (self, 0);
			gnome_pie_pie_renderer_reset_slice_anim (self);
			_tmp17_ = self->priv->_original_visible_slice_count;
			gnome_pie_pie_renderer_set_visible_slice_count (self, _tmp17_);
			gnome_pie_pie_renderer_reset_slice_anim (self);
			gnome_pie_pie_renderer_select_by_index (self, -1);
			gnome_pie_pie_renderer_calc_key_navigation_pos (self);
			gnome_pie_pie_renderer_set_key_board_control (self, TRUE);
		}
	}
}

void
gnome_pie_pie_renderer_select_prevpage (GnomePiePieRenderer* self)
{
	gint _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_first_slice_idx;
	if (_tmp0_ > 0) {
		gint _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		_tmp1_ = self->priv->_original_visible_slice_count;
		gnome_pie_pie_renderer_set_visible_slice_count (self, _tmp1_);
		_tmp2_ = self->priv->_first_slice_idx;
		_tmp3_ = self->priv->_visible_slice_count;
		gnome_pie_pie_renderer_set_first_slice_idx (self, _tmp2_ - _tmp3_);
		_tmp4_ = self->priv->_first_slice_idx;
		if (_tmp4_ < 0) {
			gnome_pie_pie_renderer_set_first_slice_idx (self, 0);
		}
		gnome_pie_pie_renderer_reset_slice_anim (self);
		gnome_pie_pie_renderer_select_by_index (self, -1);
		gnome_pie_pie_renderer_calc_key_navigation_pos (self);
		gnome_pie_pie_renderer_set_key_board_control (self, TRUE);
	} else {
		gint _tmp5_;
		GeeArrayList* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		_tmp5_ = self->priv->_visible_slice_count;
		_tmp6_ = self->priv->slices;
		_tmp7_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp6_);
		_tmp8_ = _tmp7_;
		if (_tmp5_ < _tmp8_) {
			gint n = 0;
			GeeArrayList* _tmp9_;
			gint _tmp10_;
			gint _tmp11_;
			gint _tmp12_;
			GeeArrayList* _tmp14_;
			gint _tmp15_;
			gint _tmp16_;
			gint _tmp17_;
			_tmp9_ = self->priv->slices;
			_tmp10_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = self->priv->_original_visible_slice_count;
			n = _tmp11_ % _tmp12_;
			if (n == 0) {
				gint _tmp13_;
				_tmp13_ = self->priv->_original_visible_slice_count;
				gnome_pie_pie_renderer_set_visible_slice_count (self, _tmp13_);
			} else {
				gnome_pie_pie_renderer_set_visible_slice_count (self, n);
			}
			_tmp14_ = self->priv->slices;
			_tmp15_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = self->priv->_visible_slice_count;
			gnome_pie_pie_renderer_set_first_slice_idx (self, _tmp16_ - _tmp17_);
			gnome_pie_pie_renderer_reset_slice_anim (self);
			gnome_pie_pie_renderer_select_by_index (self, -1);
			gnome_pie_pie_renderer_calc_key_navigation_pos (self);
			gnome_pie_pie_renderer_set_key_board_control (self, TRUE);
		}
	}
}

static void
gnome_pie_pie_renderer_reset_slice_anim (GnomePiePieRenderer* self)
{
	g_return_if_fail (self != NULL);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gint _tmp2_;
				GeeArrayList* _tmp3_;
				gint _tmp4_;
				gpointer _tmp5_;
				GnomePieSliceRenderer* _tmp6_;
				if (!_tmp0_) {
					gint _tmp1_;
					i = i + 1;
					_tmp1_ = i;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->priv->_visible_slice_count;
				if (!(i < _tmp2_)) {
					break;
				}
				_tmp3_ = self->priv->slices;
				_tmp4_ = self->priv->_first_slice_idx;
				_tmp5_ = gee_abstract_list_get ((GeeAbstractList*) _tmp3_, i + _tmp4_);
				_tmp6_ = (GnomePieSliceRenderer*) _tmp5_;
				gnome_pie_slice_renderer_reset_anim (_tmp6_);
				_g_object_unref0 (_tmp6_);
			}
		}
	}
}

static gint
string_index_of (const gchar* self,
                 const gchar* needle,
                 gint start_index)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (needle != NULL, 0);
	_tmp0_ = strstr (((gchar*) self) + start_index, (gchar*) needle);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		offset = string_length + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		g_return_val_if_fail (offset <= string_length, NULL);
	}
	if (len < ((glong) 0)) {
		len = string_length - offset;
	}
	g_return_val_if_fail ((offset + len) <= string_length, NULL);
	_tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp3_;
	return result;
}

void
gnome_pie_pie_renderer_select_by_string (GnomePiePieRenderer* self,
                                         const gchar* search)
{
	gfloat max_similarity = 0.0F;
	gint index = 0;
	gboolean _tmp27_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (search != NULL);
	max_similarity = (gfloat) 0;
	index = -1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gint _tmp2_;
				gfloat similarity = 0.0F;
				gint cur_pos = 0;
				gchar* name = NULL;
				GeeArrayList* _tmp3_;
				gint _tmp4_;
				gpointer _tmp5_;
				GnomePieSliceRenderer* _tmp6_;
				GnomePieAction* _tmp7_;
				const gchar* _tmp8_;
				const gchar* _tmp9_;
				gchar* _tmp10_;
				gchar* _tmp11_;
				if (!_tmp0_) {
					gint _tmp1_;
					i = i + 1;
					_tmp1_ = i;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->priv->_visible_slice_count;
				if (!(i < _tmp2_)) {
					break;
				}
				similarity = (gfloat) 0;
				cur_pos = 0;
				_tmp3_ = self->priv->slices;
				_tmp4_ = self->priv->_first_slice_idx;
				_tmp5_ = gee_abstract_list_get ((GeeAbstractList*) _tmp3_, _tmp4_ + i);
				_tmp6_ = (GnomePieSliceRenderer*) _tmp5_;
				_tmp7_ = _tmp6_->action;
				_tmp8_ = gnome_pie_action_get_name (_tmp7_);
				_tmp9_ = _tmp8_;
				_tmp10_ = g_utf8_strdown (_tmp9_, (gssize) -1);
				_tmp11_ = _tmp10_;
				_g_object_unref0 (_tmp6_);
				name = _tmp11_;
				{
					gint j = 0;
					j = 0;
					{
						gboolean _tmp12_ = FALSE;
						_tmp12_ = TRUE;
						while (TRUE) {
							gint _tmp14_;
							gint _tmp15_;
							gint next_pos = 0;
							const gchar* _tmp16_;
							gchar* _tmp17_;
							gchar* _tmp18_;
							gint _tmp19_;
							if (!_tmp12_) {
								gint _tmp13_;
								j = j + 1;
								_tmp13_ = j;
							}
							_tmp12_ = FALSE;
							_tmp14_ = strlen (search);
							_tmp15_ = _tmp14_;
							if (!(j < _tmp15_)) {
								break;
							}
							_tmp16_ = name;
							_tmp17_ = string_substring (search, (glong) j, (glong) 1);
							_tmp18_ = _tmp17_;
							_tmp19_ = string_index_of (_tmp16_, _tmp18_, cur_pos);
							_g_free0 (_tmp18_);
							next_pos = _tmp19_;
							if (next_pos != -1) {
								const gchar* _tmp20_;
								gint _tmp21_;
								gint _tmp22_;
								const gchar* _tmp23_;
								gint _tmp24_;
								gint _tmp25_;
								cur_pos = next_pos;
								_tmp20_ = name;
								_tmp21_ = strlen (_tmp20_);
								_tmp22_ = _tmp21_;
								_tmp23_ = name;
								_tmp24_ = strlen (_tmp23_);
								_tmp25_ = _tmp24_;
								similarity += (((gfloat) (_tmp22_ - next_pos)) / _tmp25_) + 2;
							}
						}
					}
				}
				if (similarity > max_similarity) {
					gint _tmp26_;
					_tmp26_ = self->priv->_first_slice_idx;
					index = _tmp26_ + i;
					max_similarity = similarity;
				}
				_g_free0 (name);
			}
		}
	}
	if (index >= 0) {
		_tmp27_ = index < gnome_pie_pie_renderer_slice_count (self);
	} else {
		_tmp27_ = FALSE;
	}
	if (_tmp27_) {
		gnome_pie_pie_renderer_set_key_board_control (self, TRUE);
		gnome_pie_pie_renderer_select_by_index (self, index);
	}
}

gint
gnome_pie_pie_renderer_slice_count (GnomePiePieRenderer* self)
{
	GeeArrayList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->slices;
	_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

void
gnome_pie_pie_renderer_draw (GnomePiePieRenderer* self,
                             gdouble frame_time,
                             cairo_t* ctx,
                             gint mouse_x,
                             gint mouse_y)
{
	gint _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (ctx != NULL);
	_tmp0_ = self->priv->_size_w;
	if (_tmp0_ > 0) {
		gdouble distance = 0.0;
		gdouble angle = 0.0;
		gint slice_track = 0;
		gboolean _tmp1_;
		GnomePieCenterRenderer* _tmp39_;
		distance = sqrt ((gdouble) ((mouse_x * mouse_x) + (mouse_y * mouse_y)));
		angle = 0.0;
		slice_track = 0;
		_tmp1_ = self->priv->_key_board_control;
		if (_tmp1_) {
			gint n = 0;
			gint _tmp2_;
			gint _tmp3_;
			gint _tmp4_;
			gdouble _tmp5_;
			_tmp2_ = self->priv->_active_slice;
			_tmp3_ = self->priv->_first_slice_idx;
			n = _tmp2_ - _tmp3_;
			_tmp4_ = self->priv->_total_slice_count;
			_tmp5_ = self->priv->_first_slice_angle;
			angle = (((2.0 * G_PI) * n) / ((gdouble) _tmp4_)) + _tmp5_;
			slice_track = 1;
		} else {
			gint next_active_slice = 0;
			gint _tmp6_;
			gboolean _tmp7_ = FALSE;
			gboolean _tmp8_ = FALSE;
			GnomePieConfig* _tmp9_;
			GnomePieConfig* _tmp10_;
			GnomePieTheme* _tmp11_;
			GnomePieTheme* _tmp12_;
			gdouble _tmp13_;
			gdouble _tmp14_;
			if (distance > ((gdouble) 0)) {
				angle = acos (mouse_x / distance);
				if (mouse_y < 0) {
					angle = (2 * G_PI) - angle;
				}
			}
			_tmp6_ = self->priv->_active_slice;
			next_active_slice = _tmp6_;
			_tmp9_ = gnome_pie_config_get_global ();
			_tmp10_ = _tmp9_;
			_tmp11_ = gnome_pie_config_get_theme (_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = gnome_pie_theme_get_active_radius (_tmp12_);
			_tmp14_ = _tmp13_;
			if (distance < _tmp14_) {
				gint _tmp15_;
				gint _tmp16_;
				_tmp15_ = self->priv->_quickaction;
				_tmp16_ = self->priv->_first_slice_idx;
				_tmp8_ = _tmp15_ >= _tmp16_;
			} else {
				_tmp8_ = FALSE;
			}
			if (_tmp8_) {
				gint _tmp17_;
				gint _tmp18_;
				gint _tmp19_;
				_tmp17_ = self->priv->_quickaction;
				_tmp18_ = self->priv->_first_slice_idx;
				_tmp19_ = self->priv->_visible_slice_count;
				_tmp7_ = _tmp17_ < (_tmp18_ + _tmp19_);
			} else {
				_tmp7_ = FALSE;
			}
			if (_tmp7_) {
				gint _tmp20_;
				gint n = 0;
				gint _tmp21_;
				gint _tmp22_;
				gint _tmp23_;
				gdouble _tmp24_;
				_tmp20_ = self->priv->_quickaction;
				next_active_slice = _tmp20_;
				_tmp21_ = self->priv->_quickaction;
				_tmp22_ = self->priv->_first_slice_idx;
				n = _tmp21_ - _tmp22_;
				_tmp23_ = self->priv->_total_slice_count;
				_tmp24_ = self->priv->_first_slice_angle;
				angle = (((2.0 * G_PI) * n) / ((gdouble) _tmp23_)) + _tmp24_;
			} else {
				gboolean _tmp25_ = FALSE;
				gboolean _tmp26_ = FALSE;
				GnomePieConfig* _tmp27_;
				GnomePieConfig* _tmp28_;
				GnomePieTheme* _tmp29_;
				GnomePieTheme* _tmp30_;
				gdouble _tmp31_;
				gdouble _tmp32_;
				_tmp27_ = gnome_pie_config_get_global ();
				_tmp28_ = _tmp27_;
				_tmp29_ = gnome_pie_config_get_theme (_tmp28_);
				_tmp30_ = _tmp29_;
				_tmp31_ = gnome_pie_theme_get_active_radius (_tmp30_);
				_tmp32_ = _tmp31_;
				if (distance > _tmp32_) {
					gint _tmp33_;
					_tmp33_ = self->priv->_total_slice_count;
					_tmp26_ = _tmp33_ > 0;
				} else {
					_tmp26_ = FALSE;
				}
				if (_tmp26_) {
					_tmp25_ = distance < ((gdouble) self->priv->activation_range);
				} else {
					_tmp25_ = FALSE;
				}
				if (_tmp25_) {
					gdouble a = 0.0;
					gdouble _tmp34_;
					gint _tmp35_;
					gint _tmp36_;
					gint _tmp37_;
					_tmp34_ = self->priv->_first_slice_angle;
					a = angle - _tmp34_;
					if (a < ((gdouble) 0)) {
						a = a + (2 * G_PI);
					}
					_tmp35_ = self->priv->_total_slice_count;
					_tmp36_ = self->priv->_total_slice_count;
					next_active_slice = ((gint) (((a * _tmp35_) / (2 * G_PI)) + 0.5)) % _tmp36_;
					_tmp37_ = self->priv->_visible_slice_count;
					if (next_active_slice >= _tmp37_) {
						next_active_slice = -1;
					} else {
						gint _tmp38_;
						_tmp38_ = self->priv->_first_slice_idx;
						next_active_slice = next_active_slice + _tmp38_;
						slice_track = 1;
					}
				} else {
					next_active_slice = -1;
				}
			}
			gnome_pie_pie_renderer_select_by_index (self, next_active_slice);
		}
		_tmp39_ = self->priv->center;
		gnome_pie_center_renderer_draw (_tmp39_, frame_time, ctx, angle, slice_track);
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp40_ = FALSE;
				_tmp40_ = TRUE;
				while (TRUE) {
					gint _tmp42_;
					GeeArrayList* _tmp43_;
					gint _tmp44_;
					gpointer _tmp45_;
					GnomePieSliceRenderer* _tmp46_;
					if (!_tmp40_) {
						gint _tmp41_;
						i = i + 1;
						_tmp41_ = i;
					}
					_tmp40_ = FALSE;
					_tmp42_ = self->priv->_visible_slice_count;
					if (!(i < _tmp42_)) {
						break;
					}
					_tmp43_ = self->priv->slices;
					_tmp44_ = self->priv->_first_slice_idx;
					_tmp45_ = gee_abstract_list_get ((GeeAbstractList*) _tmp43_, i + _tmp44_);
					_tmp46_ = (GnomePieSliceRenderer*) _tmp45_;
					gnome_pie_slice_renderer_draw (_tmp46_, frame_time, ctx, angle, slice_track);
					_g_object_unref0 (_tmp46_);
				}
			}
		}
	}
}

void
gnome_pie_pie_renderer_on_mouse_move (GnomePiePieRenderer* self)
{
	g_return_if_fail (self != NULL);
	gnome_pie_pie_renderer_set_key_board_control (self, FALSE);
}

void
gnome_pie_pie_renderer_select_by_index (GnomePiePieRenderer* self,
                                        gint index)
{
	gint _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_active_slice;
	if (index != _tmp0_) {
		gboolean _tmp1_ = FALSE;
		gint _tmp2_;
		GnomePieSliceRenderer* _tmp5_ = NULL;
		gboolean _tmp6_ = FALSE;
		gint _tmp7_;
		GnomePieSliceRenderer* active = NULL;
		GnomePieSliceRenderer* _tmp15_;
		GnomePieCenterRenderer* _tmp16_;
		GnomePieSliceRenderer* _tmp17_;
		_tmp2_ = self->priv->_first_slice_idx;
		if (index >= _tmp2_) {
			gint _tmp3_;
			gint _tmp4_;
			_tmp3_ = self->priv->_first_slice_idx;
			_tmp4_ = self->priv->_visible_slice_count;
			_tmp1_ = index < (_tmp3_ + _tmp4_);
		} else {
			_tmp1_ = FALSE;
		}
		if (_tmp1_) {
			gnome_pie_pie_renderer_set_active_slice (self, index);
		} else {
			gnome_pie_pie_renderer_set_active_slice (self, -1);
		}
		_tmp7_ = self->priv->_active_slice;
		if (_tmp7_ >= 0) {
			gint _tmp8_;
			GeeArrayList* _tmp9_;
			gint _tmp10_;
			gint _tmp11_;
			_tmp8_ = self->priv->_active_slice;
			_tmp9_ = self->priv->slices;
			_tmp10_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp9_);
			_tmp11_ = _tmp10_;
			_tmp6_ = _tmp8_ < _tmp11_;
		} else {
			_tmp6_ = FALSE;
		}
		if (_tmp6_) {
			GeeArrayList* _tmp12_;
			gint _tmp13_;
			gpointer _tmp14_;
			_tmp12_ = self->priv->slices;
			_tmp13_ = self->priv->_active_slice;
			_tmp14_ = gee_abstract_list_get ((GeeAbstractList*) _tmp12_, _tmp13_);
			_g_object_unref0 (_tmp5_);
			_tmp5_ = (GnomePieSliceRenderer*) _tmp14_;
		} else {
			_g_object_unref0 (_tmp5_);
			_tmp5_ = NULL;
		}
		_tmp15_ = _g_object_ref0 (_tmp5_);
		active = _tmp15_;
		_tmp16_ = self->priv->center;
		_tmp17_ = active;
		gnome_pie_center_renderer_set_active_slice (_tmp16_, _tmp17_);
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp18_ = FALSE;
				_tmp18_ = TRUE;
				while (TRUE) {
					gint _tmp20_;
					GeeArrayList* _tmp21_;
					gint _tmp22_;
					gpointer _tmp23_;
					GnomePieSliceRenderer* _tmp24_;
					GnomePieSliceRenderer* _tmp25_;
					if (!_tmp18_) {
						gint _tmp19_;
						i = i + 1;
						_tmp19_ = i;
					}
					_tmp18_ = FALSE;
					_tmp20_ = self->priv->_visible_slice_count;
					if (!(i < _tmp20_)) {
						break;
					}
					_tmp21_ = self->priv->slices;
					_tmp22_ = self->priv->_first_slice_idx;
					_tmp23_ = gee_abstract_list_get ((GeeAbstractList*) _tmp21_, i + _tmp22_);
					_tmp24_ = (GnomePieSliceRenderer*) _tmp23_;
					_tmp25_ = active;
					gnome_pie_slice_renderer_set_active_slice (_tmp24_, _tmp25_);
					_g_object_unref0 (_tmp24_);
				}
			}
		}
		_g_object_unref0 (active);
		_g_object_unref0 (_tmp5_);
	}
}

static void
gnome_pie_pie_renderer_set_show_mode (GnomePiePieRenderer* self,
                                      GnomePiePieRendererShowPieMode show_mode)
{
	gint mult = 0;
	gint maxview = 0;
	gint _tmp0_;
	GeeArrayList* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gboolean _tmp5_ = FALSE;
	gint _tmp10_;
	g_return_if_fail (self != NULL);
	gnome_pie_pie_renderer_set_first_slice_idx (self, 0);
	gnome_pie_pie_renderer_set_first_slice_angle (self, (gdouble) 0);
	mult = 1;
	switch (show_mode) {
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_LEFT:
		{
			mult = 2;
			gnome_pie_pie_renderer_set_first_slice_angle (self, (-G_PI) / 2);
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_RIGHT:
		{
			mult = 2;
			gnome_pie_pie_renderer_set_first_slice_angle (self, G_PI / 2);
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_TOP:
		{
			mult = 2;
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_BOTTOM:
		{
			gnome_pie_pie_renderer_set_first_slice_angle (self, G_PI);
			mult = 2;
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_LEFT:
		{
			mult = 4;
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_RIGHT:
		{
			gnome_pie_pie_renderer_set_first_slice_angle (self, G_PI / 2);
			mult = 4;
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_LEFT:
		{
			gnome_pie_pie_renderer_set_first_slice_angle (self, (-G_PI) / 2);
			mult = 4;
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_RIGHT:
		{
			gnome_pie_pie_renderer_set_first_slice_angle (self, G_PI);
			mult = 4;
			break;
		}
		default:
		{
			show_mode = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_FULL_PIE;
			break;
		}
	}
	gnome_pie_pie_renderer_set_pie_show_mode (self, show_mode);
	_tmp0_ = self->priv->_max_visible_slices;
	maxview = _tmp0_ / mult;
	_tmp1_ = self->priv->slices;
	_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
	_tmp3_ = _tmp2_;
	gnome_pie_pie_renderer_set_visible_slice_count (self, (gint) fmin ((gdouble) _tmp3_, (gdouble) maxview));
	_tmp4_ = self->priv->_visible_slice_count;
	gnome_pie_pie_renderer_set_total_slice_count (self, _tmp4_ * mult);
	if (mult > 1) {
		GeeArrayList* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		_tmp6_ = self->priv->slices;
		_tmp7_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp5_ = _tmp8_ > 1;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		gint _tmp9_;
		_tmp9_ = self->priv->_total_slice_count;
		gnome_pie_pie_renderer_set_total_slice_count (self, _tmp9_ - mult);
	}
	_tmp10_ = self->priv->_visible_slice_count;
	gnome_pie_pie_renderer_set_original_visible_slice_count (self, _tmp10_);
	gnome_pie_pie_renderer_calc_key_navigation_pos (self);
}

static void
gnome_pie_pie_renderer_calc_key_navigation_pos (GnomePiePieRenderer* self)
{
	gint a = 0;
	gint _tmp0_;
	gint b = 0;
	gint _tmp1_;
	gint _tmp2_;
	gint c = 0;
	gint _tmp3_;
	gint _tmp4_;
	gint d = 0;
	gint _tmp5_;
	gint _tmp6_;
	gint e = 0;
	gint _tmp7_;
	gint _tmp8_;
	GnomePiePieRendererShowPieMode _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_first_slice_idx;
	a = _tmp0_;
	_tmp1_ = self->priv->_first_slice_idx;
	_tmp2_ = self->priv->_visible_slice_count;
	b = _tmp1_ + (_tmp2_ / 4);
	_tmp3_ = self->priv->_first_slice_idx;
	_tmp4_ = self->priv->_visible_slice_count;
	c = _tmp3_ + (_tmp4_ / 2);
	_tmp5_ = self->priv->_first_slice_idx;
	_tmp6_ = self->priv->_visible_slice_count;
	d = _tmp5_ + ((_tmp6_ * 3) / 4);
	_tmp7_ = self->priv->_first_slice_idx;
	_tmp8_ = self->priv->_visible_slice_count;
	e = (_tmp7_ + _tmp8_) - 1;
	_tmp9_ = self->priv->_pie_show_mode;
	switch (_tmp9_) {
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_LEFT:
		{
			gnome_pie_pie_renderer_set_up_slice_idx (self, a);
			gnome_pie_pie_renderer_set_right_slice_idx (self, c);
			gnome_pie_pie_renderer_set_down_slice_idx (self, e);
			gnome_pie_pie_renderer_set_left_slice_idx (self, -1);
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_RIGHT:
		{
			gnome_pie_pie_renderer_set_down_slice_idx (self, a);
			gnome_pie_pie_renderer_set_left_slice_idx (self, c);
			gnome_pie_pie_renderer_set_up_slice_idx (self, e);
			gnome_pie_pie_renderer_set_right_slice_idx (self, -1);
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_TOP:
		{
			gnome_pie_pie_renderer_set_right_slice_idx (self, a);
			gnome_pie_pie_renderer_set_down_slice_idx (self, c);
			gnome_pie_pie_renderer_set_left_slice_idx (self, e);
			gnome_pie_pie_renderer_set_up_slice_idx (self, -1);
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_HPIE_BOTTOM:
		{
			gnome_pie_pie_renderer_set_left_slice_idx (self, a);
			gnome_pie_pie_renderer_set_up_slice_idx (self, c);
			gnome_pie_pie_renderer_set_right_slice_idx (self, e);
			gnome_pie_pie_renderer_set_down_slice_idx (self, -1);
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_LEFT:
		{
			gnome_pie_pie_renderer_set_right_slice_idx (self, a);
			gnome_pie_pie_renderer_set_down_slice_idx (self, e);
			gnome_pie_pie_renderer_set_up_slice_idx (self, -1);
			gnome_pie_pie_renderer_set_left_slice_idx (self, -1);
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_TOP_RIGHT:
		{
			gnome_pie_pie_renderer_set_down_slice_idx (self, a);
			gnome_pie_pie_renderer_set_left_slice_idx (self, e);
			gnome_pie_pie_renderer_set_up_slice_idx (self, -1);
			gnome_pie_pie_renderer_set_right_slice_idx (self, -1);
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_LEFT:
		{
			gnome_pie_pie_renderer_set_up_slice_idx (self, a);
			gnome_pie_pie_renderer_set_right_slice_idx (self, e);
			gnome_pie_pie_renderer_set_down_slice_idx (self, -1);
			gnome_pie_pie_renderer_set_left_slice_idx (self, -1);
			break;
		}
		case GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_CPIE_BOT_RIGHT:
		{
			gnome_pie_pie_renderer_set_left_slice_idx (self, a);
			gnome_pie_pie_renderer_set_up_slice_idx (self, e);
			gnome_pie_pie_renderer_set_down_slice_idx (self, -1);
			gnome_pie_pie_renderer_set_right_slice_idx (self, -1);
			break;
		}
		default:
		{
			gnome_pie_pie_renderer_set_right_slice_idx (self, a);
			gnome_pie_pie_renderer_set_down_slice_idx (self, b);
			gnome_pie_pie_renderer_set_left_slice_idx (self, c);
			gnome_pie_pie_renderer_set_up_slice_idx (self, d);
			break;
		}
	}
}

static void
gnome_pie_pie_renderer_move_active_slice (GnomePiePieRenderer* self,
                                          gint extreme,
                                          gint other_extreme)
{
	gint pos = 0;
	gint _tmp0_;
	gboolean _tmp1_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_active_slice;
	pos = _tmp0_;
	if (pos < 0) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = pos == extreme;
	}
	if (_tmp1_) {
		pos = extreme;
	} else {
		if (extreme == -1) {
			gboolean _tmp2_ = FALSE;
			if (pos > other_extreme) {
				_tmp2_ = TRUE;
			} else {
				_tmp2_ = other_extreme == 0;
			}
			if (_tmp2_) {
				gint _tmp3_;
				gint _tmp4_;
				_tmp3_ = self->priv->_visible_slice_count;
				_tmp4_ = self->priv->_first_slice_idx;
				if (pos < ((_tmp3_ + _tmp4_) - 1)) {
					gint _tmp5_;
					_tmp5_ = pos;
					pos = _tmp5_ + 1;
				}
			} else {
				gint _tmp6_;
				_tmp6_ = self->priv->_first_slice_idx;
				if (pos > _tmp6_) {
					gint _tmp7_;
					_tmp7_ = pos;
					pos = _tmp7_ - 1;
				}
			}
		} else {
			if (other_extreme == -1) {
				if (pos < extreme) {
					gint _tmp8_;
					_tmp8_ = pos;
					pos = _tmp8_ + 1;
				} else {
					if (pos > extreme) {
						gint _tmp9_;
						_tmp9_ = pos;
						pos = _tmp9_ - 1;
					}
				}
			} else {
				if (pos == other_extreme) {
					pos = extreme;
				} else {
					gint _tmp12_;
					gint _tmp15_;
					gint _tmp16_;
					if (extreme > other_extreme) {
						gboolean _tmp10_ = FALSE;
						if (pos > other_extreme) {
							_tmp10_ = pos < extreme;
						} else {
							_tmp10_ = FALSE;
						}
						if (_tmp10_) {
							pos = pos + 1;
						} else {
							pos = pos - 1;
						}
					} else {
						gboolean _tmp11_ = FALSE;
						if (pos > extreme) {
							_tmp11_ = pos < other_extreme;
						} else {
							_tmp11_ = FALSE;
						}
						if (_tmp11_) {
							pos = pos - 1;
						} else {
							pos = pos + 1;
						}
					}
					_tmp12_ = self->priv->_first_slice_idx;
					if (pos < _tmp12_) {
						gint _tmp13_;
						gint _tmp14_;
						_tmp13_ = self->priv->_visible_slice_count;
						_tmp14_ = self->priv->_first_slice_idx;
						pos = (_tmp13_ - 1) + _tmp14_;
					}
					_tmp15_ = self->priv->_visible_slice_count;
					_tmp16_ = self->priv->_first_slice_idx;
					if (pos >= (_tmp15_ + _tmp16_)) {
						gint _tmp17_;
						_tmp17_ = self->priv->_first_slice_idx;
						pos = _tmp17_;
					}
				}
			}
		}
	}
	gnome_pie_pie_renderer_select_by_index (self, pos);
	gnome_pie_pie_renderer_set_key_board_control (self, TRUE);
}

gint
gnome_pie_pie_renderer_get_quickaction (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_quickaction;
	return result;
}

static void
gnome_pie_pie_renderer_set_quickaction (GnomePiePieRenderer* self,
                                        gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_quickaction (self);
	if (old_value != value) {
		self->priv->_quickaction = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_QUICKACTION_PROPERTY]);
	}
}

gint
gnome_pie_pie_renderer_get_active_slice (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_active_slice;
	return result;
}

static void
gnome_pie_pie_renderer_set_active_slice (GnomePiePieRenderer* self,
                                         gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_active_slice (self);
	if (old_value != value) {
		self->priv->_active_slice = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_ACTIVE_SLICE_PROPERTY]);
	}
}

gboolean
gnome_pie_pie_renderer_get_show_hotkeys (GnomePiePieRenderer* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_hotkeys;
	return result;
}

void
gnome_pie_pie_renderer_set_show_hotkeys (GnomePiePieRenderer* self,
                                         gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_show_hotkeys (self);
	if (old_value != value) {
		self->priv->_show_hotkeys = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_SHOW_HOTKEYS_PROPERTY]);
	}
}

gint
gnome_pie_pie_renderer_get_size_w (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_size_w;
	return result;
}

static void
gnome_pie_pie_renderer_set_size_w (GnomePiePieRenderer* self,
                                   gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_size_w (self);
	if (old_value != value) {
		self->priv->_size_w = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_SIZE_W_PROPERTY]);
	}
}

gint
gnome_pie_pie_renderer_get_size_h (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_size_h;
	return result;
}

static void
gnome_pie_pie_renderer_set_size_h (GnomePiePieRenderer* self,
                                   gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_size_h (self);
	if (old_value != value) {
		self->priv->_size_h = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_SIZE_H_PROPERTY]);
	}
}

gint
gnome_pie_pie_renderer_get_center_x (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_center_x;
	return result;
}

static void
gnome_pie_pie_renderer_set_center_x (GnomePiePieRenderer* self,
                                     gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_center_x (self);
	if (old_value != value) {
		self->priv->_center_x = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_CENTER_X_PROPERTY]);
	}
}

gint
gnome_pie_pie_renderer_get_center_y (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_center_y;
	return result;
}

static void
gnome_pie_pie_renderer_set_center_y (GnomePiePieRenderer* self,
                                     gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_center_y (self);
	if (old_value != value) {
		self->priv->_center_y = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_CENTER_Y_PROPERTY]);
	}
}

GnomePiePieRendererShowPieMode
gnome_pie_pie_renderer_get_pie_show_mode (GnomePiePieRenderer* self)
{
	GnomePiePieRendererShowPieMode result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_pie_show_mode;
	return result;
}

static void
gnome_pie_pie_renderer_set_pie_show_mode (GnomePiePieRenderer* self,
                                          GnomePiePieRendererShowPieMode value)
{
	GnomePiePieRendererShowPieMode old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_pie_show_mode (self);
	if (old_value != value) {
		self->priv->_pie_show_mode = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_PIE_SHOW_MODE_PROPERTY]);
	}
}

gint
gnome_pie_pie_renderer_get_visible_slice_count (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_visible_slice_count;
	return result;
}

static void
gnome_pie_pie_renderer_set_visible_slice_count (GnomePiePieRenderer* self,
                                                gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_visible_slice_count (self);
	if (old_value != value) {
		self->priv->_visible_slice_count = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_VISIBLE_SLICE_COUNT_PROPERTY]);
	}
}

gint
gnome_pie_pie_renderer_get_original_visible_slice_count (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_original_visible_slice_count;
	return result;
}

static void
gnome_pie_pie_renderer_set_original_visible_slice_count (GnomePiePieRenderer* self,
                                                         gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_original_visible_slice_count (self);
	if (old_value != value) {
		self->priv->_original_visible_slice_count = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_ORIGINAL_VISIBLE_SLICE_COUNT_PROPERTY]);
	}
}

gint
gnome_pie_pie_renderer_get_total_slice_count (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_total_slice_count;
	return result;
}

static void
gnome_pie_pie_renderer_set_total_slice_count (GnomePiePieRenderer* self,
                                              gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_total_slice_count (self);
	if (old_value != value) {
		self->priv->_total_slice_count = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_TOTAL_SLICE_COUNT_PROPERTY]);
	}
}

gint
gnome_pie_pie_renderer_get_max_visible_slices (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_max_visible_slices;
	return result;
}

static void
gnome_pie_pie_renderer_set_max_visible_slices (GnomePiePieRenderer* self,
                                               gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_max_visible_slices (self);
	if (old_value != value) {
		self->priv->_max_visible_slices = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_MAX_VISIBLE_SLICES_PROPERTY]);
	}
}

gint
gnome_pie_pie_renderer_get_first_slice_idx (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_first_slice_idx;
	return result;
}

static void
gnome_pie_pie_renderer_set_first_slice_idx (GnomePiePieRenderer* self,
                                            gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_first_slice_idx (self);
	if (old_value != value) {
		self->priv->_first_slice_idx = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_FIRST_SLICE_IDX_PROPERTY]);
	}
}

gdouble
gnome_pie_pie_renderer_get_first_slice_angle (GnomePiePieRenderer* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, 0.0);
	result = self->priv->_first_slice_angle;
	return result;
}

static void
gnome_pie_pie_renderer_set_first_slice_angle (GnomePiePieRenderer* self,
                                              gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_first_slice_angle (self);
	if (old_value != value) {
		self->priv->_first_slice_angle = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_FIRST_SLICE_ANGLE_PROPERTY]);
	}
}

gint
gnome_pie_pie_renderer_get_up_slice_idx (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_up_slice_idx;
	return result;
}

static void
gnome_pie_pie_renderer_set_up_slice_idx (GnomePiePieRenderer* self,
                                         gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_up_slice_idx (self);
	if (old_value != value) {
		self->priv->_up_slice_idx = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_UP_SLICE_IDX_PROPERTY]);
	}
}

gint
gnome_pie_pie_renderer_get_down_slice_idx (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_down_slice_idx;
	return result;
}

static void
gnome_pie_pie_renderer_set_down_slice_idx (GnomePiePieRenderer* self,
                                           gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_down_slice_idx (self);
	if (old_value != value) {
		self->priv->_down_slice_idx = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_DOWN_SLICE_IDX_PROPERTY]);
	}
}

gint
gnome_pie_pie_renderer_get_left_slice_idx (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_left_slice_idx;
	return result;
}

static void
gnome_pie_pie_renderer_set_left_slice_idx (GnomePiePieRenderer* self,
                                           gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_left_slice_idx (self);
	if (old_value != value) {
		self->priv->_left_slice_idx = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_LEFT_SLICE_IDX_PROPERTY]);
	}
}

gint
gnome_pie_pie_renderer_get_right_slice_idx (GnomePiePieRenderer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_right_slice_idx;
	return result;
}

static void
gnome_pie_pie_renderer_set_right_slice_idx (GnomePiePieRenderer* self,
                                            gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_right_slice_idx (self);
	if (old_value != value) {
		self->priv->_right_slice_idx = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_RIGHT_SLICE_IDX_PROPERTY]);
	}
}

const gchar*
gnome_pie_pie_renderer_get_id (GnomePiePieRenderer* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_id;
	result = _tmp0_;
	return result;
}

static void
gnome_pie_pie_renderer_set_id (GnomePiePieRenderer* self,
                               const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_id);
		self->priv->_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_ID_PROPERTY]);
	}
}

gboolean
gnome_pie_pie_renderer_get_key_board_control (GnomePiePieRenderer* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_key_board_control;
	return result;
}

void
gnome_pie_pie_renderer_set_key_board_control (GnomePiePieRenderer* self,
                                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_pie_renderer_get_key_board_control (self);
	if (old_value != value) {
		self->priv->_key_board_control = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_KEY_BOARD_CONTROL_PROPERTY]);
	}
}

static void
gnome_pie_pie_renderer_class_init (GnomePiePieRendererClass * klass,
                                   gpointer klass_data)
{
	gnome_pie_pie_renderer_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GnomePiePieRenderer_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gnome_pie_pie_renderer_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gnome_pie_pie_renderer_set_property;
	G_OBJECT_CLASS (klass)->finalize = gnome_pie_pie_renderer_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_QUICKACTION_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_QUICKACTION_PROPERTY] = g_param_spec_int ("quickaction", "quickaction", "quickaction", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_ACTIVE_SLICE_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_ACTIVE_SLICE_PROPERTY] = g_param_spec_int ("active-slice", "active-slice", "active-slice", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_SHOW_HOTKEYS_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_SHOW_HOTKEYS_PROPERTY] = g_param_spec_boolean ("show-hotkeys", "show-hotkeys", "show-hotkeys", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_SIZE_W_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_SIZE_W_PROPERTY] = g_param_spec_int ("size-w", "size-w", "size-w", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_SIZE_H_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_SIZE_H_PROPERTY] = g_param_spec_int ("size-h", "size-h", "size-h", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_CENTER_X_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_CENTER_X_PROPERTY] = g_param_spec_int ("center-x", "center-x", "center-x", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_CENTER_Y_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_CENTER_Y_PROPERTY] = g_param_spec_int ("center-y", "center-y", "center-y", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_PIE_SHOW_MODE_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_PIE_SHOW_MODE_PROPERTY] = g_param_spec_enum ("pie-show-mode", "pie-show-mode", "pie-show-mode", GNOME_PIE_PIE_RENDERER_TYPE_SHOW_PIE_MODE, GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_FULL_PIE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_VISIBLE_SLICE_COUNT_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_VISIBLE_SLICE_COUNT_PROPERTY] = g_param_spec_int ("visible-slice-count", "visible-slice-count", "visible-slice-count", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_ORIGINAL_VISIBLE_SLICE_COUNT_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_ORIGINAL_VISIBLE_SLICE_COUNT_PROPERTY] = g_param_spec_int ("original-visible-slice-count", "original-visible-slice-count", "original-visible-slice-count", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_TOTAL_SLICE_COUNT_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_TOTAL_SLICE_COUNT_PROPERTY] = g_param_spec_int ("total-slice-count", "total-slice-count", "total-slice-count", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_MAX_VISIBLE_SLICES_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_MAX_VISIBLE_SLICES_PROPERTY] = g_param_spec_int ("max-visible-slices", "max-visible-slices", "max-visible-slices", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_FIRST_SLICE_IDX_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_FIRST_SLICE_IDX_PROPERTY] = g_param_spec_int ("first-slice-idx", "first-slice-idx", "first-slice-idx", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_FIRST_SLICE_ANGLE_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_FIRST_SLICE_ANGLE_PROPERTY] = g_param_spec_double ("first-slice-angle", "first-slice-angle", "first-slice-angle", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_UP_SLICE_IDX_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_UP_SLICE_IDX_PROPERTY] = g_param_spec_int ("up-slice-idx", "up-slice-idx", "up-slice-idx", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_DOWN_SLICE_IDX_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_DOWN_SLICE_IDX_PROPERTY] = g_param_spec_int ("down-slice-idx", "down-slice-idx", "down-slice-idx", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_LEFT_SLICE_IDX_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_LEFT_SLICE_IDX_PROPERTY] = g_param_spec_int ("left-slice-idx", "left-slice-idx", "left-slice-idx", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_RIGHT_SLICE_IDX_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_RIGHT_SLICE_IDX_PROPERTY] = g_param_spec_int ("right-slice-idx", "right-slice-idx", "right-slice-idx", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_ID_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_PIE_RENDERER_KEY_BOARD_CONTROL_PROPERTY, gnome_pie_pie_renderer_properties[GNOME_PIE_PIE_RENDERER_KEY_BOARD_CONTROL_PROPERTY] = g_param_spec_boolean ("key-board-control", "key-board-control", "key-board-control", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
gnome_pie_pie_renderer_instance_init (GnomePiePieRenderer * self,
                                      gpointer klass)
{
	self->priv = gnome_pie_pie_renderer_get_instance_private (self);
	self->priv->_pie_show_mode = GNOME_PIE_PIE_RENDERER_SHOW_PIE_MODE_FULL_PIE;
	self->priv->_key_board_control = FALSE;
}

static void
gnome_pie_pie_renderer_finalize (GObject * obj)
{
	GnomePiePieRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GNOME_PIE_TYPE_PIE_RENDERER, GnomePiePieRenderer);
	_g_free0 (self->priv->_id);
	_g_object_unref0 (self->priv->slices);
	_g_object_unref0 (self->priv->center);
	G_OBJECT_CLASS (gnome_pie_pie_renderer_parent_class)->finalize (obj);
}

static GType
gnome_pie_pie_renderer_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GnomePiePieRendererClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gnome_pie_pie_renderer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GnomePiePieRenderer), 0, (GInstanceInitFunc) gnome_pie_pie_renderer_instance_init, NULL };
	GType gnome_pie_pie_renderer_type_id;
	gnome_pie_pie_renderer_type_id = g_type_register_static (G_TYPE_OBJECT, "GnomePiePieRenderer", &g_define_type_info, 0);
	GnomePiePieRenderer_private_offset = g_type_add_instance_private (gnome_pie_pie_renderer_type_id, sizeof (GnomePiePieRendererPrivate));
	return gnome_pie_pie_renderer_type_id;
}

GType
gnome_pie_pie_renderer_get_type (void)
{
	static volatile gsize gnome_pie_pie_renderer_type_id__once = 0;
	if (g_once_init_enter (&gnome_pie_pie_renderer_type_id__once)) {
		GType gnome_pie_pie_renderer_type_id;
		gnome_pie_pie_renderer_type_id = gnome_pie_pie_renderer_get_type_once ();
		g_once_init_leave (&gnome_pie_pie_renderer_type_id__once, gnome_pie_pie_renderer_type_id);
	}
	return gnome_pie_pie_renderer_type_id__once;
}

static void
_vala_gnome_pie_pie_renderer_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	GnomePiePieRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GNOME_PIE_TYPE_PIE_RENDERER, GnomePiePieRenderer);
	switch (property_id) {
		case GNOME_PIE_PIE_RENDERER_QUICKACTION_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_quickaction (self));
		break;
		case GNOME_PIE_PIE_RENDERER_ACTIVE_SLICE_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_active_slice (self));
		break;
		case GNOME_PIE_PIE_RENDERER_SHOW_HOTKEYS_PROPERTY:
		g_value_set_boolean (value, gnome_pie_pie_renderer_get_show_hotkeys (self));
		break;
		case GNOME_PIE_PIE_RENDERER_SIZE_W_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_size_w (self));
		break;
		case GNOME_PIE_PIE_RENDERER_SIZE_H_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_size_h (self));
		break;
		case GNOME_PIE_PIE_RENDERER_CENTER_X_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_center_x (self));
		break;
		case GNOME_PIE_PIE_RENDERER_CENTER_Y_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_center_y (self));
		break;
		case GNOME_PIE_PIE_RENDERER_PIE_SHOW_MODE_PROPERTY:
		g_value_set_enum (value, gnome_pie_pie_renderer_get_pie_show_mode (self));
		break;
		case GNOME_PIE_PIE_RENDERER_VISIBLE_SLICE_COUNT_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_visible_slice_count (self));
		break;
		case GNOME_PIE_PIE_RENDERER_ORIGINAL_VISIBLE_SLICE_COUNT_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_original_visible_slice_count (self));
		break;
		case GNOME_PIE_PIE_RENDERER_TOTAL_SLICE_COUNT_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_total_slice_count (self));
		break;
		case GNOME_PIE_PIE_RENDERER_MAX_VISIBLE_SLICES_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_max_visible_slices (self));
		break;
		case GNOME_PIE_PIE_RENDERER_FIRST_SLICE_IDX_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_first_slice_idx (self));
		break;
		case GNOME_PIE_PIE_RENDERER_FIRST_SLICE_ANGLE_PROPERTY:
		g_value_set_double (value, gnome_pie_pie_renderer_get_first_slice_angle (self));
		break;
		case GNOME_PIE_PIE_RENDERER_UP_SLICE_IDX_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_up_slice_idx (self));
		break;
		case GNOME_PIE_PIE_RENDERER_DOWN_SLICE_IDX_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_down_slice_idx (self));
		break;
		case GNOME_PIE_PIE_RENDERER_LEFT_SLICE_IDX_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_left_slice_idx (self));
		break;
		case GNOME_PIE_PIE_RENDERER_RIGHT_SLICE_IDX_PROPERTY:
		g_value_set_int (value, gnome_pie_pie_renderer_get_right_slice_idx (self));
		break;
		case GNOME_PIE_PIE_RENDERER_ID_PROPERTY:
		g_value_set_string (value, gnome_pie_pie_renderer_get_id (self));
		break;
		case GNOME_PIE_PIE_RENDERER_KEY_BOARD_CONTROL_PROPERTY:
		g_value_set_boolean (value, gnome_pie_pie_renderer_get_key_board_control (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gnome_pie_pie_renderer_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	GnomePiePieRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GNOME_PIE_TYPE_PIE_RENDERER, GnomePiePieRenderer);
	switch (property_id) {
		case GNOME_PIE_PIE_RENDERER_QUICKACTION_PROPERTY:
		gnome_pie_pie_renderer_set_quickaction (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_ACTIVE_SLICE_PROPERTY:
		gnome_pie_pie_renderer_set_active_slice (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_SHOW_HOTKEYS_PROPERTY:
		gnome_pie_pie_renderer_set_show_hotkeys (self, g_value_get_boolean (value));
		break;
		case GNOME_PIE_PIE_RENDERER_SIZE_W_PROPERTY:
		gnome_pie_pie_renderer_set_size_w (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_SIZE_H_PROPERTY:
		gnome_pie_pie_renderer_set_size_h (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_CENTER_X_PROPERTY:
		gnome_pie_pie_renderer_set_center_x (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_CENTER_Y_PROPERTY:
		gnome_pie_pie_renderer_set_center_y (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_PIE_SHOW_MODE_PROPERTY:
		gnome_pie_pie_renderer_set_pie_show_mode (self, g_value_get_enum (value));
		break;
		case GNOME_PIE_PIE_RENDERER_VISIBLE_SLICE_COUNT_PROPERTY:
		gnome_pie_pie_renderer_set_visible_slice_count (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_ORIGINAL_VISIBLE_SLICE_COUNT_PROPERTY:
		gnome_pie_pie_renderer_set_original_visible_slice_count (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_TOTAL_SLICE_COUNT_PROPERTY:
		gnome_pie_pie_renderer_set_total_slice_count (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_MAX_VISIBLE_SLICES_PROPERTY:
		gnome_pie_pie_renderer_set_max_visible_slices (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_FIRST_SLICE_IDX_PROPERTY:
		gnome_pie_pie_renderer_set_first_slice_idx (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_FIRST_SLICE_ANGLE_PROPERTY:
		gnome_pie_pie_renderer_set_first_slice_angle (self, g_value_get_double (value));
		break;
		case GNOME_PIE_PIE_RENDERER_UP_SLICE_IDX_PROPERTY:
		gnome_pie_pie_renderer_set_up_slice_idx (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_DOWN_SLICE_IDX_PROPERTY:
		gnome_pie_pie_renderer_set_down_slice_idx (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_LEFT_SLICE_IDX_PROPERTY:
		gnome_pie_pie_renderer_set_left_slice_idx (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_RIGHT_SLICE_IDX_PROPERTY:
		gnome_pie_pie_renderer_set_right_slice_idx (self, g_value_get_int (value));
		break;
		case GNOME_PIE_PIE_RENDERER_ID_PROPERTY:
		gnome_pie_pie_renderer_set_id (self, g_value_get_string (value));
		break;
		case GNOME_PIE_PIE_RENDERER_KEY_BOARD_CONTROL_PROPERTY:
		gnome_pie_pie_renderer_set_key_board_control (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

