/* clipboardGroup.c generated by valac 0.56.19, the Vala compiler
 * generated from clipboardGroup.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 <libxml/xmlwriter.h>
#include <libxml/tree.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdk.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_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;
typedef struct _GnomePieActionGroupPrivate GnomePieActionGroupPrivate;

#define GNOME_PIE_TYPE_CLIPBOARD_GROUP (gnome_pie_clipboard_group_get_type ())
#define GNOME_PIE_CLIPBOARD_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_CLIPBOARD_GROUP, GnomePieClipboardGroup))
#define GNOME_PIE_CLIPBOARD_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_CLIPBOARD_GROUP, GnomePieClipboardGroupClass))
#define GNOME_PIE_IS_CLIPBOARD_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_CLIPBOARD_GROUP))
#define GNOME_PIE_IS_CLIPBOARD_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_CLIPBOARD_GROUP))
#define GNOME_PIE_CLIPBOARD_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_CLIPBOARD_GROUP, GnomePieClipboardGroupClass))

typedef struct _GnomePieClipboardGroup GnomePieClipboardGroup;
typedef struct _GnomePieClipboardGroupClass GnomePieClipboardGroupClass;
typedef struct _GnomePieClipboardGroupPrivate GnomePieClipboardGroupPrivate;

#define GNOME_PIE_CLIPBOARD_GROUP_TYPE_CLIPBOARD_ITEM (gnome_pie_clipboard_group_clipboard_item_get_type ())
#define GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_CLIPBOARD_GROUP_TYPE_CLIPBOARD_ITEM, GnomePieClipboardGroupClipboardItem))
#define GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_CLIPBOARD_GROUP_TYPE_CLIPBOARD_ITEM, GnomePieClipboardGroupClipboardItemClass))
#define GNOME_PIE_CLIPBOARD_GROUP_IS_CLIPBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_CLIPBOARD_GROUP_TYPE_CLIPBOARD_ITEM))
#define GNOME_PIE_CLIPBOARD_GROUP_IS_CLIPBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_CLIPBOARD_GROUP_TYPE_CLIPBOARD_ITEM))
#define GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_CLIPBOARD_GROUP_TYPE_CLIPBOARD_ITEM, GnomePieClipboardGroupClipboardItemClass))

typedef struct _GnomePieClipboardGroupClipboardItem GnomePieClipboardGroupClipboardItem;
typedef struct _GnomePieClipboardGroupClipboardItemClass GnomePieClipboardGroupClipboardItemClass;
enum  {
	GNOME_PIE_CLIPBOARD_GROUP_0_PROPERTY,
	GNOME_PIE_CLIPBOARD_GROUP_MAX_ITEMS_PROPERTY,
	GNOME_PIE_CLIPBOARD_GROUP_NUM_PROPERTIES
};
static GParamSpec* gnome_pie_clipboard_group_properties[GNOME_PIE_CLIPBOARD_GROUP_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GNOME_PIE_GROUP_REGISTRY_TYPE_TYPEDESCRIPTION (gnome_pie_group_registry_typedescription_get_type ())
#define GNOME_PIE_GROUP_REGISTRY_TYPEDESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_GROUP_REGISTRY_TYPE_TYPEDESCRIPTION, GnomePieGroupRegistryTypeDescription))
#define GNOME_PIE_GROUP_REGISTRY_TYPEDESCRIPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_GROUP_REGISTRY_TYPE_TYPEDESCRIPTION, GnomePieGroupRegistryTypeDescriptionClass))
#define GNOME_PIE_GROUP_REGISTRY_IS_TYPEDESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_GROUP_REGISTRY_TYPE_TYPEDESCRIPTION))
#define GNOME_PIE_GROUP_REGISTRY_IS_TYPEDESCRIPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_GROUP_REGISTRY_TYPE_TYPEDESCRIPTION))
#define GNOME_PIE_GROUP_REGISTRY_TYPEDESCRIPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_GROUP_REGISTRY_TYPE_TYPEDESCRIPTION, GnomePieGroupRegistryTypeDescriptionClass))

typedef struct _GnomePieGroupRegistryTypeDescription GnomePieGroupRegistryTypeDescription;
typedef struct _GnomePieGroupRegistryTypeDescriptionClass GnomePieGroupRegistryTypeDescriptionClass;
#define _g_free0(var) (var = (g_free (var), NULL))

#define GNOME_PIE_CLIPBOARD_GROUP_TYPE_TEXT_CLIPBOARD_ITEM (gnome_pie_clipboard_group_text_clipboard_item_get_type ())
#define GNOME_PIE_CLIPBOARD_GROUP_TEXT_CLIPBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_CLIPBOARD_GROUP_TYPE_TEXT_CLIPBOARD_ITEM, GnomePieClipboardGroupTextClipboardItem))
#define GNOME_PIE_CLIPBOARD_GROUP_TEXT_CLIPBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_CLIPBOARD_GROUP_TYPE_TEXT_CLIPBOARD_ITEM, GnomePieClipboardGroupTextClipboardItemClass))
#define GNOME_PIE_CLIPBOARD_GROUP_IS_TEXT_CLIPBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_CLIPBOARD_GROUP_TYPE_TEXT_CLIPBOARD_ITEM))
#define GNOME_PIE_CLIPBOARD_GROUP_IS_TEXT_CLIPBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_CLIPBOARD_GROUP_TYPE_TEXT_CLIPBOARD_ITEM))
#define GNOME_PIE_CLIPBOARD_GROUP_TEXT_CLIPBOARD_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_CLIPBOARD_GROUP_TYPE_TEXT_CLIPBOARD_ITEM, GnomePieClipboardGroupTextClipboardItemClass))

typedef struct _GnomePieClipboardGroupTextClipboardItem GnomePieClipboardGroupTextClipboardItem;
typedef struct _GnomePieClipboardGroupTextClipboardItemClass GnomePieClipboardGroupTextClipboardItemClass;

#define GNOME_PIE_CLIPBOARD_GROUP_TYPE_IMAGE_CLIPBOARD_ITEM (gnome_pie_clipboard_group_image_clipboard_item_get_type ())
#define GNOME_PIE_CLIPBOARD_GROUP_IMAGE_CLIPBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_CLIPBOARD_GROUP_TYPE_IMAGE_CLIPBOARD_ITEM, GnomePieClipboardGroupImageClipboardItem))
#define GNOME_PIE_CLIPBOARD_GROUP_IMAGE_CLIPBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_CLIPBOARD_GROUP_TYPE_IMAGE_CLIPBOARD_ITEM, GnomePieClipboardGroupImageClipboardItemClass))
#define GNOME_PIE_CLIPBOARD_GROUP_IS_IMAGE_CLIPBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_CLIPBOARD_GROUP_TYPE_IMAGE_CLIPBOARD_ITEM))
#define GNOME_PIE_CLIPBOARD_GROUP_IS_IMAGE_CLIPBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_CLIPBOARD_GROUP_TYPE_IMAGE_CLIPBOARD_ITEM))
#define GNOME_PIE_CLIPBOARD_GROUP_IMAGE_CLIPBOARD_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_CLIPBOARD_GROUP_TYPE_IMAGE_CLIPBOARD_ITEM, GnomePieClipboardGroupImageClipboardItemClass))

typedef struct _GnomePieClipboardGroupImageClipboardItem GnomePieClipboardGroupImageClipboardItem;
typedef struct _GnomePieClipboardGroupImageClipboardItemClass GnomePieClipboardGroupImageClipboardItemClass;

#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_SIG_ACTION (gnome_pie_sig_action_get_type ())
#define GNOME_PIE_SIG_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_SIG_ACTION, GnomePieSigAction))
#define GNOME_PIE_SIG_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_SIG_ACTION, GnomePieSigActionClass))
#define GNOME_PIE_IS_SIG_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_SIG_ACTION))
#define GNOME_PIE_IS_SIG_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_SIG_ACTION))
#define GNOME_PIE_SIG_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_SIG_ACTION, GnomePieSigActionClass))

typedef struct _GnomePieSigAction GnomePieSigAction;
typedef struct _GnomePieSigActionClass GnomePieSigActionClass;
typedef struct _Block1Data Block1Data;
typedef struct _GnomePieClipboardGroupClipboardItemPrivate GnomePieClipboardGroupClipboardItemPrivate;
enum  {
	GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_0_PROPERTY,
	GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_NAME_PROPERTY,
	GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_ICON_PROPERTY,
	GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_CLIPBOARD_PROPERTY,
	GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_NUM_PROPERTIES
};
static GParamSpec* gnome_pie_clipboard_group_clipboard_item_properties[GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_NUM_PROPERTIES];

#define GNOME_PIE_TYPE_KEY (gnome_pie_key_get_type ())
#define GNOME_PIE_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_KEY, GnomePieKey))
#define GNOME_PIE_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_KEY, GnomePieKeyClass))
#define GNOME_PIE_IS_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_KEY))
#define GNOME_PIE_IS_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_KEY))
#define GNOME_PIE_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_KEY, GnomePieKeyClass))

typedef struct _GnomePieKey GnomePieKey;
typedef struct _GnomePieKeyClass GnomePieKeyClass;
typedef struct _GnomePieClipboardGroupTextClipboardItemPrivate GnomePieClipboardGroupTextClipboardItemPrivate;
enum  {
	GNOME_PIE_CLIPBOARD_GROUP_TEXT_CLIPBOARD_ITEM_0_PROPERTY,
	GNOME_PIE_CLIPBOARD_GROUP_TEXT_CLIPBOARD_ITEM_NUM_PROPERTIES
};
static GParamSpec* gnome_pie_clipboard_group_text_clipboard_item_properties[GNOME_PIE_CLIPBOARD_GROUP_TEXT_CLIPBOARD_ITEM_NUM_PROPERTIES];
typedef struct _GnomePieClipboardGroupImageClipboardItemPrivate GnomePieClipboardGroupImageClipboardItemPrivate;
enum  {
	GNOME_PIE_CLIPBOARD_GROUP_IMAGE_CLIPBOARD_ITEM_0_PROPERTY,
	GNOME_PIE_CLIPBOARD_GROUP_IMAGE_CLIPBOARD_ITEM_NUM_PROPERTIES
};
static GParamSpec* gnome_pie_clipboard_group_image_clipboard_item_properties[GNOME_PIE_CLIPBOARD_GROUP_IMAGE_CLIPBOARD_ITEM_NUM_PROPERTIES];

struct _GnomePieActionGroup {
	GObject parent_instance;
	GnomePieActionGroupPrivate * priv;
};

struct _GnomePieActionGroupClass {
	GObjectClass parent_class;
	void (*on_remove) (GnomePieActionGroup* self);
	void (*on_save) (GnomePieActionGroup* self, xmlTextWriter* writer);
	void (*on_load) (GnomePieActionGroup* self, xmlNode* data);
};

struct _GnomePieClipboardGroup {
	GnomePieActionGroup parent_instance;
	GnomePieClipboardGroupPrivate * priv;
};

struct _GnomePieClipboardGroupClass {
	GnomePieActionGroupClass parent_class;
};

struct _GnomePieClipboardGroupPrivate {
	gint _max_items;
	GtkClipboard* clipboard;
	gboolean ignore_next_change;
	GeeArrayList* items;
};

struct _Block1Data {
	int _ref_count_;
	GnomePieClipboardGroup* self;
	GnomePieSigAction* action;
};

struct _GnomePieClipboardGroupClipboardItem {
	GObject parent_instance;
	GnomePieClipboardGroupClipboardItemPrivate * priv;
};

struct _GnomePieClipboardGroupClipboardItemClass {
	GObjectClass parent_class;
	void (*paste) (GnomePieClipboardGroupClipboardItem* self);
};

struct _GnomePieClipboardGroupClipboardItemPrivate {
	gchar* _name;
	gchar* _icon;
	GtkClipboard* _clipboard;
};

struct _GnomePieClipboardGroupTextClipboardItem {
	GnomePieClipboardGroupClipboardItem parent_instance;
	GnomePieClipboardGroupTextClipboardItemPrivate * priv;
};

struct _GnomePieClipboardGroupTextClipboardItemClass {
	GnomePieClipboardGroupClipboardItemClass parent_class;
};

struct _GnomePieClipboardGroupImageClipboardItem {
	GnomePieClipboardGroupClipboardItem parent_instance;
	GnomePieClipboardGroupImageClipboardItemPrivate * priv;
};

struct _GnomePieClipboardGroupImageClipboardItemClass {
	GnomePieClipboardGroupClipboardItemClass parent_class;
};

struct _GnomePieClipboardGroupImageClipboardItemPrivate {
	GdkPixbuf* _image;
};

static gint GnomePieClipboardGroup_private_offset;
static gpointer gnome_pie_clipboard_group_parent_class = NULL;
static gint GnomePieClipboardGroupClipboardItem_private_offset;
static gpointer gnome_pie_clipboard_group_clipboard_item_parent_class = NULL;
static GnomePieKey* gnome_pie_clipboard_group_clipboard_item_paste_key;
static GnomePieKey* gnome_pie_clipboard_group_clipboard_item_paste_key = NULL;
static gpointer gnome_pie_clipboard_group_text_clipboard_item_parent_class = NULL;
static gint GnomePieClipboardGroupImageClipboardItem_private_offset;
static gpointer gnome_pie_clipboard_group_image_clipboard_item_parent_class = NULL;

VALA_EXTERN GType gnome_pie_action_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieActionGroup, g_object_unref)
VALA_EXTERN GType gnome_pie_clipboard_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieClipboardGroup, g_object_unref)
static GType gnome_pie_clipboard_group_clipboard_item_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieClipboardGroupClipboardItem, g_object_unref)
VALA_EXTERN void gnome_pie_action_group_on_save (GnomePieActionGroup* self,
                                     xmlTextWriter* writer);
VALA_EXTERN void gnome_pie_action_group_on_load (GnomePieActionGroup* self,
                                     xmlNode* data);
VALA_EXTERN GnomePieClipboardGroup* gnome_pie_clipboard_group_new (const gchar* parent_id);
VALA_EXTERN GnomePieClipboardGroup* gnome_pie_clipboard_group_construct (GType object_type,
                                                             const gchar* parent_id);
VALA_EXTERN gpointer gnome_pie_group_registry_typedescription_ref (gpointer instance);
VALA_EXTERN void gnome_pie_group_registry_typedescription_unref (gpointer instance);
VALA_EXTERN GParamSpec* gnome_pie_group_registry_param_spec_typedescription (const gchar* name,
                                                                 const gchar* nick,
                                                                 const gchar* blurb,
                                                                 GType object_type,
                                                                 GParamFlags flags);
VALA_EXTERN void gnome_pie_group_registry_value_set_typedescription (GValue* value,
                                                         gpointer v_object);
VALA_EXTERN void gnome_pie_group_registry_value_take_typedescription (GValue* value,
                                                          gpointer v_object);
VALA_EXTERN gpointer gnome_pie_group_registry_value_get_typedescription (const GValue* value);
VALA_EXTERN GType gnome_pie_group_registry_typedescription_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieGroupRegistryTypeDescription, gnome_pie_group_registry_typedescription_unref)
VALA_EXTERN GnomePieGroupRegistryTypeDescription* gnome_pie_clipboard_group_register (void);
VALA_EXTERN GnomePieGroupRegistryTypeDescription* gnome_pie_group_registry_typedescription_new (void);
VALA_EXTERN GnomePieGroupRegistryTypeDescription* gnome_pie_group_registry_typedescription_construct (GType object_type);
VALA_EXTERN void gnome_pie_group_registry_typedescription_set_name (GnomePieGroupRegistryTypeDescription* self,
                                                        const gchar* value);
VALA_EXTERN void gnome_pie_group_registry_typedescription_set_icon (GnomePieGroupRegistryTypeDescription* self,
                                                        const gchar* value);
VALA_EXTERN void gnome_pie_group_registry_typedescription_set_description (GnomePieGroupRegistryTypeDescription* self,
                                                               const gchar* value);
VALA_EXTERN void gnome_pie_group_registry_typedescription_set_id (GnomePieGroupRegistryTypeDescription* self,
                                                      const gchar* value);
static void gnome_pie_clipboard_group_real_on_save (GnomePieActionGroup* base,
                                             xmlTextWriter* writer);
VALA_EXTERN gint gnome_pie_clipboard_group_get_max_items (GnomePieClipboardGroup* self);
static void gnome_pie_clipboard_group_real_on_load (GnomePieActionGroup* base,
                                             xmlNode* data);
VALA_EXTERN void gnome_pie_clipboard_group_set_max_items (GnomePieClipboardGroup* self,
                                              gint value);
static void gnome_pie_clipboard_group_on_change (GnomePieClipboardGroup* self);
static void gnome_pie_clipboard_group_add_item (GnomePieClipboardGroup* self,
                                         GnomePieClipboardGroupClipboardItem* item);
static GnomePieClipboardGroupTextClipboardItem* gnome_pie_clipboard_group_text_clipboard_item_new (GtkClipboard* clipboard);
static GnomePieClipboardGroupTextClipboardItem* gnome_pie_clipboard_group_text_clipboard_item_construct (GType object_type,
                                                                                                  GtkClipboard* clipboard);
static GType gnome_pie_clipboard_group_text_clipboard_item_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieClipboardGroupTextClipboardItem, g_object_unref)
static GnomePieClipboardGroupImageClipboardItem* gnome_pie_clipboard_group_image_clipboard_item_new (GtkClipboard* clipboard);
static GnomePieClipboardGroupImageClipboardItem* gnome_pie_clipboard_group_image_clipboard_item_construct (GType object_type,
                                                                                                    GtkClipboard* clipboard);
static GType gnome_pie_clipboard_group_image_clipboard_item_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieClipboardGroupImageClipboardItem, g_object_unref)
VALA_EXTERN void gnome_pie_action_group_delete_all (GnomePieActionGroup* self);
VALA_EXTERN GType gnome_pie_action_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieAction, g_object_unref)
VALA_EXTERN GType gnome_pie_sig_action_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieSigAction, g_object_unref)
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static const gchar* gnome_pie_clipboard_group_clipboard_item_get_name (GnomePieClipboardGroupClipboardItem* self);
static const gchar* gnome_pie_clipboard_group_clipboard_item_get_icon (GnomePieClipboardGroupClipboardItem* self);
VALA_EXTERN GnomePieSigAction* gnome_pie_sig_action_new (const gchar* name,
                                             const gchar* icon,
                                             const gchar* command,
                                             gboolean is_quickaction);
VALA_EXTERN GnomePieSigAction* gnome_pie_sig_action_construct (GType object_type,
                                                   const gchar* name,
                                                   const gchar* icon,
                                                   const gchar* command,
                                                   gboolean is_quickaction);
static void _____lambda27_ (Block1Data* _data1_);
VALA_EXTERN const gchar* gnome_pie_action_get_real_command (GnomePieAction* self);
static void gnome_pie_clipboard_group_clipboard_item_paste (GnomePieClipboardGroupClipboardItem* self);
static void ______lambda27__gnome_pie_sig_action_activated (GnomePieSigAction* _sender,
                                                     guint32 time_stamp,
                                                     gpointer self);
VALA_EXTERN void gnome_pie_action_group_add_action (GnomePieActionGroup* self,
                                        GnomePieAction* new_action);
VALA_EXTERN GType gnome_pie_key_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieKey, g_object_unref)
VALA_EXTERN GnomePieKey* gnome_pie_key_new_from_string (const gchar* stroke);
VALA_EXTERN GnomePieKey* gnome_pie_key_construct_from_string (GType object_type,
                                                  const gchar* stroke);
static void gnome_pie_clipboard_group_clipboard_item_real_paste (GnomePieClipboardGroupClipboardItem* self);
static GnomePieClipboardGroupClipboardItem* gnome_pie_clipboard_group_clipboard_item_new (void);
static GnomePieClipboardGroupClipboardItem* gnome_pie_clipboard_group_clipboard_item_construct (GType object_type);
static void gnome_pie_clipboard_group_clipboard_item_set_name (GnomePieClipboardGroupClipboardItem* self,
                                                        const gchar* value);
static void gnome_pie_clipboard_group_clipboard_item_set_icon (GnomePieClipboardGroupClipboardItem* self,
                                                        const gchar* value);
static GtkClipboard* gnome_pie_clipboard_group_clipboard_item_get_clipboard (GnomePieClipboardGroupClipboardItem* self);
static void gnome_pie_clipboard_group_clipboard_item_set_clipboard (GnomePieClipboardGroupClipboardItem* self,
                                                             GtkClipboard* value);
static void gnome_pie_clipboard_group_clipboard_item_finalize (GObject * obj);
static GType gnome_pie_clipboard_group_clipboard_item_get_type_once (void);
static void _vala_gnome_pie_clipboard_group_clipboard_item_get_property (GObject * object,
                                                                  guint property_id,
                                                                  GValue * value,
                                                                  GParamSpec * pspec);
static void _vala_gnome_pie_clipboard_group_clipboard_item_set_property (GObject * object,
                                                                  guint property_id,
                                                                  const GValue * value,
                                                                  GParamSpec * pspec);
static void gnome_pie_clipboard_group_text_clipboard_item_real_paste (GnomePieClipboardGroupClipboardItem* base);
VALA_EXTERN void gnome_pie_key_press (GnomePieKey* self);
static GType gnome_pie_clipboard_group_text_clipboard_item_get_type_once (void);
static void gnome_pie_clipboard_group_image_clipboard_item_set_image (GnomePieClipboardGroupImageClipboardItem* self,
                                                               GdkPixbuf* value);
static void gnome_pie_clipboard_group_image_clipboard_item_real_paste (GnomePieClipboardGroupClipboardItem* base);
static GdkPixbuf* gnome_pie_clipboard_group_image_clipboard_item_get_image (GnomePieClipboardGroupImageClipboardItem* self);
static void gnome_pie_clipboard_group_image_clipboard_item_finalize (GObject * obj);
static GType gnome_pie_clipboard_group_image_clipboard_item_get_type_once (void);
static void _vala_gnome_pie_clipboard_group_image_clipboard_item_get_property (GObject * object,
                                                                        guint property_id,
                                                                        GValue * value,
                                                                        GParamSpec * pspec);
static void _vala_gnome_pie_clipboard_group_image_clipboard_item_set_property (GObject * object,
                                                                        guint property_id,
                                                                        const GValue * value,
                                                                        GParamSpec * pspec);
static GObject * gnome_pie_clipboard_group_constructor (GType type,
                                                 guint n_construct_properties,
                                                 GObjectConstructParam * construct_properties);
static void _gnome_pie_clipboard_group_on_change_gtk_clipboard_owner_change (GtkClipboard* _sender,
                                                                      GdkEventOwnerChange* event,
                                                                      gpointer self);
static void gnome_pie_clipboard_group_finalize (GObject * obj);
static GType gnome_pie_clipboard_group_get_type_once (void);
static void _vala_gnome_pie_clipboard_group_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec);
static void _vala_gnome_pie_clipboard_group_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec);

static inline gpointer
gnome_pie_clipboard_group_get_instance_private (GnomePieClipboardGroup* self)
{
	return G_STRUCT_MEMBER_P (self, GnomePieClipboardGroup_private_offset);
}

GnomePieClipboardGroup*
gnome_pie_clipboard_group_construct (GType object_type,
                                     const gchar* parent_id)
{
	GnomePieClipboardGroup * self = NULL;
	g_return_val_if_fail (parent_id != NULL, NULL);
	self = (GnomePieClipboardGroup*) g_object_new (object_type, "parent-id", parent_id, NULL);
	return self;
}

GnomePieClipboardGroup*
gnome_pie_clipboard_group_new (const gchar* parent_id)
{
	return gnome_pie_clipboard_group_construct (GNOME_PIE_TYPE_CLIPBOARD_GROUP, parent_id);
}

GnomePieGroupRegistryTypeDescription*
gnome_pie_clipboard_group_register (void)
{
	GnomePieGroupRegistryTypeDescription* description = NULL;
	GnomePieGroupRegistryTypeDescription* _tmp0_;
	GnomePieGroupRegistryTypeDescription* result;
	_tmp0_ = gnome_pie_group_registry_typedescription_new ();
	description = _tmp0_;
	gnome_pie_group_registry_typedescription_set_name (description, _ ("Group: Clipboard"));
	gnome_pie_group_registry_typedescription_set_icon (description, "edit-paste");
	gnome_pie_group_registry_typedescription_set_description (description, _ ("Manages your Clipboard."));
	gnome_pie_group_registry_typedescription_set_id (description, "clipboard");
	result = description;
	return result;
}

static void
gnome_pie_clipboard_group_real_on_save (GnomePieActionGroup* base,
                                        xmlTextWriter* writer)
{
	GnomePieClipboardGroup * self;
	gint _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	self = (GnomePieClipboardGroup*) base;
	g_return_if_fail (writer != NULL);
	GNOME_PIE_ACTION_GROUP_CLASS (gnome_pie_clipboard_group_parent_class)->on_save (G_TYPE_CHECK_INSTANCE_CAST (self, GNOME_PIE_TYPE_ACTION_GROUP, GnomePieActionGroup), writer);
	_tmp0_ = self->priv->_max_items;
	_tmp1_ = g_strdup_printf ("%i", _tmp0_);
	_tmp2_ = _tmp1_;
	xmlTextWriterWriteAttribute (writer, (xmlChar*) "max_items", (xmlChar*) _tmp2_);
	_g_free0 (_tmp2_);
}

static void
gnome_pie_clipboard_group_real_on_load (GnomePieActionGroup* base,
                                        xmlNode* data)
{
	GnomePieClipboardGroup * self;
	self = (GnomePieClipboardGroup*) base;
	{
		xmlAttr* attribute = NULL;
		xmlAttr* _tmp0_;
		_tmp0_ = data->properties;
		attribute = _tmp0_;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				xmlAttr* _tmp4_;
				gchar* attr_name = NULL;
				xmlAttr* _tmp5_;
				const gchar* _tmp6_;
				gchar* _tmp7_;
				gchar* attr_content = NULL;
				xmlAttr* _tmp8_;
				xmlNode* _tmp9_;
				const gchar* _tmp10_;
				gchar* _tmp11_;
				const gchar* _tmp12_;
				if (!_tmp1_) {
					xmlAttr* _tmp2_;
					xmlAttr* _tmp3_;
					_tmp2_ = attribute;
					_tmp3_ = _tmp2_->next;
					attribute = _tmp3_;
				}
				_tmp1_ = FALSE;
				_tmp4_ = attribute;
				if (!(_tmp4_ != NULL)) {
					break;
				}
				_tmp5_ = attribute;
				_tmp6_ = _tmp5_->name;
				_tmp7_ = g_utf8_strdown (_tmp6_, (gssize) -1);
				attr_name = _tmp7_;
				_tmp8_ = attribute;
				_tmp9_ = _tmp8_->children;
				_tmp10_ = _tmp9_->content;
				_tmp11_ = g_strdup (_tmp10_);
				attr_content = _tmp11_;
				_tmp12_ = attr_name;
				if (g_strcmp0 (_tmp12_, "max_items") == 0) {
					const gchar* _tmp13_;
					_tmp13_ = attr_content;
					gnome_pie_clipboard_group_set_max_items (self, atoi (_tmp13_));
				}
				_g_free0 (attr_content);
				_g_free0 (attr_name);
			}
		}
	}
}

static void
gnome_pie_clipboard_group_on_change (GnomePieClipboardGroup* self)
{
	GtkClipboard* _tmp0_;
	g_return_if_fail (self != NULL);
	if (self->priv->ignore_next_change) {
		self->priv->ignore_next_change = FALSE;
		return;
	}
	_tmp0_ = self->priv->clipboard;
	if (gtk_clipboard_wait_is_text_available (_tmp0_)) {
		GtkClipboard* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		gboolean _tmp4_;
		_tmp1_ = self->priv->clipboard;
		_tmp2_ = gtk_clipboard_wait_for_text (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_ != NULL;
		_g_free0 (_tmp3_);
		if (_tmp4_) {
			GtkClipboard* _tmp5_;
			GnomePieClipboardGroupTextClipboardItem* _tmp6_;
			GnomePieClipboardGroupTextClipboardItem* _tmp7_;
			_tmp5_ = self->priv->clipboard;
			_tmp6_ = gnome_pie_clipboard_group_text_clipboard_item_new (_tmp5_);
			_tmp7_ = _tmp6_;
			gnome_pie_clipboard_group_add_item (self, (GnomePieClipboardGroupClipboardItem*) _tmp7_);
			_g_object_unref0 (_tmp7_);
		}
	} else {
		GtkClipboard* _tmp8_;
		_tmp8_ = self->priv->clipboard;
		if (gtk_clipboard_wait_is_image_available (_tmp8_)) {
			GtkClipboard* _tmp9_;
			GnomePieClipboardGroupImageClipboardItem* _tmp10_;
			GnomePieClipboardGroupImageClipboardItem* _tmp11_;
			_tmp9_ = self->priv->clipboard;
			_tmp10_ = gnome_pie_clipboard_group_image_clipboard_item_new (_tmp9_);
			_tmp11_ = _tmp10_;
			gnome_pie_clipboard_group_add_item (self, (GnomePieClipboardGroupClipboardItem*) _tmp11_);
			_g_object_unref0 (_tmp11_);
		}
	}
}

static Block1Data*
block1_data_ref (Block1Data* _data1_)
{
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}

static void
block1_data_unref (void * _userdata_)
{
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		GnomePieClipboardGroup* self;
		self = _data1_->self;
		_g_object_unref0 (_data1_->action);
		_g_object_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}

static void
_____lambda27_ (Block1Data* _data1_)
{
	GnomePieClipboardGroup* self;
	GeeArrayList* _tmp0_;
	GnomePieSigAction* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gpointer _tmp4_;
	GnomePieClipboardGroupClipboardItem* _tmp5_;
	self = _data1_->self;
	self->priv->ignore_next_change = TRUE;
	_tmp0_ = self->priv->items;
	_tmp1_ = _data1_->action;
	_tmp2_ = gnome_pie_action_get_real_command ((GnomePieAction*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_abstract_list_get ((GeeAbstractList*) _tmp0_, atoi (_tmp3_));
	_tmp5_ = (GnomePieClipboardGroupClipboardItem*) _tmp4_;
	gnome_pie_clipboard_group_clipboard_item_paste (_tmp5_);
	_g_object_unref0 (_tmp5_);
}

static void
______lambda27__gnome_pie_sig_action_activated (GnomePieSigAction* _sender,
                                                guint32 time_stamp,
                                                gpointer self)
{
	_____lambda27_ (self);
}

static void
gnome_pie_clipboard_group_add_item (GnomePieClipboardGroup* self,
                                    GnomePieClipboardGroupClipboardItem* item)
{
	GeeArrayList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	GeeArrayList* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->items;
	_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_max_items;
	if (_tmp2_ == _tmp3_) {
		GeeArrayList* _tmp4_;
		gpointer _tmp5_;
		GnomePieClipboardGroupClipboardItem* _tmp6_;
		_tmp4_ = self->priv->items;
		_tmp5_ = gee_abstract_list_remove_at ((GeeAbstractList*) _tmp4_, 0);
		_tmp6_ = (GnomePieClipboardGroupClipboardItem*) _tmp5_;
		_g_object_unref0 (_tmp6_);
	}
	_tmp7_ = self->priv->items;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp7_, item);
	gnome_pie_action_group_delete_all ((GnomePieActionGroup*) self);
	{
		gint i = 0;
		GeeArrayList* _tmp8_;
		gint _tmp9_;
		gint _tmp10_;
		_tmp8_ = self->priv->items;
		_tmp9_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp8_);
		_tmp10_ = _tmp9_;
		i = _tmp10_ - 1;
		{
			gboolean _tmp11_ = FALSE;
			_tmp11_ = TRUE;
			while (TRUE) {
				Block1Data* _data1_;
				GeeArrayList* _tmp13_;
				gpointer _tmp14_;
				GnomePieClipboardGroupClipboardItem* _tmp15_;
				const gchar* _tmp16_;
				const gchar* _tmp17_;
				GeeArrayList* _tmp18_;
				gpointer _tmp19_;
				GnomePieClipboardGroupClipboardItem* _tmp20_;
				const gchar* _tmp21_;
				const gchar* _tmp22_;
				gchar* _tmp23_;
				gchar* _tmp24_;
				GnomePieSigAction* _tmp25_;
				GnomePieSigAction* _tmp26_;
				GnomePieSigAction* _tmp27_;
				GnomePieSigAction* _tmp28_;
				_data1_ = g_slice_new0 (Block1Data);
				_data1_->_ref_count_ = 1;
				_data1_->self = g_object_ref (self);
				if (!_tmp11_) {
					gint _tmp12_;
					i = i - 1;
					_tmp12_ = i;
				}
				_tmp11_ = FALSE;
				if (!(i >= 0)) {
					block1_data_unref (_data1_);
					_data1_ = NULL;
					break;
				}
				_tmp13_ = self->priv->items;
				_tmp14_ = gee_abstract_list_get ((GeeAbstractList*) _tmp13_, i);
				_tmp15_ = (GnomePieClipboardGroupClipboardItem*) _tmp14_;
				_tmp16_ = gnome_pie_clipboard_group_clipboard_item_get_name (_tmp15_);
				_tmp17_ = _tmp16_;
				_tmp18_ = self->priv->items;
				_tmp19_ = gee_abstract_list_get ((GeeAbstractList*) _tmp18_, i);
				_tmp20_ = (GnomePieClipboardGroupClipboardItem*) _tmp19_;
				_tmp21_ = gnome_pie_clipboard_group_clipboard_item_get_icon (_tmp20_);
				_tmp22_ = _tmp21_;
				_tmp23_ = g_strdup_printf ("%i", i);
				_tmp24_ = _tmp23_;
				_tmp25_ = gnome_pie_sig_action_new (_tmp17_, _tmp22_, _tmp24_, FALSE);
				_tmp26_ = _tmp25_;
				_g_free0 (_tmp24_);
				_g_object_unref0 (_tmp20_);
				_g_object_unref0 (_tmp15_);
				_data1_->action = _tmp26_;
				_tmp27_ = _data1_->action;
				g_signal_connect_data (_tmp27_, "activated", (GCallback) ______lambda27__gnome_pie_sig_action_activated, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
				_tmp28_ = _data1_->action;
				gnome_pie_action_group_add_action ((GnomePieActionGroup*) self, (GnomePieAction*) _tmp28_);
				block1_data_unref (_data1_);
				_data1_ = NULL;
			}
		}
	}
}

gint
gnome_pie_clipboard_group_get_max_items (GnomePieClipboardGroup* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_max_items;
	return result;
}

void
gnome_pie_clipboard_group_set_max_items (GnomePieClipboardGroup* self,
                                         gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_clipboard_group_get_max_items (self);
	if (old_value != value) {
		self->priv->_max_items = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_clipboard_group_properties[GNOME_PIE_CLIPBOARD_GROUP_MAX_ITEMS_PROPERTY]);
	}
}

static inline gpointer
gnome_pie_clipboard_group_clipboard_item_get_instance_private (GnomePieClipboardGroupClipboardItem* self)
{
	return G_STRUCT_MEMBER_P (self, GnomePieClipboardGroupClipboardItem_private_offset);
}

static void
gnome_pie_clipboard_group_clipboard_item_real_paste (GnomePieClipboardGroupClipboardItem* self)
{
}

void
gnome_pie_clipboard_group_clipboard_item_paste (GnomePieClipboardGroupClipboardItem* self)
{
	GnomePieClipboardGroupClipboardItemClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_GET_CLASS (self);
	if (_klass_->paste) {
		_klass_->paste (self);
	}
}

static GnomePieClipboardGroupClipboardItem*
gnome_pie_clipboard_group_clipboard_item_construct (GType object_type)
{
	GnomePieClipboardGroupClipboardItem * self = NULL;
	self = (GnomePieClipboardGroupClipboardItem*) g_object_new (object_type, NULL);
	return self;
}

static GnomePieClipboardGroupClipboardItem*
gnome_pie_clipboard_group_clipboard_item_new (void)
{
	return gnome_pie_clipboard_group_clipboard_item_construct (GNOME_PIE_CLIPBOARD_GROUP_TYPE_CLIPBOARD_ITEM);
}

static const gchar*
gnome_pie_clipboard_group_clipboard_item_get_name (GnomePieClipboardGroupClipboardItem* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}

static void
gnome_pie_clipboard_group_clipboard_item_set_name (GnomePieClipboardGroupClipboardItem* self,
                                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_clipboard_group_clipboard_item_get_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_name);
		self->priv->_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_clipboard_group_clipboard_item_properties[GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_NAME_PROPERTY]);
	}
}

static const gchar*
gnome_pie_clipboard_group_clipboard_item_get_icon (GnomePieClipboardGroupClipboardItem* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_icon;
	result = _tmp0_;
	return result;
}

static void
gnome_pie_clipboard_group_clipboard_item_set_icon (GnomePieClipboardGroupClipboardItem* self,
                                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_clipboard_group_clipboard_item_get_icon (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_icon);
		self->priv->_icon = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_clipboard_group_clipboard_item_properties[GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_ICON_PROPERTY]);
	}
}

static GtkClipboard*
gnome_pie_clipboard_group_clipboard_item_get_clipboard (GnomePieClipboardGroupClipboardItem* self)
{
	GtkClipboard* result;
	GtkClipboard* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_clipboard;
	result = _tmp0_;
	return result;
}

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

static void
gnome_pie_clipboard_group_clipboard_item_set_clipboard (GnomePieClipboardGroupClipboardItem* self,
                                                        GtkClipboard* value)
{
	GtkClipboard* old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_clipboard_group_clipboard_item_get_clipboard (self);
	if (old_value != value) {
		GtkClipboard* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_clipboard);
		self->priv->_clipboard = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_clipboard_group_clipboard_item_properties[GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_CLIPBOARD_PROPERTY]);
	}
}

static void
gnome_pie_clipboard_group_clipboard_item_class_init (GnomePieClipboardGroupClipboardItemClass * klass,
                                                     gpointer klass_data)
{
	GnomePieKey* _tmp0_;
	gnome_pie_clipboard_group_clipboard_item_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GnomePieClipboardGroupClipboardItem_private_offset);
	((GnomePieClipboardGroupClipboardItemClass *) klass)->paste = (void (*) (GnomePieClipboardGroupClipboardItem*)) gnome_pie_clipboard_group_clipboard_item_real_paste;
	G_OBJECT_CLASS (klass)->get_property = _vala_gnome_pie_clipboard_group_clipboard_item_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gnome_pie_clipboard_group_clipboard_item_set_property;
	G_OBJECT_CLASS (klass)->finalize = gnome_pie_clipboard_group_clipboard_item_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_NAME_PROPERTY, gnome_pie_clipboard_group_clipboard_item_properties[GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_ICON_PROPERTY, gnome_pie_clipboard_group_clipboard_item_properties[GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_ICON_PROPERTY] = g_param_spec_string ("icon", "icon", "icon", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_CLIPBOARD_PROPERTY, gnome_pie_clipboard_group_clipboard_item_properties[GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_CLIPBOARD_PROPERTY] = g_param_spec_object ("clipboard", "clipboard", "clipboard", gtk_clipboard_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	_tmp0_ = gnome_pie_key_new_from_string ("<Control>v");
	gnome_pie_clipboard_group_clipboard_item_paste_key = _tmp0_;
}

static void
gnome_pie_clipboard_group_clipboard_item_instance_init (GnomePieClipboardGroupClipboardItem * self,
                                                        gpointer klass)
{
	self->priv = gnome_pie_clipboard_group_clipboard_item_get_instance_private (self);
}

static void
gnome_pie_clipboard_group_clipboard_item_finalize (GObject * obj)
{
	GnomePieClipboardGroupClipboardItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GNOME_PIE_CLIPBOARD_GROUP_TYPE_CLIPBOARD_ITEM, GnomePieClipboardGroupClipboardItem);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_icon);
	_g_object_unref0 (self->priv->_clipboard);
	G_OBJECT_CLASS (gnome_pie_clipboard_group_clipboard_item_parent_class)->finalize (obj);
}

static GType
gnome_pie_clipboard_group_clipboard_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GnomePieClipboardGroupClipboardItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gnome_pie_clipboard_group_clipboard_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GnomePieClipboardGroupClipboardItem), 0, (GInstanceInitFunc) gnome_pie_clipboard_group_clipboard_item_instance_init, NULL };
	GType gnome_pie_clipboard_group_clipboard_item_type_id;
	gnome_pie_clipboard_group_clipboard_item_type_id = g_type_register_static (G_TYPE_OBJECT, "GnomePieClipboardGroupClipboardItem", &g_define_type_info, 0);
	GnomePieClipboardGroupClipboardItem_private_offset = g_type_add_instance_private (gnome_pie_clipboard_group_clipboard_item_type_id, sizeof (GnomePieClipboardGroupClipboardItemPrivate));
	return gnome_pie_clipboard_group_clipboard_item_type_id;
}

static GType
gnome_pie_clipboard_group_clipboard_item_get_type (void)
{
	static volatile gsize gnome_pie_clipboard_group_clipboard_item_type_id__once = 0;
	if (g_once_init_enter (&gnome_pie_clipboard_group_clipboard_item_type_id__once)) {
		GType gnome_pie_clipboard_group_clipboard_item_type_id;
		gnome_pie_clipboard_group_clipboard_item_type_id = gnome_pie_clipboard_group_clipboard_item_get_type_once ();
		g_once_init_leave (&gnome_pie_clipboard_group_clipboard_item_type_id__once, gnome_pie_clipboard_group_clipboard_item_type_id);
	}
	return gnome_pie_clipboard_group_clipboard_item_type_id__once;
}

static void
_vala_gnome_pie_clipboard_group_clipboard_item_get_property (GObject * object,
                                                             guint property_id,
                                                             GValue * value,
                                                             GParamSpec * pspec)
{
	GnomePieClipboardGroupClipboardItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GNOME_PIE_CLIPBOARD_GROUP_TYPE_CLIPBOARD_ITEM, GnomePieClipboardGroupClipboardItem);
	switch (property_id) {
		case GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_NAME_PROPERTY:
		g_value_set_string (value, gnome_pie_clipboard_group_clipboard_item_get_name (self));
		break;
		case GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_ICON_PROPERTY:
		g_value_set_string (value, gnome_pie_clipboard_group_clipboard_item_get_icon (self));
		break;
		case GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_CLIPBOARD_PROPERTY:
		g_value_set_object (value, gnome_pie_clipboard_group_clipboard_item_get_clipboard (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gnome_pie_clipboard_group_clipboard_item_set_property (GObject * object,
                                                             guint property_id,
                                                             const GValue * value,
                                                             GParamSpec * pspec)
{
	GnomePieClipboardGroupClipboardItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GNOME_PIE_CLIPBOARD_GROUP_TYPE_CLIPBOARD_ITEM, GnomePieClipboardGroupClipboardItem);
	switch (property_id) {
		case GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_NAME_PROPERTY:
		gnome_pie_clipboard_group_clipboard_item_set_name (self, g_value_get_string (value));
		break;
		case GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_ICON_PROPERTY:
		gnome_pie_clipboard_group_clipboard_item_set_icon (self, g_value_get_string (value));
		break;
		case GNOME_PIE_CLIPBOARD_GROUP_CLIPBOARD_ITEM_CLIPBOARD_PROPERTY:
		gnome_pie_clipboard_group_clipboard_item_set_clipboard (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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, -1);
	g_return_val_if_fail (needle != NULL, -1);
	_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 GnomePieClipboardGroupTextClipboardItem*
gnome_pie_clipboard_group_text_clipboard_item_construct (GType object_type,
                                                         GtkClipboard* clipboard)
{
	GnomePieClipboardGroupTextClipboardItem * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* first_line = NULL;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	GFile* file = NULL;
	const gchar* _tmp7_;
	GFile* _tmp8_;
	GFile* _tmp9_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (clipboard != NULL, NULL);
	_tmp0_ = gtk_clipboard_wait_for_text (clipboard);
	_tmp1_ = _tmp0_;
	self = (GnomePieClipboardGroupTextClipboardItem*) g_object_new (object_type, "clipboard", clipboard, "name", _tmp1_, "icon", "edit-paste", NULL);
	_g_free0 (_tmp1_);
	_tmp2_ = gnome_pie_clipboard_group_clipboard_item_get_name ((GnomePieClipboardGroupClipboardItem*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = gnome_pie_clipboard_group_clipboard_item_get_name ((GnomePieClipboardGroupClipboardItem*) self);
	_tmp5_ = _tmp4_;
	_tmp6_ = string_substring (_tmp3_, (glong) 0, (glong) string_index_of (_tmp5_, "\n", 0));
	first_line = _tmp6_;
	_tmp7_ = first_line;
	_tmp8_ = g_file_new_for_path (_tmp7_);
	file = _tmp8_;
	_tmp9_ = file;
	if (g_file_query_exists (_tmp9_, NULL)) {
		{
			GFileInfo* info = NULL;
			GFile* _tmp10_;
			GFileInfo* _tmp11_;
			GFileInfo* _tmp12_;
			GIcon* _tmp13_;
			gchar* _tmp14_;
			gchar* _tmp15_;
			_tmp10_ = file;
			_tmp11_ = g_file_query_info (_tmp10_, "standard::icon", 0, NULL, &_inner_error0_);
			info = _tmp11_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_tmp12_ = info;
			_tmp13_ = g_file_info_get_icon (_tmp12_);
			_tmp14_ = g_icon_to_string (_tmp13_);
			_tmp15_ = _tmp14_;
			gnome_pie_clipboard_group_clipboard_item_set_icon ((GnomePieClipboardGroupClipboardItem*) self, _tmp15_);
			_g_free0 (_tmp15_);
			_g_object_unref0 (info);
		}
		goto __finally0;
		__catch0_g_error:
		{
			g_clear_error (&_inner_error0_);
			g_warning ("clipboardGroup.vala:64: Failed to generate icon for ClipboardGroupItem" \
".");
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (file);
			_g_free0 (first_line);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	_g_object_unref0 (file);
	_g_free0 (first_line);
	return self;
}

static GnomePieClipboardGroupTextClipboardItem*
gnome_pie_clipboard_group_text_clipboard_item_new (GtkClipboard* clipboard)
{
	return gnome_pie_clipboard_group_text_clipboard_item_construct (GNOME_PIE_CLIPBOARD_GROUP_TYPE_TEXT_CLIPBOARD_ITEM, clipboard);
}

static void
gnome_pie_clipboard_group_text_clipboard_item_real_paste (GnomePieClipboardGroupClipboardItem* base)
{
	GnomePieClipboardGroupTextClipboardItem * self;
	GtkClipboard* _tmp0_;
	GtkClipboard* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	GnomePieKey* _tmp8_;
	self = (GnomePieClipboardGroupTextClipboardItem*) base;
	_tmp0_ = gnome_pie_clipboard_group_clipboard_item_get_clipboard ((GnomePieClipboardGroupClipboardItem*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = gnome_pie_clipboard_group_clipboard_item_get_name ((GnomePieClipboardGroupClipboardItem*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = gnome_pie_clipboard_group_clipboard_item_get_name ((GnomePieClipboardGroupClipboardItem*) self);
	_tmp5_ = _tmp4_;
	_tmp6_ = strlen (_tmp5_);
	_tmp7_ = _tmp6_;
	gtk_clipboard_set_text (_tmp1_, _tmp3_, _tmp7_);
	_tmp8_ = gnome_pie_clipboard_group_clipboard_item_paste_key;
	gnome_pie_key_press (_tmp8_);
}

static void
gnome_pie_clipboard_group_text_clipboard_item_class_init (GnomePieClipboardGroupTextClipboardItemClass * klass,
                                                          gpointer klass_data)
{
	gnome_pie_clipboard_group_text_clipboard_item_parent_class = g_type_class_peek_parent (klass);
	((GnomePieClipboardGroupClipboardItemClass *) klass)->paste = (void (*) (GnomePieClipboardGroupClipboardItem*)) gnome_pie_clipboard_group_text_clipboard_item_real_paste;
}

static void
gnome_pie_clipboard_group_text_clipboard_item_instance_init (GnomePieClipboardGroupTextClipboardItem * self,
                                                             gpointer klass)
{
}

static GType
gnome_pie_clipboard_group_text_clipboard_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GnomePieClipboardGroupTextClipboardItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gnome_pie_clipboard_group_text_clipboard_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GnomePieClipboardGroupTextClipboardItem), 0, (GInstanceInitFunc) gnome_pie_clipboard_group_text_clipboard_item_instance_init, NULL };
	GType gnome_pie_clipboard_group_text_clipboard_item_type_id;
	gnome_pie_clipboard_group_text_clipboard_item_type_id = g_type_register_static (GNOME_PIE_CLIPBOARD_GROUP_TYPE_CLIPBOARD_ITEM, "GnomePieClipboardGroupTextClipboardItem", &g_define_type_info, 0);
	return gnome_pie_clipboard_group_text_clipboard_item_type_id;
}

static GType
gnome_pie_clipboard_group_text_clipboard_item_get_type (void)
{
	static volatile gsize gnome_pie_clipboard_group_text_clipboard_item_type_id__once = 0;
	if (g_once_init_enter (&gnome_pie_clipboard_group_text_clipboard_item_type_id__once)) {
		GType gnome_pie_clipboard_group_text_clipboard_item_type_id;
		gnome_pie_clipboard_group_text_clipboard_item_type_id = gnome_pie_clipboard_group_text_clipboard_item_get_type_once ();
		g_once_init_leave (&gnome_pie_clipboard_group_text_clipboard_item_type_id__once, gnome_pie_clipboard_group_text_clipboard_item_type_id);
	}
	return gnome_pie_clipboard_group_text_clipboard_item_type_id__once;
}

static inline gpointer
gnome_pie_clipboard_group_image_clipboard_item_get_instance_private (GnomePieClipboardGroupImageClipboardItem* self)
{
	return G_STRUCT_MEMBER_P (self, GnomePieClipboardGroupImageClipboardItem_private_offset);
}

static GnomePieClipboardGroupImageClipboardItem*
gnome_pie_clipboard_group_image_clipboard_item_construct (GType object_type,
                                                          GtkClipboard* clipboard)
{
	GnomePieClipboardGroupImageClipboardItem * self = NULL;
	GdkPixbuf* _tmp0_;
	GdkPixbuf* _tmp1_;
	g_return_val_if_fail (clipboard != NULL, NULL);
	self = (GnomePieClipboardGroupImageClipboardItem*) g_object_new (object_type, "clipboard", clipboard, "name", _ ("Image data"), "icon", "image-viewer", NULL);
	_tmp0_ = gtk_clipboard_wait_for_image (clipboard);
	_tmp1_ = _tmp0_;
	gnome_pie_clipboard_group_image_clipboard_item_set_image (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	return self;
}

static GnomePieClipboardGroupImageClipboardItem*
gnome_pie_clipboard_group_image_clipboard_item_new (GtkClipboard* clipboard)
{
	return gnome_pie_clipboard_group_image_clipboard_item_construct (GNOME_PIE_CLIPBOARD_GROUP_TYPE_IMAGE_CLIPBOARD_ITEM, clipboard);
}

static void
gnome_pie_clipboard_group_image_clipboard_item_real_paste (GnomePieClipboardGroupClipboardItem* base)
{
	GnomePieClipboardGroupImageClipboardItem * self;
	GtkClipboard* _tmp0_;
	GtkClipboard* _tmp1_;
	GdkPixbuf* _tmp2_;
	GnomePieKey* _tmp3_;
	self = (GnomePieClipboardGroupImageClipboardItem*) base;
	_tmp0_ = gnome_pie_clipboard_group_clipboard_item_get_clipboard ((GnomePieClipboardGroupClipboardItem*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_image;
	gtk_clipboard_set_image (_tmp1_, _tmp2_);
	_tmp3_ = gnome_pie_clipboard_group_clipboard_item_paste_key;
	gnome_pie_key_press (_tmp3_);
}

static GdkPixbuf*
gnome_pie_clipboard_group_image_clipboard_item_get_image (GnomePieClipboardGroupImageClipboardItem* self)
{
	GdkPixbuf* result;
	GdkPixbuf* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_image;
	result = _tmp0_;
	return result;
}

static void
gnome_pie_clipboard_group_image_clipboard_item_set_image (GnomePieClipboardGroupImageClipboardItem* self,
                                                          GdkPixbuf* value)
{
	GdkPixbuf* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_image);
	self->priv->_image = _tmp0_;
}

static void
gnome_pie_clipboard_group_image_clipboard_item_class_init (GnomePieClipboardGroupImageClipboardItemClass * klass,
                                                           gpointer klass_data)
{
	gnome_pie_clipboard_group_image_clipboard_item_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GnomePieClipboardGroupImageClipboardItem_private_offset);
	((GnomePieClipboardGroupClipboardItemClass *) klass)->paste = (void (*) (GnomePieClipboardGroupClipboardItem*)) gnome_pie_clipboard_group_image_clipboard_item_real_paste;
	G_OBJECT_CLASS (klass)->get_property = _vala_gnome_pie_clipboard_group_image_clipboard_item_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gnome_pie_clipboard_group_image_clipboard_item_set_property;
	G_OBJECT_CLASS (klass)->finalize = gnome_pie_clipboard_group_image_clipboard_item_finalize;
}

static void
gnome_pie_clipboard_group_image_clipboard_item_instance_init (GnomePieClipboardGroupImageClipboardItem * self,
                                                              gpointer klass)
{
	self->priv = gnome_pie_clipboard_group_image_clipboard_item_get_instance_private (self);
}

static void
gnome_pie_clipboard_group_image_clipboard_item_finalize (GObject * obj)
{
	GnomePieClipboardGroupImageClipboardItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GNOME_PIE_CLIPBOARD_GROUP_TYPE_IMAGE_CLIPBOARD_ITEM, GnomePieClipboardGroupImageClipboardItem);
	_g_object_unref0 (self->priv->_image);
	G_OBJECT_CLASS (gnome_pie_clipboard_group_image_clipboard_item_parent_class)->finalize (obj);
}

static GType
gnome_pie_clipboard_group_image_clipboard_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GnomePieClipboardGroupImageClipboardItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gnome_pie_clipboard_group_image_clipboard_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GnomePieClipboardGroupImageClipboardItem), 0, (GInstanceInitFunc) gnome_pie_clipboard_group_image_clipboard_item_instance_init, NULL };
	GType gnome_pie_clipboard_group_image_clipboard_item_type_id;
	gnome_pie_clipboard_group_image_clipboard_item_type_id = g_type_register_static (GNOME_PIE_CLIPBOARD_GROUP_TYPE_CLIPBOARD_ITEM, "GnomePieClipboardGroupImageClipboardItem", &g_define_type_info, 0);
	GnomePieClipboardGroupImageClipboardItem_private_offset = g_type_add_instance_private (gnome_pie_clipboard_group_image_clipboard_item_type_id, sizeof (GnomePieClipboardGroupImageClipboardItemPrivate));
	return gnome_pie_clipboard_group_image_clipboard_item_type_id;
}

static GType
gnome_pie_clipboard_group_image_clipboard_item_get_type (void)
{
	static volatile gsize gnome_pie_clipboard_group_image_clipboard_item_type_id__once = 0;
	if (g_once_init_enter (&gnome_pie_clipboard_group_image_clipboard_item_type_id__once)) {
		GType gnome_pie_clipboard_group_image_clipboard_item_type_id;
		gnome_pie_clipboard_group_image_clipboard_item_type_id = gnome_pie_clipboard_group_image_clipboard_item_get_type_once ();
		g_once_init_leave (&gnome_pie_clipboard_group_image_clipboard_item_type_id__once, gnome_pie_clipboard_group_image_clipboard_item_type_id);
	}
	return gnome_pie_clipboard_group_image_clipboard_item_type_id__once;
}

static void
_vala_gnome_pie_clipboard_group_image_clipboard_item_get_property (GObject * object,
                                                                   guint property_id,
                                                                   GValue * value,
                                                                   GParamSpec * pspec)
{
	GnomePieClipboardGroupImageClipboardItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GNOME_PIE_CLIPBOARD_GROUP_TYPE_IMAGE_CLIPBOARD_ITEM, GnomePieClipboardGroupImageClipboardItem);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gnome_pie_clipboard_group_image_clipboard_item_set_property (GObject * object,
                                                                   guint property_id,
                                                                   const GValue * value,
                                                                   GParamSpec * pspec)
{
	GnomePieClipboardGroupImageClipboardItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GNOME_PIE_CLIPBOARD_GROUP_TYPE_IMAGE_CLIPBOARD_ITEM, GnomePieClipboardGroupImageClipboardItem);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_gnome_pie_clipboard_group_on_change_gtk_clipboard_owner_change (GtkClipboard* _sender,
                                                                 GdkEventOwnerChange* event,
                                                                 gpointer self)
{
	gnome_pie_clipboard_group_on_change ((GnomePieClipboardGroup*) self);
}

static GObject *
gnome_pie_clipboard_group_constructor (GType type,
                                       guint n_construct_properties,
                                       GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GnomePieClipboardGroup * self;
	GeeArrayList* _tmp0_;
	GtkClipboard* _tmp1_;
	GtkClipboard* _tmp2_;
	GtkClipboard* _tmp3_;
	parent_class = G_OBJECT_CLASS (gnome_pie_clipboard_group_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GNOME_PIE_TYPE_CLIPBOARD_GROUP, GnomePieClipboardGroup);
	_tmp0_ = gee_array_list_new (GNOME_PIE_CLIPBOARD_GROUP_TYPE_CLIPBOARD_ITEM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->items);
	self->priv->items = _tmp0_;
	_tmp1_ = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (self->priv->clipboard);
	self->priv->clipboard = _tmp2_;
	_tmp3_ = self->priv->clipboard;
	g_signal_connect_object (_tmp3_, "owner-change", (GCallback) _gnome_pie_clipboard_group_on_change_gtk_clipboard_owner_change, self, 0);
	return obj;
}

static void
gnome_pie_clipboard_group_class_init (GnomePieClipboardGroupClass * klass,
                                      gpointer klass_data)
{
	gnome_pie_clipboard_group_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GnomePieClipboardGroup_private_offset);
	((GnomePieActionGroupClass *) klass)->on_save = (void (*) (GnomePieActionGroup*, xmlTextWriter*)) gnome_pie_clipboard_group_real_on_save;
	((GnomePieActionGroupClass *) klass)->on_load = (void (*) (GnomePieActionGroup*, xmlNode*)) gnome_pie_clipboard_group_real_on_load;
	G_OBJECT_CLASS (klass)->get_property = _vala_gnome_pie_clipboard_group_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gnome_pie_clipboard_group_set_property;
	G_OBJECT_CLASS (klass)->constructor = gnome_pie_clipboard_group_constructor;
	G_OBJECT_CLASS (klass)->finalize = gnome_pie_clipboard_group_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_CLIPBOARD_GROUP_MAX_ITEMS_PROPERTY, gnome_pie_clipboard_group_properties[GNOME_PIE_CLIPBOARD_GROUP_MAX_ITEMS_PROPERTY] = g_param_spec_int ("max-items", "max-items", "max-items", G_MININT, G_MAXINT, 8, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
gnome_pie_clipboard_group_instance_init (GnomePieClipboardGroup * self,
                                         gpointer klass)
{
	self->priv = gnome_pie_clipboard_group_get_instance_private (self);
	self->priv->_max_items = 8;
	self->priv->ignore_next_change = FALSE;
}

static void
gnome_pie_clipboard_group_finalize (GObject * obj)
{
	GnomePieClipboardGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GNOME_PIE_TYPE_CLIPBOARD_GROUP, GnomePieClipboardGroup);
	_g_object_unref0 (self->priv->clipboard);
	_g_object_unref0 (self->priv->items);
	G_OBJECT_CLASS (gnome_pie_clipboard_group_parent_class)->finalize (obj);
}

static GType
gnome_pie_clipboard_group_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GnomePieClipboardGroupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gnome_pie_clipboard_group_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GnomePieClipboardGroup), 0, (GInstanceInitFunc) gnome_pie_clipboard_group_instance_init, NULL };
	GType gnome_pie_clipboard_group_type_id;
	gnome_pie_clipboard_group_type_id = g_type_register_static (GNOME_PIE_TYPE_ACTION_GROUP, "GnomePieClipboardGroup", &g_define_type_info, 0);
	GnomePieClipboardGroup_private_offset = g_type_add_instance_private (gnome_pie_clipboard_group_type_id, sizeof (GnomePieClipboardGroupPrivate));
	return gnome_pie_clipboard_group_type_id;
}

GType
gnome_pie_clipboard_group_get_type (void)
{
	static volatile gsize gnome_pie_clipboard_group_type_id__once = 0;
	if (g_once_init_enter (&gnome_pie_clipboard_group_type_id__once)) {
		GType gnome_pie_clipboard_group_type_id;
		gnome_pie_clipboard_group_type_id = gnome_pie_clipboard_group_get_type_once ();
		g_once_init_leave (&gnome_pie_clipboard_group_type_id__once, gnome_pie_clipboard_group_type_id);
	}
	return gnome_pie_clipboard_group_type_id__once;
}

static void
_vala_gnome_pie_clipboard_group_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec)
{
	GnomePieClipboardGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GNOME_PIE_TYPE_CLIPBOARD_GROUP, GnomePieClipboardGroup);
	switch (property_id) {
		case GNOME_PIE_CLIPBOARD_GROUP_MAX_ITEMS_PROPERTY:
		g_value_set_int (value, gnome_pie_clipboard_group_get_max_items (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gnome_pie_clipboard_group_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec)
{
	GnomePieClipboardGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GNOME_PIE_TYPE_CLIPBOARD_GROUP, GnomePieClipboardGroup);
	switch (property_id) {
		case GNOME_PIE_CLIPBOARD_GROUP_MAX_ITEMS_PROPERTY:
		gnome_pie_clipboard_group_set_max_items (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

