/* collection-view.c generated by valac 0.16.0.2-f2187, the Vala compiler
 * generated from collection-view.vala, do not modify */

/* This file is part of GNOME Boxes. License: LGPLv2+*/

#include <glib.h>
#include <glib-object.h>
#include <clutter/clutter.h>
#include <clutter-gtk/clutter-gtk.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <gdk-pixbuf/gdk-pixbuf.h>


#define BOXES_TYPE_UI (boxes_ui_get_type ())
#define BOXES_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UI, BoxesUI))
#define BOXES_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_UI, BoxesUIClass))
#define BOXES_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_IS_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_UI))
#define BOXES_UI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_UI, BoxesUIClass))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIClass BoxesUIClass;
typedef struct _BoxesUIPrivate BoxesUIPrivate;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())

#define BOXES_TYPE_COLLECTION_VIEW (boxes_collection_view_get_type ())
#define BOXES_COLLECTION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionView))
#define BOXES_COLLECTION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionViewClass))
#define BOXES_IS_COLLECTION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_VIEW))
#define BOXES_IS_COLLECTION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_VIEW))
#define BOXES_COLLECTION_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionViewClass))

typedef struct _BoxesCollectionView BoxesCollectionView;
typedef struct _BoxesCollectionViewClass BoxesCollectionViewClass;
typedef struct _BoxesCollectionViewPrivate BoxesCollectionViewPrivate;

#define BOXES_TYPE_APP (boxes_app_get_type ())
#define BOXES_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP, BoxesApp))
#define BOXES_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP, BoxesAppClass))
#define BOXES_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP))
#define BOXES_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP))
#define BOXES_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP, BoxesAppClass))

typedef struct _BoxesApp BoxesApp;
typedef struct _BoxesAppClass BoxesAppClass;

#define BOXES_TYPE_CATEGORY (boxes_category_get_type ())
#define BOXES_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_CATEGORY, BoxesCategory))
#define BOXES_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_CATEGORY, BoxesCategoryClass))
#define BOXES_IS_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_CATEGORY))
#define BOXES_IS_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_CATEGORY))
#define BOXES_CATEGORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_CATEGORY, BoxesCategoryClass))

typedef struct _BoxesCategory BoxesCategory;
typedef struct _BoxesCategoryClass BoxesCategoryClass;

#define BOXES_COLLECTION_VIEW_TYPE_MODEL_COLUMNS (boxes_collection_view_model_columns_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block4Data Block4Data;
typedef struct _BoxesAppPrivate BoxesAppPrivate;

#define BOXES_TYPE_COLLECTION_ITEM (boxes_collection_item_get_type ())
#define BOXES_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItem))
#define BOXES_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))
#define BOXES_IS_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_IS_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_COLLECTION_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))

typedef struct _BoxesCollectionItem BoxesCollectionItem;
typedef struct _BoxesCollectionItemClass BoxesCollectionItemClass;

#define BOXES_TYPE_TOPBAR (boxes_topbar_get_type ())
#define BOXES_TOPBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_TOPBAR, BoxesTopbar))
#define BOXES_TOPBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_TOPBAR, BoxesTopbarClass))
#define BOXES_IS_TOPBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_TOPBAR))
#define BOXES_IS_TOPBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_TOPBAR))
#define BOXES_TOPBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_TOPBAR, BoxesTopbarClass))

typedef struct _BoxesTopbar BoxesTopbar;
typedef struct _BoxesTopbarClass BoxesTopbarClass;

#define BOXES_TYPE_NOTIFICATIONBAR (boxes_notificationbar_get_type ())
#define BOXES_NOTIFICATIONBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbar))
#define BOXES_NOTIFICATIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbarClass))
#define BOXES_IS_NOTIFICATIONBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_NOTIFICATIONBAR))
#define BOXES_IS_NOTIFICATIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_NOTIFICATIONBAR))
#define BOXES_NOTIFICATIONBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbarClass))

typedef struct _BoxesNotificationbar BoxesNotificationbar;
typedef struct _BoxesNotificationbarClass BoxesNotificationbarClass;

#define BOXES_TYPE_SIDEBAR (boxes_sidebar_get_type ())
#define BOXES_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SIDEBAR, BoxesSidebar))
#define BOXES_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SIDEBAR, BoxesSidebarClass))
#define BOXES_IS_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SIDEBAR))
#define BOXES_IS_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SIDEBAR))
#define BOXES_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SIDEBAR, BoxesSidebarClass))

typedef struct _BoxesSidebar BoxesSidebar;
typedef struct _BoxesSidebarClass BoxesSidebarClass;

#define BOXES_TYPE_SELECTIONBAR (boxes_selectionbar_get_type ())
#define BOXES_SELECTIONBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbar))
#define BOXES_SELECTIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbarClass))
#define BOXES_IS_SELECTIONBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SELECTIONBAR))
#define BOXES_IS_SELECTIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SELECTIONBAR))
#define BOXES_SELECTIONBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbarClass))

typedef struct _BoxesSelectionbar BoxesSelectionbar;
typedef struct _BoxesSelectionbarClass BoxesSelectionbarClass;

#define BOXES_TYPE_WIZARD (boxes_wizard_get_type ())
#define BOXES_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_WIZARD, BoxesWizard))
#define BOXES_WIZARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_WIZARD, BoxesWizardClass))
#define BOXES_IS_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_WIZARD))
#define BOXES_IS_WIZARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_WIZARD))
#define BOXES_WIZARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_WIZARD, BoxesWizardClass))

typedef struct _BoxesWizard BoxesWizard;
typedef struct _BoxesWizardClass BoxesWizardClass;

#define BOXES_TYPE_PROPERTIES (boxes_properties_get_type ())
#define BOXES_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PROPERTIES, BoxesProperties))
#define BOXES_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PROPERTIES, BoxesPropertiesClass))
#define BOXES_IS_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PROPERTIES))
#define BOXES_IS_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PROPERTIES))
#define BOXES_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PROPERTIES, BoxesPropertiesClass))

typedef struct _BoxesProperties BoxesProperties;
typedef struct _BoxesPropertiesClass BoxesPropertiesClass;

#define BOXES_TYPE_DISPLAY_PAGE (boxes_display_page_get_type ())
#define BOXES_DISPLAY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPage))
#define BOXES_DISPLAY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPageClass))
#define BOXES_IS_DISPLAY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DISPLAY_PAGE))
#define BOXES_IS_DISPLAY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DISPLAY_PAGE))
#define BOXES_DISPLAY_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPageClass))

typedef struct _BoxesDisplayPage BoxesDisplayPage;
typedef struct _BoxesDisplayPageClass BoxesDisplayPageClass;

#define BOXES_TYPE_COLLECTION (boxes_collection_get_type ())
#define BOXES_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION, BoxesCollection))
#define BOXES_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION, BoxesCollectionClass))
#define BOXES_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION))
#define BOXES_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION))
#define BOXES_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION, BoxesCollectionClass))

typedef struct _BoxesCollection BoxesCollection;
typedef struct _BoxesCollectionClass BoxesCollectionClass;

#define BOXES_TYPE_MACHINE (boxes_machine_get_type ())
#define BOXES_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MACHINE, BoxesMachine))
#define BOXES_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MACHINE, BoxesMachineClass))
#define BOXES_IS_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MACHINE))
#define BOXES_IS_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MACHINE))
#define BOXES_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MACHINE, BoxesMachineClass))

typedef struct _BoxesMachine BoxesMachine;
typedef struct _BoxesMachineClass BoxesMachineClass;
typedef struct _BoxesCategoryPrivate BoxesCategoryPrivate;

#define BOXES_CATEGORY_TYPE_KIND (boxes_category_kind_get_type ())
typedef struct _BoxesCollectionItemPrivate BoxesCollectionItemPrivate;

#define BOXES_TYPE_IPROPERTIES_PROVIDER (boxes_iproperties_provider_get_type ())
#define BOXES_IPROPERTIES_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_IPROPERTIES_PROVIDER, BoxesIPropertiesProvider))
#define BOXES_IS_IPROPERTIES_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_IPROPERTIES_PROVIDER))
#define BOXES_IPROPERTIES_PROVIDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_IPROPERTIES_PROVIDER, BoxesIPropertiesProviderIface))

typedef struct _BoxesIPropertiesProvider BoxesIPropertiesProvider;
typedef struct _BoxesIPropertiesProviderIface BoxesIPropertiesProviderIface;

#define BOXES_TYPE_PROPERTIES_PAGE (boxes_properties_page_get_type ())

#define BOXES_TYPE_PAIR (boxes_pair_get_type ())
#define BOXES_PAIR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PAIR, BoxesPair))
#define BOXES_PAIR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PAIR, BoxesPairClass))
#define BOXES_IS_PAIR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PAIR))
#define BOXES_IS_PAIR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PAIR))
#define BOXES_PAIR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PAIR, BoxesPairClass))

typedef struct _BoxesPair BoxesPair;
typedef struct _BoxesPairClass BoxesPairClass;
typedef struct _BoxesMachinePrivate BoxesMachinePrivate;

#define BOXES_TYPE_MACHINE_ACTOR (boxes_machine_actor_get_type ())
#define BOXES_MACHINE_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MACHINE_ACTOR, BoxesMachineActor))
#define BOXES_MACHINE_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MACHINE_ACTOR, BoxesMachineActorClass))
#define BOXES_IS_MACHINE_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MACHINE_ACTOR))
#define BOXES_IS_MACHINE_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MACHINE_ACTOR))
#define BOXES_MACHINE_ACTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MACHINE_ACTOR, BoxesMachineActorClass))

typedef struct _BoxesMachineActor BoxesMachineActor;
typedef struct _BoxesMachineActorClass BoxesMachineActorClass;

#define BOXES_TYPE_COLLECTION_SOURCE (boxes_collection_source_get_type ())
#define BOXES_COLLECTION_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSource))
#define BOXES_COLLECTION_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSourceClass))
#define BOXES_IS_COLLECTION_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_SOURCE))
#define BOXES_IS_COLLECTION_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_SOURCE))
#define BOXES_COLLECTION_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSourceClass))

typedef struct _BoxesCollectionSource BoxesCollectionSource;
typedef struct _BoxesCollectionSourceClass BoxesCollectionSourceClass;

#define BOXES_TYPE_DISPLAY_CONFIG (boxes_display_config_get_type ())
#define BOXES_DISPLAY_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DISPLAY_CONFIG, BoxesDisplayConfig))
#define BOXES_DISPLAY_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DISPLAY_CONFIG, BoxesDisplayConfigClass))
#define BOXES_IS_DISPLAY_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DISPLAY_CONFIG))
#define BOXES_IS_DISPLAY_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DISPLAY_CONFIG))
#define BOXES_DISPLAY_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DISPLAY_CONFIG, BoxesDisplayConfigClass))

typedef struct _BoxesDisplayConfig BoxesDisplayConfig;
typedef struct _BoxesDisplayConfigClass BoxesDisplayConfigClass;
typedef struct _Block5Data Block5Data;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _gtk_tree_path_free0(var) ((var == NULL) ? NULL : (var = (gtk_tree_path_free (var), NULL)))
#define __g_list_free__gtk_tree_path_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__gtk_tree_path_free0_ (var), NULL)))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))

typedef enum  {
	BOXES_UI_STATE_NONE,
	BOXES_UI_STATE_COLLECTION,
	BOXES_UI_STATE_CREDS,
	BOXES_UI_STATE_DISPLAY,
	BOXES_UI_STATE_SETTINGS,
	BOXES_UI_STATE_WIZARD,
	BOXES_UI_STATE_PROPERTIES
} BoxesUIState;

struct _BoxesUI {
	GObject parent_instance;
	BoxesUIPrivate * priv;
	BoxesUIState previous_ui_state;
};

struct _BoxesUIClass {
	GObjectClass parent_class;
	void (*ui_state_changed) (BoxesUI* self);
	ClutterActor* (*get_actor) (BoxesUI* self);
};

struct _BoxesCollectionView {
	BoxesUI parent_instance;
	BoxesCollectionViewPrivate * priv;
};

struct _BoxesCollectionViewClass {
	BoxesUIClass parent_class;
};

struct _BoxesCollectionViewPrivate {
	BoxesApp* app;
	GtkClutterActor* gtkactor;
	ClutterBox* over_boxes;
	BoxesCategory* _category;
	GtkIconView* icon_view;
	GtkListStore* model;
};

typedef enum  {
	BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SCREENSHOT,
	BOXES_COLLECTION_VIEW_MODEL_COLUMNS_TITLE,
	BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM
} BoxesCollectionViewModelColumns;

struct _Block4Data {
	int _ref_count_;
	BoxesCollectionView * self;
	BoxesApp* app;
};

struct _BoxesApp {
	BoxesUI parent_instance;
	BoxesAppPrivate * priv;
	GtkApplicationWindow* window;
	GtkNotebook* notebook;
	GtkClutterEmbed* embed;
	ClutterStage* stage;
	ClutterState* state;
	ClutterBox* box;
	BoxesCollectionItem* current_item;
	BoxesTopbar* topbar;
	BoxesNotificationbar* notificationbar;
	BoxesSidebar* sidebar;
	BoxesSelectionbar* selectionbar;
	guint duration;
	GSettings* settings;
	BoxesWizard* wizard;
	BoxesProperties* properties;
	BoxesDisplayPage* display_page;
	BoxesCollection* collection;
	GSimpleAction* action_properties;
	GSimpleAction* action_fullscreen;
};

struct _BoxesAppClass {
	BoxesUIClass parent_class;
};

typedef enum  {
	BOXES_CATEGORY_KIND_USER,
	BOXES_CATEGORY_KIND_NEW,
	BOXES_CATEGORY_KIND_FAVORITES,
	BOXES_CATEGORY_KIND_PRIVATE,
	BOXES_CATEGORY_KIND_SHARED
} BoxesCategoryKind;

struct _BoxesCategory {
	GObject parent_instance;
	BoxesCategoryPrivate * priv;
	gchar* name;
	BoxesCategoryKind kind;
};

struct _BoxesCategoryClass {
	GObjectClass parent_class;
};

struct _BoxesCollectionItem {
	BoxesUI parent_instance;
	BoxesCollectionItemPrivate * priv;
};

struct _BoxesCollectionItemClass {
	BoxesUIClass parent_class;
};

typedef enum  {
	BOXES_PROPERTIES_PAGE_LOGIN,
	BOXES_PROPERTIES_PAGE_SYSTEM,
	BOXES_PROPERTIES_PAGE_DISPLAY,
	BOXES_PROPERTIES_PAGE_DEVICES,
	BOXES_PROPERTIES_PAGE_LAST
} BoxesPropertiesPage;

struct _BoxesIPropertiesProviderIface {
	GTypeInterface parent_iface;
	GList* (*get_properties) (BoxesIPropertiesProvider* self, BoxesPropertiesPage page);
};

struct _BoxesMachine {
	BoxesCollectionItem parent_instance;
	BoxesMachinePrivate * priv;
	BoxesApp* app;
	BoxesMachineActor* machine_actor;
	BoxesCollectionSource* source;
	BoxesDisplayConfig* config;
	gboolean deleted;
};

struct _BoxesMachineClass {
	BoxesCollectionItemClass parent_class;
	gchar* (*get_screenshot_filename) (BoxesMachine* self, const gchar* ext);
	void (*take_screenshot) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*take_screenshot_finish) (BoxesMachine* self, GAsyncResult* _res_, GError** error);
	GList* (*get_properties) (BoxesMachine* self, BoxesPropertiesPage page);
	gchar* (*get_screenshot_prefix) (BoxesMachine* self);
	void (*connect_display) (BoxesMachine* self);
	void (*disconnect_display) (BoxesMachine* self);
	void (*delete) (BoxesMachine* self, gboolean by_user);
};

struct _Block5Data {
	int _ref_count_;
	BoxesCollectionView * self;
	BoxesMachine* machine;
	GtkTreeIter iter;
};


static gpointer boxes_collection_view_parent_class = NULL;

GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_collection_view_get_type (void) G_GNUC_CONST;
GType boxes_app_get_type (void) G_GNUC_CONST;
GType boxes_category_get_type (void) G_GNUC_CONST;
#define BOXES_COLLECTION_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionViewPrivate))
enum  {
	BOXES_COLLECTION_VIEW_DUMMY_PROPERTY,
	BOXES_COLLECTION_VIEW_ACTOR,
	BOXES_COLLECTION_VIEW_CATEGORY,
	BOXES_COLLECTION_VIEW_VISIBLE
};
static GType boxes_collection_view_model_columns_get_type (void) G_GNUC_UNUSED;
BoxesCollectionView* boxes_collection_view_new (BoxesApp* app, BoxesCategory* category);
BoxesCollectionView* boxes_collection_view_construct (GType object_type, BoxesApp* app, BoxesCategory* category);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
BoxesUI* boxes_ui_construct (GType object_type);
void boxes_collection_view_set_category (BoxesCollectionView* self, BoxesCategory* value);
static void boxes_collection_view_setup_view (BoxesCollectionView* self);
static void __lambda42_ (Block4Data* _data4_);
gboolean boxes_app_get_selection_mode (BoxesApp* self);
static void ___lambda42__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
void boxes_collection_view_set_over_boxes (BoxesCollectionView* self, ClutterActor* actor, gboolean center);
void boxes_actor_add (ClutterActor* actor, ClutterContainer* container);
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
GType boxes_topbar_get_type (void) G_GNUC_CONST;
GType boxes_notificationbar_get_type (void) G_GNUC_CONST;
GType boxes_sidebar_get_type (void) G_GNUC_CONST;
GType boxes_selectionbar_get_type (void) G_GNUC_CONST;
GType boxes_wizard_get_type (void) G_GNUC_CONST;
GType boxes_properties_get_type (void) G_GNUC_CONST;
GType boxes_display_page_get_type (void) G_GNUC_CONST;
GType boxes_collection_get_type (void) G_GNUC_CONST;
static void boxes_collection_view_real_ui_state_changed (BoxesUI* base);
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
ClutterActor* boxes_ui_get_actor (BoxesUI* self);
void boxes_actor_remove (ClutterActor* actor);
void boxes_ui_set_ui_state (BoxesUI* self, BoxesUIState value);
void boxes_collection_view_update_item_visible (BoxesCollectionView* self, BoxesCollectionItem* item);
GType boxes_machine_get_type (void) G_GNUC_CONST;
BoxesCategory* boxes_collection_view_get_category (BoxesCollectionView* self);
GType boxes_category_kind_get_type (void) G_GNUC_CONST;
GType boxes_properties_page_get_type (void) G_GNUC_CONST;
gpointer boxes_pair_ref (gpointer instance);
void boxes_pair_unref (gpointer instance);
GParamSpec* boxes_param_spec_pair (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void boxes_value_set_pair (GValue* value, gpointer v_object);
void boxes_value_take_pair (GValue* value, gpointer v_object);
gpointer boxes_value_get_pair (const GValue* value);
GType boxes_pair_get_type (void) G_GNUC_CONST;
GType boxes_iproperties_provider_get_type (void) G_GNUC_CONST;
GType boxes_machine_actor_get_type (void) G_GNUC_CONST;
GType boxes_collection_source_get_type (void) G_GNUC_CONST;
GType boxes_display_config_get_type (void) G_GNUC_CONST;
gchar** boxes_display_config_get_categories (BoxesDisplayConfig* self, int* result_length1);
static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle);
static void boxes_collection_view_append (BoxesCollectionView* self, GdkPixbuf* pixbuf, const gchar* title, BoxesCollectionItem* item, GtkTreeIter* result);
static GtkTreeIter* _gtk_tree_iter_dup (GtkTreeIter* self);
void boxes_collection_view_add_item (BoxesCollectionView* self, BoxesCollectionItem* item);
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (void * _userdata_);
GdkPixbuf* boxes_machine_get_pixbuf (BoxesMachine* self);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
static void __lambda102_ (Block5Data* _data5_);
static void ___lambda102__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
GList* boxes_collection_view_get_selected_items (BoxesCollectionView* self);
static BoxesCollectionItem* boxes_collection_view_get_item_for_path (BoxesCollectionView* self, GtkTreePath* path);
static void _gtk_tree_path_free0_ (gpointer var);
static void _g_list_free__gtk_tree_path_free0_ (GList* self);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
void boxes_collection_view_remove_item (BoxesCollectionView* self, BoxesCollectionItem* item);
static gint __lambda5_ (BoxesCollectionView* self, GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b);
static gint ___lambda5__gtk_tree_iter_compare_func (GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer self);
void boxes_icon_view_activate_on_single_click (GtkIconView* icon_view, gboolean should_activate);
static void __lambda7_ (BoxesCollectionView* self, GtkIconView* view, GtkTreePath* path);
gboolean boxes_app_select_item (BoxesApp* self, BoxesCollectionItem* item);
static void ___lambda7__gtk_icon_view_item_activated (GtkIconView* _sender, GtkTreePath* path, gpointer self);
static void __lambda41_ (BoxesCollectionView* self);
static void ___lambda41__gtk_icon_view_selection_changed (GtkIconView* _sender, gpointer self);
void boxes_collection_view_set_visible (BoxesCollectionView* self, gboolean value);
static void boxes_collection_view_finalize (GObject* obj);
static void _vala_boxes_collection_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_collection_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static GType boxes_collection_view_model_columns_get_type (void) {
	static volatile gsize boxes_collection_view_model_columns_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_collection_view_model_columns_type_id__volatile)) {
		static const GEnumValue values[] = {{BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SCREENSHOT, "BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SCREENSHOT", "screenshot"}, {BOXES_COLLECTION_VIEW_MODEL_COLUMNS_TITLE, "BOXES_COLLECTION_VIEW_MODEL_COLUMNS_TITLE", "title"}, {BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM, "BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM", "item"}, {0, NULL, NULL}};
		GType boxes_collection_view_model_columns_type_id;
		boxes_collection_view_model_columns_type_id = g_enum_register_static ("BoxesCollectionViewModelColumns", values);
		g_once_init_leave (&boxes_collection_view_model_columns_type_id__volatile, boxes_collection_view_model_columns_type_id);
	}
	return boxes_collection_view_model_columns_type_id__volatile;
}


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


static Block4Data* block4_data_ref (Block4Data* _data4_) {
	g_atomic_int_inc (&_data4_->_ref_count_);
	return _data4_;
}


static void block4_data_unref (void * _userdata_) {
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
		BoxesCollectionView * self;
		self = _data4_->self;
		_g_object_unref0 (_data4_->app);
		_g_object_unref0 (self);
		g_slice_free (Block4Data, _data4_);
	}
}


static void __lambda42_ (Block4Data* _data4_) {
	BoxesCollectionView * self;
	GtkSelectionMode _tmp0_ = 0;
	BoxesApp* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GtkSelectionMode _tmp4_;
	GtkSelectionMode mode;
	GtkIconView* _tmp5_;
	self = _data4_->self;
	_tmp1_ = _data4_->app;
	_tmp2_ = boxes_app_get_selection_mode (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		_tmp0_ = GTK_SELECTION_MULTIPLE;
	} else {
		_tmp0_ = GTK_SELECTION_SINGLE;
	}
	_tmp4_ = _tmp0_;
	mode = _tmp4_;
	_tmp5_ = self->priv->icon_view;
	gtk_icon_view_set_selection_mode (_tmp5_, mode);
}


static void ___lambda42__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda42_ (self);
}


BoxesCollectionView* boxes_collection_view_construct (GType object_type, BoxesApp* app, BoxesCategory* category) {
	BoxesCollectionView * self = NULL;
	Block4Data* _data4_;
	BoxesApp* _tmp0_;
	BoxesApp* _tmp1_;
	BoxesApp* _tmp2_;
	BoxesApp* _tmp3_;
	BoxesCategory* _tmp4_;
	BoxesApp* _tmp5_;
	g_return_val_if_fail (app != NULL, NULL);
	g_return_val_if_fail (category != NULL, NULL);
	_data4_ = g_slice_new0 (Block4Data);
	_data4_->_ref_count_ = 1;
	_tmp0_ = app;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_data4_->app = _tmp1_;
	self = (BoxesCollectionView*) boxes_ui_construct (object_type);
	_data4_->self = g_object_ref (self);
	_tmp2_ = _data4_->app;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->priv->app);
	self->priv->app = _tmp3_;
	_tmp4_ = category;
	boxes_collection_view_set_category (self, _tmp4_);
	boxes_collection_view_setup_view (self);
	_tmp5_ = _data4_->app;
	g_signal_connect_data ((GObject*) _tmp5_, "notify::selection-mode", (GCallback) ___lambda42__g_object_notify, block4_data_ref (_data4_), (GClosureNotify) block4_data_unref, 0);
	block4_data_unref (_data4_);
	_data4_ = NULL;
	return self;
}


BoxesCollectionView* boxes_collection_view_new (BoxesApp* app, BoxesCategory* category) {
	return boxes_collection_view_construct (BOXES_TYPE_COLLECTION_VIEW, app, category);
}


void boxes_collection_view_set_over_boxes (BoxesCollectionView* self, ClutterActor* actor, gboolean center) {
	gboolean _tmp0_;
	ClutterBox* _tmp5_;
	BoxesApp* _tmp6_;
	ClutterStage* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (actor != NULL);
	_tmp0_ = center;
	if (_tmp0_) {
		ClutterBox* _tmp1_;
		ClutterActor* _tmp2_;
		_tmp1_ = self->priv->over_boxes;
		_tmp2_ = actor;
		clutter_box_pack (_tmp1_, _tmp2_, "x-align", CLUTTER_BIN_ALIGNMENT_CENTER, "y-align", CLUTTER_BIN_ALIGNMENT_CENTER, NULL);
	} else {
		ClutterBox* _tmp3_;
		ClutterActor* _tmp4_;
		_tmp3_ = self->priv->over_boxes;
		_tmp4_ = actor;
		clutter_box_pack (_tmp3_, _tmp4_, NULL);
	}
	_tmp5_ = self->priv->over_boxes;
	_tmp6_ = self->priv->app;
	_tmp7_ = _tmp6_->stage;
	boxes_actor_add ((ClutterActor*) _tmp5_, (ClutterContainer*) _tmp7_);
}


static void boxes_collection_view_real_ui_state_changed (BoxesUI* base) {
	BoxesCollectionView * self;
	BoxesUIState _tmp0_;
	BoxesUIState _tmp1_;
	BoxesApp* _tmp74_;
	BoxesCollectionItem* _tmp75_;
	self = (BoxesCollectionView*) base;
	_tmp0_ = boxes_ui_get_ui_state ((BoxesUI*) self);
	_tmp1_ = _tmp0_;
	switch (_tmp1_) {
		case BOXES_UI_STATE_COLLECTION:
		{
			ClutterActor* _tmp2_;
			ClutterActor* _tmp3_;
			GtkIconView* _tmp4_;
			BoxesApp* _tmp5_;
			BoxesWizard* _tmp6_;
			ClutterActor* _tmp7_;
			ClutterActor* _tmp8_;
			ClutterBox* _tmp9_;
			BoxesApp* _tmp10_;
			BoxesCollectionItem* _tmp11_;
			_tmp2_ = boxes_ui_get_actor ((BoxesUI*) self);
			_tmp3_ = _tmp2_;
			clutter_actor_show (_tmp3_);
			_tmp4_ = self->priv->icon_view;
			g_signal_emit_by_name (_tmp4_, "unselect-all");
			_tmp5_ = self->priv->app;
			_tmp6_ = _tmp5_->wizard;
			_tmp7_ = boxes_ui_get_actor ((BoxesUI*) _tmp6_);
			_tmp8_ = _tmp7_;
			boxes_actor_remove (_tmp8_);
			_tmp9_ = self->priv->over_boxes;
			boxes_actor_remove ((ClutterActor*) _tmp9_);
			_tmp10_ = self->priv->app;
			_tmp11_ = _tmp10_->current_item;
			if (_tmp11_ != NULL) {
				BoxesApp* _tmp12_;
				BoxesCollectionItem* _tmp13_;
				ClutterActor* _tmp14_;
				ClutterActor* _tmp15_;
				_tmp12_ = self->priv->app;
				_tmp13_ = _tmp12_->current_item;
				_tmp14_ = boxes_ui_get_actor ((BoxesUI*) _tmp13_);
				_tmp15_ = _tmp14_;
				boxes_actor_remove (_tmp15_);
			}
			break;
		}
		case BOXES_UI_STATE_CREDS:
		{
			BoxesApp* _tmp16_;
			BoxesCollectionItem* _tmp17_;
			ClutterActor* _tmp18_;
			ClutterActor* _tmp19_;
			_tmp16_ = self->priv->app;
			_tmp17_ = _tmp16_->current_item;
			_tmp18_ = boxes_ui_get_actor ((BoxesUI*) _tmp17_);
			_tmp19_ = _tmp18_;
			boxes_collection_view_set_over_boxes (self, _tmp19_, TRUE);
			break;
		}
		case BOXES_UI_STATE_DISPLAY:
		{
			{
				gfloat x = 0.0F;
				gfloat y = 0.0F;
				BoxesApp* _tmp20_;
				BoxesCollectionItem* _tmp21_;
				ClutterActor* _tmp22_;
				ClutterActor* _tmp23_;
				ClutterActor* _tmp24_;
				ClutterActor* display;
				ClutterActor* _tmp25_;
				ClutterActor* _tmp26_;
				BoxesApp* _tmp27_;
				BoxesProperties* _tmp28_;
				ClutterActor* _tmp29_;
				ClutterActor* _tmp30_;
				BoxesUIState _tmp31_;
				_tmp20_ = self->priv->app;
				_tmp21_ = _tmp20_->current_item;
				_tmp22_ = boxes_ui_get_actor ((BoxesUI*) _tmp21_);
				_tmp23_ = _tmp22_;
				_tmp24_ = _g_object_ref0 (_tmp23_);
				display = _tmp24_;
				_tmp25_ = boxes_ui_get_actor ((BoxesUI*) self);
				_tmp26_ = _tmp25_;
				clutter_actor_hide (_tmp26_);
				_tmp27_ = self->priv->app;
				_tmp28_ = _tmp27_->properties;
				_tmp29_ = boxes_ui_get_actor ((BoxesUI*) _tmp28_);
				_tmp30_ = _tmp29_;
				boxes_actor_remove (_tmp30_);
				_tmp31_ = ((BoxesUI*) self)->previous_ui_state;
				if (_tmp31_ == BOXES_UI_STATE_CREDS) {
					ClutterActor* _tmp32_;
					gfloat _tmp33_ = 0.0F;
					gfloat _tmp34_ = 0.0F;
					ClutterActor* _tmp35_;
					ClutterActor* _tmp36_;
					BoxesApp* _tmp37_;
					ClutterStage* _tmp38_;
					ClutterActor* _tmp39_;
					gfloat _tmp40_;
					gfloat _tmp41_;
					_tmp32_ = display;
					clutter_actor_get_transformed_position (_tmp32_, &_tmp33_, &_tmp34_);
					x = _tmp33_;
					y = _tmp34_;
					_tmp35_ = display;
					boxes_actor_remove (_tmp35_);
					_tmp36_ = display;
					_tmp37_ = self->priv->app;
					_tmp38_ = _tmp37_->stage;
					boxes_actor_add (_tmp36_, (ClutterContainer*) _tmp38_);
					_tmp39_ = display;
					_tmp40_ = x;
					_tmp41_ = y;
					clutter_actor_set_position (_tmp39_, _tmp40_, _tmp41_);
				}
				_g_object_unref0 (display);
				break;
			}
		}
		case BOXES_UI_STATE_WIZARD:
		{
			BoxesApp* _tmp42_;
			BoxesCollectionItem* _tmp43_;
			BoxesApp* _tmp48_;
			BoxesWizard* _tmp49_;
			ClutterActor* _tmp50_;
			ClutterActor* _tmp51_;
			ClutterBox* _tmp52_;
			ClutterBindConstraint* _tmp53_;
			ClutterBindConstraint* _tmp54_;
			BoxesApp* _tmp55_;
			BoxesWizard* _tmp56_;
			ClutterActor* _tmp57_;
			ClutterActor* _tmp58_;
			_tmp42_ = self->priv->app;
			_tmp43_ = _tmp42_->current_item;
			if (_tmp43_ != NULL) {
				BoxesApp* _tmp44_;
				BoxesCollectionItem* _tmp45_;
				ClutterActor* _tmp46_;
				ClutterActor* _tmp47_;
				_tmp44_ = self->priv->app;
				_tmp45_ = _tmp44_->current_item;
				_tmp46_ = boxes_ui_get_actor ((BoxesUI*) _tmp45_);
				_tmp47_ = _tmp46_;
				boxes_actor_remove (_tmp47_);
			}
			_tmp48_ = self->priv->app;
			_tmp49_ = _tmp48_->wizard;
			_tmp50_ = boxes_ui_get_actor ((BoxesUI*) _tmp49_);
			_tmp51_ = _tmp50_;
			_tmp52_ = self->priv->over_boxes;
			_tmp53_ = (ClutterBindConstraint*) clutter_bind_constraint_new ((ClutterActor*) _tmp52_, CLUTTER_BIND_SIZE, (gfloat) 0);
			_tmp54_ = g_object_ref_sink (_tmp53_);
			clutter_actor_add_constraint (_tmp51_, (ClutterConstraint*) _tmp54_);
			_g_object_unref0 (_tmp54_);
			_tmp55_ = self->priv->app;
			_tmp56_ = _tmp55_->wizard;
			_tmp57_ = boxes_ui_get_actor ((BoxesUI*) _tmp56_);
			_tmp58_ = _tmp57_;
			boxes_collection_view_set_over_boxes (self, _tmp58_, FALSE);
			break;
		}
		case BOXES_UI_STATE_PROPERTIES:
		{
			BoxesApp* _tmp59_;
			BoxesCollectionItem* _tmp60_;
			ClutterActor* _tmp61_;
			ClutterActor* _tmp62_;
			BoxesApp* _tmp63_;
			BoxesProperties* _tmp64_;
			ClutterActor* _tmp65_;
			ClutterActor* _tmp66_;
			ClutterBox* _tmp67_;
			ClutterBindConstraint* _tmp68_;
			ClutterBindConstraint* _tmp69_;
			BoxesApp* _tmp70_;
			BoxesProperties* _tmp71_;
			ClutterActor* _tmp72_;
			ClutterActor* _tmp73_;
			_tmp59_ = self->priv->app;
			_tmp60_ = _tmp59_->current_item;
			_tmp61_ = boxes_ui_get_actor ((BoxesUI*) _tmp60_);
			_tmp62_ = _tmp61_;
			boxes_actor_remove (_tmp62_);
			_tmp63_ = self->priv->app;
			_tmp64_ = _tmp63_->properties;
			_tmp65_ = boxes_ui_get_actor ((BoxesUI*) _tmp64_);
			_tmp66_ = _tmp65_;
			_tmp67_ = self->priv->over_boxes;
			_tmp68_ = (ClutterBindConstraint*) clutter_bind_constraint_new ((ClutterActor*) _tmp67_, CLUTTER_BIND_SIZE, (gfloat) 0);
			_tmp69_ = g_object_ref_sink (_tmp68_);
			clutter_actor_add_constraint (_tmp66_, (ClutterConstraint*) _tmp69_);
			_g_object_unref0 (_tmp69_);
			_tmp70_ = self->priv->app;
			_tmp71_ = _tmp70_->properties;
			_tmp72_ = boxes_ui_get_actor ((BoxesUI*) _tmp71_);
			_tmp73_ = _tmp72_;
			boxes_collection_view_set_over_boxes (self, _tmp73_, FALSE);
			break;
		}
		default:
		{
			break;
		}
	}
	_tmp74_ = self->priv->app;
	_tmp75_ = _tmp74_->current_item;
	if (_tmp75_ != NULL) {
		BoxesApp* _tmp76_;
		BoxesCollectionItem* _tmp77_;
		BoxesUIState _tmp78_;
		BoxesUIState _tmp79_;
		_tmp76_ = self->priv->app;
		_tmp77_ = _tmp76_->current_item;
		_tmp78_ = boxes_ui_get_ui_state ((BoxesUI*) self);
		_tmp79_ = _tmp78_;
		boxes_ui_set_ui_state ((BoxesUI*) _tmp77_, _tmp79_);
	}
}


static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle) {
	int i;
	for (i = 0; i < stack_length; i++) {
		if (g_strcmp0 (stack[i], needle) == 0) {
			return TRUE;
		}
	}
	return FALSE;
}


void boxes_collection_view_update_item_visible (BoxesCollectionView* self, BoxesCollectionItem* item) {
	gboolean visible;
	BoxesCollectionItem* _tmp0_;
	BoxesCollectionItem* _tmp14_;
	ClutterActor* _tmp15_;
	ClutterActor* _tmp16_;
	gboolean _tmp17_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	visible = FALSE;
	_tmp0_ = item;
	if (BOXES_IS_MACHINE (_tmp0_)) {
		BoxesCollectionItem* _tmp1_;
		BoxesMachine* _tmp2_;
		BoxesMachine* machine;
		BoxesCategory* _tmp3_;
		BoxesCategory* _tmp4_;
		BoxesCategoryKind _tmp5_;
		_tmp1_ = item;
		_tmp2_ = _g_object_ref0 (BOXES_IS_MACHINE (_tmp1_) ? ((BoxesMachine*) _tmp1_) : NULL);
		machine = _tmp2_;
		_tmp3_ = boxes_collection_view_get_category (self);
		_tmp4_ = _tmp3_;
		_tmp5_ = _tmp4_->kind;
		switch (_tmp5_) {
			case BOXES_CATEGORY_KIND_USER:
			{
				BoxesCategory* _tmp6_;
				BoxesCategory* _tmp7_;
				const gchar* _tmp8_;
				BoxesMachine* _tmp9_;
				BoxesDisplayConfig* _tmp10_;
				gchar** _tmp11_;
				gint _tmp11__length1;
				gchar** _tmp12_;
				gint _tmp12__length1;
				gchar** _tmp13_;
				gint _tmp13__length1;
				_tmp6_ = boxes_collection_view_get_category (self);
				_tmp7_ = _tmp6_;
				_tmp8_ = _tmp7_->name;
				_tmp9_ = machine;
				_tmp10_ = _tmp9_->config;
				_tmp11_ = boxes_display_config_get_categories (_tmp10_, &_tmp11__length1);
				_tmp12_ = _tmp11_;
				_tmp12__length1 = _tmp11__length1;
				_tmp13_ = _tmp12_;
				_tmp13__length1 = _tmp12__length1;
				visible = _vala_string_array_contains (_tmp13_, _tmp12__length1, _tmp8_);
				_tmp13_ = (_vala_array_free (_tmp13_, _tmp13__length1, (GDestroyNotify) g_free), NULL);
				break;
			}
			case BOXES_CATEGORY_KIND_NEW:
			{
				visible = TRUE;
				break;
			}
			default:
			break;
		}
		_g_object_unref0 (machine);
	}
	_tmp14_ = item;
	_tmp15_ = boxes_ui_get_actor ((BoxesUI*) _tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = visible;
	g_object_set (_tmp16_, "visible", _tmp17_, NULL);
}


static GtkTreeIter* _gtk_tree_iter_dup (GtkTreeIter* self) {
	GtkTreeIter* dup;
	dup = g_new0 (GtkTreeIter, 1);
	memcpy (dup, self, sizeof (GtkTreeIter));
	return dup;
}


static gpointer __gtk_tree_iter_dup0 (gpointer self) {
	return self ? _gtk_tree_iter_dup (self) : NULL;
}


static void boxes_collection_view_append (BoxesCollectionView* self, GdkPixbuf* pixbuf, const gchar* title, BoxesCollectionItem* item, GtkTreeIter* result) {
	GtkTreeIter iter = {0};
	GtkListStore* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	GtkListStore* _tmp2_;
	GtkTreeIter _tmp3_;
	GdkPixbuf* _tmp4_;
	GtkListStore* _tmp5_;
	GtkTreeIter _tmp6_;
	const gchar* _tmp7_;
	GtkListStore* _tmp8_;
	GtkTreeIter _tmp9_;
	BoxesCollectionItem* _tmp10_;
	BoxesCollectionItem* _tmp11_;
	GtkTreeIter _tmp12_;
	GtkTreeIter* _tmp13_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (pixbuf != NULL);
	g_return_if_fail (title != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->model;
	gtk_list_store_append (_tmp0_, &_tmp1_);
	iter = _tmp1_;
	_tmp2_ = self->priv->model;
	_tmp3_ = iter;
	_tmp4_ = pixbuf;
	gtk_list_store_set (_tmp2_, &_tmp3_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SCREENSHOT, _tmp4_, -1);
	_tmp5_ = self->priv->model;
	_tmp6_ = iter;
	_tmp7_ = title;
	gtk_list_store_set (_tmp5_, &_tmp6_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_TITLE, _tmp7_, -1);
	_tmp8_ = self->priv->model;
	_tmp9_ = iter;
	_tmp10_ = item;
	gtk_list_store_set (_tmp8_, &_tmp9_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM, _tmp10_, -1);
	_tmp11_ = item;
	_tmp12_ = iter;
	_tmp13_ = __gtk_tree_iter_dup0 (&_tmp12_);
	g_object_set_data_full ((GObject*) _tmp11_, "iter", _tmp13_, g_free);
	*result = iter;
	return;
}


static Block5Data* block5_data_ref (Block5Data* _data5_) {
	g_atomic_int_inc (&_data5_->_ref_count_);
	return _data5_;
}


static void block5_data_unref (void * _userdata_) {
	Block5Data* _data5_;
	_data5_ = (Block5Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
		BoxesCollectionView * self;
		self = _data5_->self;
		_g_object_unref0 (_data5_->machine);
		_g_object_unref0 (self);
		g_slice_free (Block5Data, _data5_);
	}
}


static void __lambda102_ (Block5Data* _data5_) {
	BoxesCollectionView * self;
	GtkListStore* _tmp0_;
	GtkTreeIter _tmp1_;
	BoxesMachine* _tmp2_;
	GdkPixbuf* _tmp3_;
	GdkPixbuf* _tmp4_;
	self = _data5_->self;
	_tmp0_ = self->priv->model;
	_tmp1_ = _data5_->iter;
	_tmp2_ = _data5_->machine;
	_tmp3_ = boxes_machine_get_pixbuf (_tmp2_);
	_tmp4_ = _tmp3_;
	gtk_list_store_set (_tmp0_, &_tmp1_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SCREENSHOT, _tmp4_, -1);
}


static void ___lambda102__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda102_ (self);
}


void boxes_collection_view_add_item (BoxesCollectionView* self, BoxesCollectionItem* item) {
	Block5Data* _data5_;
	BoxesCollectionItem* _tmp0_;
	BoxesMachine* _tmp1_;
	BoxesMachine* _tmp2_;
	BoxesMachine* _tmp5_;
	GdkPixbuf* _tmp6_;
	GdkPixbuf* _tmp7_;
	BoxesMachine* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	BoxesCollectionItem* _tmp11_;
	GtkTreeIter _tmp12_ = {0};
	BoxesMachine* _tmp13_;
	gulong _tmp14_ = 0UL;
	gulong pixbuf_id;
	BoxesCollectionItem* _tmp15_;
	gulong _tmp16_;
	BoxesCollectionItem* _tmp17_;
	BoxesCollectionItem* _tmp18_;
	ClutterActor* _tmp19_;
	ClutterActor* _tmp20_;
	BoxesCollectionItem* _tmp21_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_data5_ = g_slice_new0 (Block5Data);
	_data5_->_ref_count_ = 1;
	_data5_->self = g_object_ref (self);
	_tmp0_ = item;
	_tmp1_ = _g_object_ref0 (BOXES_IS_MACHINE (_tmp0_) ? ((BoxesMachine*) _tmp0_) : NULL);
	_data5_->machine = _tmp1_;
	_tmp2_ = _data5_->machine;
	if (_tmp2_ == NULL) {
		gchar* _tmp3_ = NULL;
		gchar* _tmp4_;
		_tmp3_ = g_strdup_printf ("Cannot add item %p", &item);
		_tmp4_ = _tmp3_;
		g_warning ("collection-view.vala:147: %s", _tmp4_);
		_g_free0 (_tmp4_);
		block5_data_unref (_data5_);
		_data5_ = NULL;
		return;
	}
	_tmp5_ = _data5_->machine;
	_tmp6_ = boxes_machine_get_pixbuf (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = _data5_->machine;
	_tmp9_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = item;
	boxes_collection_view_append (self, _tmp7_, _tmp10_, _tmp11_, &_tmp12_);
	_data5_->iter = _tmp12_;
	_tmp13_ = _data5_->machine;
	_tmp14_ = g_signal_connect_data ((GObject*) _tmp13_, "notify::pixbuf", (GCallback) ___lambda102__g_object_notify, block5_data_ref (_data5_), (GClosureNotify) block5_data_unref, 0);
	pixbuf_id = _tmp14_;
	_tmp15_ = item;
	_tmp16_ = pixbuf_id;
	g_object_set_data_full ((GObject*) _tmp15_, "pixbuf_id", GUINT_TO_POINTER (_tmp16_), NULL);
	_tmp17_ = item;
	boxes_ui_set_ui_state ((BoxesUI*) _tmp17_, BOXES_UI_STATE_COLLECTION);
	_tmp18_ = item;
	_tmp19_ = boxes_ui_get_actor ((BoxesUI*) _tmp18_);
	_tmp20_ = _tmp19_;
	boxes_actor_remove (_tmp20_);
	_tmp21_ = item;
	boxes_collection_view_update_item_visible (self, _tmp21_);
	block5_data_unref (_data5_);
	_data5_ = NULL;
}


static gpointer _gtk_tree_path_copy0 (gpointer self) {
	return self ? gtk_tree_path_copy (self) : NULL;
}


static void _gtk_tree_path_free0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (gtk_tree_path_free (var), NULL));
}


static void _g_list_free__gtk_tree_path_free0_ (GList* self) {
	g_list_foreach (self, (GFunc) _gtk_tree_path_free0_, NULL);
	g_list_free (self);
}


static void _g_object_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void _g_list_free__g_object_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
	g_list_free (self);
}


GList* boxes_collection_view_get_selected_items (BoxesCollectionView* self) {
	GList* result = NULL;
	GList* list;
	GtkIconView* _tmp0_;
	GList* _tmp1_ = NULL;
	GList* selected;
	GList* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	list = NULL;
	_tmp0_ = self->priv->icon_view;
	_tmp1_ = gtk_icon_view_get_selected_items (_tmp0_);
	selected = _tmp1_;
	_tmp2_ = selected;
	{
		GList* path_collection = NULL;
		GList* path_it = NULL;
		path_collection = _tmp2_;
		for (path_it = path_collection; path_it != NULL; path_it = path_it->next) {
			GtkTreePath* _tmp3_;
			GtkTreePath* path = NULL;
			_tmp3_ = _gtk_tree_path_copy0 ((GtkTreePath*) path_it->data);
			path = _tmp3_;
			{
				GtkTreePath* _tmp4_;
				BoxesCollectionItem* _tmp5_ = NULL;
				_tmp4_ = path;
				_tmp5_ = boxes_collection_view_get_item_for_path (self, _tmp4_);
				list = g_list_append (list, _tmp5_);
				_gtk_tree_path_free0 (path);
			}
		}
	}
	result = list;
	__g_list_free__gtk_tree_path_free0_0 (selected);
	return result;
}


void boxes_collection_view_remove_item (BoxesCollectionView* self, BoxesCollectionItem* item) {
	BoxesCollectionItem* _tmp0_;
	gconstpointer _tmp1_ = NULL;
	GtkTreeIter* _tmp2_;
	GtkTreeIter* iter;
	BoxesCollectionItem* _tmp3_;
	gconstpointer _tmp4_ = NULL;
	gulong pixbuf_id;
	GtkTreeIter* _tmp5_;
	GtkListStore* _tmp6_;
	GtkTreeIter* _tmp7_;
	GtkTreeIter _tmp8_;
	BoxesCollectionItem* _tmp9_;
	BoxesCollectionItem* _tmp10_;
	gulong _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	_tmp1_ = g_object_get_data ((GObject*) _tmp0_, "iter");
	_tmp2_ = __gtk_tree_iter_dup0 ((GtkTreeIter*) _tmp1_);
	iter = _tmp2_;
	_tmp3_ = item;
	_tmp4_ = g_object_get_data ((GObject*) _tmp3_, "pixbuf_id");
	pixbuf_id = GPOINTER_TO_UINT (_tmp4_);
	_tmp5_ = iter;
	if (_tmp5_ == NULL) {
		g_debug ("collection-view.vala:179: item not in view or already removed");
		_g_free0 (iter);
		return;
	}
	_tmp6_ = self->priv->model;
	_tmp7_ = iter;
	_tmp8_ = *_tmp7_;
	gtk_list_store_remove (_tmp6_, &_tmp8_);
	_tmp9_ = item;
	g_object_set_data_full ((GObject*) _tmp9_, "iter", NULL, g_free);
	_tmp10_ = item;
	_tmp11_ = pixbuf_id;
	g_signal_handler_disconnect ((GObject*) _tmp10_, _tmp11_);
	_g_free0 (iter);
}


static BoxesCollectionItem* boxes_collection_view_get_item_for_path (BoxesCollectionView* self, GtkTreePath* path) {
	BoxesCollectionItem* result = NULL;
	GtkTreeIter iter = {0};
	GValue value = {0};
	GtkListStore* _tmp0_;
	GtkTreePath* _tmp1_;
	GtkTreeIter _tmp2_ = {0};
	GtkListStore* _tmp3_;
	GtkTreeIter _tmp4_;
	GValue _tmp5_ = {0};
	GValue _tmp6_;
	BoxesCollectionItem* _tmp7_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (path != NULL, NULL);
	_tmp0_ = self->priv->model;
	_tmp1_ = path;
	gtk_tree_model_get_iter ((GtkTreeModel*) _tmp0_, &_tmp2_, _tmp1_);
	iter = _tmp2_;
	_tmp3_ = self->priv->model;
	_tmp4_ = iter;
	gtk_tree_model_get_value ((GtkTreeModel*) _tmp3_, &_tmp4_, (gint) BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM, &_tmp5_);
	G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
	value = _tmp5_;
	_tmp6_ = value;
	_tmp7_ = _g_object_ref0 (g_value_get_object (&_tmp6_));
	result = _tmp7_;
	G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
	return result;
}


static gint __lambda5_ (BoxesCollectionView* self, GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b) {
	gint result = 0;
	BoxesCollectionItem* item_a = NULL;
	BoxesCollectionItem* item_b = NULL;
	GtkTreeModel* _tmp0_;
	GtkTreeIter _tmp1_;
	GtkTreeModel* _tmp2_;
	GtkTreeIter _tmp3_;
	gboolean _tmp4_ = FALSE;
	BoxesCollectionItem* _tmp5_;
	gboolean _tmp7_;
	GCompareFunc _tmp8_;
	BoxesCollectionItem* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_ = NULL;
	gchar* _tmp13_;
	BoxesCollectionItem* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	gchar* _tmp17_ = NULL;
	gchar* _tmp18_;
	gint _tmp19_ = 0;
	gint _tmp20_;
	g_return_val_if_fail (model != NULL, 0);
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = model;
	_tmp1_ = *a;
	gtk_tree_model_get (_tmp0_, &_tmp1_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM, &item_a, -1);
	_tmp2_ = model;
	_tmp3_ = *b;
	gtk_tree_model_get (_tmp2_, &_tmp3_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM, &item_b, -1);
	_tmp5_ = item_a;
	if (_tmp5_ == NULL) {
		_tmp4_ = TRUE;
	} else {
		BoxesCollectionItem* _tmp6_;
		_tmp6_ = item_b;
		_tmp4_ = _tmp6_ == NULL;
	}
	_tmp7_ = _tmp4_;
	if (_tmp7_) {
		result = 0;
		_g_object_unref0 (item_b);
		_g_object_unref0 (item_a);
		return result;
	}
	_tmp8_ = g_strcmp0;
	_tmp9_ = item_a;
	_tmp10_ = boxes_collection_item_get_name (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = g_utf8_strdown (_tmp11_, (gssize) (-1));
	_tmp13_ = _tmp12_;
	_tmp14_ = item_b;
	_tmp15_ = boxes_collection_item_get_name (_tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = g_utf8_strdown (_tmp16_, (gssize) (-1));
	_tmp18_ = _tmp17_;
	_tmp19_ = _tmp8_ (_tmp13_, _tmp18_);
	_tmp20_ = _tmp19_;
	_g_free0 (_tmp18_);
	_g_free0 (_tmp13_);
	result = _tmp20_;
	_g_object_unref0 (item_b);
	_g_object_unref0 (item_a);
	return result;
}


static gint ___lambda5__gtk_tree_iter_compare_func (GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer self) {
	gint result;
	result = __lambda5_ (self, model, a, b);
	return result;
}


static void __lambda7_ (BoxesCollectionView* self, GtkIconView* view, GtkTreePath* path) {
	GtkTreePath* _tmp0_;
	BoxesCollectionItem* _tmp1_ = NULL;
	BoxesCollectionItem* item;
	BoxesApp* _tmp2_;
	g_return_if_fail (view != NULL);
	g_return_if_fail (path != NULL);
	_tmp0_ = path;
	_tmp1_ = boxes_collection_view_get_item_for_path (self, _tmp0_);
	item = _tmp1_;
	_tmp2_ = self->priv->app;
	boxes_app_select_item (_tmp2_, item);
	_g_object_unref0 (item);
}


static void ___lambda7__gtk_icon_view_item_activated (GtkIconView* _sender, GtkTreePath* path, gpointer self) {
	__lambda7_ (self, _sender, path);
}


static void __lambda41_ (BoxesCollectionView* self) {
	BoxesApp* _tmp0_;
	_tmp0_ = self->priv->app;
	g_object_notify ((GObject*) _tmp0_, "selected-items");
}


static void ___lambda41__gtk_icon_view_selection_changed (GtkIconView* _sender, gpointer self) {
	__lambda41_ (self);
}


static void boxes_collection_view_setup_view (BoxesCollectionView* self) {
	GtkListStore* _tmp0_;
	GtkListStore* _tmp1_;
	GtkListStore* _tmp2_;
	GtkListStore* _tmp3_;
	GtkIconView* _tmp4_;
	GtkIconView* _tmp5_;
	GtkIconView* _tmp6_;
	GtkIconView* _tmp7_;
	GtkIconView* _tmp8_;
	GtkIconView* _tmp9_;
	GtkIconView* _tmp10_;
	GtkIconView* _tmp11_;
	GtkIconView* _tmp12_;
	GtkCellRendererPixbuf* _tmp13_;
	GtkCellRendererPixbuf* _tmp14_;
	GtkCellRendererPixbuf* pixbuf_renderer;
	GtkIconView* _tmp15_;
	GtkIconView* _tmp16_;
	GtkCellRendererText* _tmp17_;
	GtkCellRendererText* _tmp18_;
	GtkCellRendererText* text_renderer;
	GtkIconView* _tmp19_;
	GtkIconView* _tmp20_;
	GtkScrolledWindow* _tmp21_;
	GtkScrolledWindow* _tmp22_;
	GtkScrolledWindow* scrolled_window;
	GtkIconView* _tmp23_;
	GtkClutterActor* _tmp24_;
	GtkClutterActor* _tmp25_;
	ClutterBinLayout* _tmp26_;
	ClutterBinLayout* _tmp27_;
	ClutterBox* _tmp28_;
	ClutterBox* _tmp29_;
	ClutterBox* _tmp30_;
	GtkClutterActor* _tmp31_;
	ClutterBindConstraint* _tmp32_;
	ClutterBindConstraint* _tmp33_;
	ClutterBox* _tmp34_;
	GtkClutterActor* _tmp35_;
	ClutterBindConstraint* _tmp36_;
	ClutterBindConstraint* _tmp37_;
	BoxesApp* _tmp38_;
	ClutterState* _tmp39_;
	ClutterActor* _tmp40_;
	ClutterActor* _tmp41_;
	GValue _tmp42_ = {0};
	BoxesApp* _tmp43_;
	ClutterState* _tmp44_;
	ClutterActor* _tmp45_;
	ClutterActor* _tmp46_;
	GValue _tmp47_ = {0};
	BoxesApp* _tmp48_;
	ClutterState* _tmp49_;
	ClutterActor* _tmp50_;
	ClutterActor* _tmp51_;
	GValue _tmp52_ = {0};
	BoxesApp* _tmp53_;
	ClutterState* _tmp54_;
	ClutterBox* _tmp55_;
	GValue _tmp56_ = {0};
	BoxesApp* _tmp57_;
	ClutterState* _tmp58_;
	ClutterBox* _tmp59_;
	GValue _tmp60_ = {0};
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_list_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, BOXES_TYPE_COLLECTION_ITEM);
	_g_object_unref0 (self->priv->model);
	self->priv->model = _tmp0_;
	_tmp1_ = self->priv->model;
	gtk_tree_sortable_set_default_sort_func ((GtkTreeSortable*) _tmp1_, ___lambda5__gtk_tree_iter_compare_func, g_object_ref (self), g_object_unref);
	_tmp2_ = self->priv->model;
	gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp2_, GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, GTK_SORT_ASCENDING);
	_tmp3_ = self->priv->model;
	_tmp4_ = (GtkIconView*) gtk_icon_view_new_with_model ((GtkTreeModel*) _tmp3_);
	_tmp5_ = g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->icon_view);
	self->priv->icon_view = _tmp5_;
	_tmp6_ = self->priv->icon_view;
	gtk_icon_view_set_item_width (_tmp6_, 185);
	_tmp7_ = self->priv->icon_view;
	gtk_icon_view_set_column_spacing (_tmp7_, 20);
	_tmp8_ = self->priv->icon_view;
	gtk_icon_view_set_margin (_tmp8_, 16);
	_tmp9_ = self->priv->icon_view;
	boxes_icon_view_activate_on_single_click (_tmp9_, TRUE);
	_tmp10_ = self->priv->icon_view;
	gtk_icon_view_set_selection_mode (_tmp10_, GTK_SELECTION_SINGLE);
	_tmp11_ = self->priv->icon_view;
	g_signal_connect_object (_tmp11_, "item-activated", (GCallback) ___lambda7__gtk_icon_view_item_activated, self, 0);
	_tmp12_ = self->priv->icon_view;
	g_signal_connect_object (_tmp12_, "selection-changed", (GCallback) ___lambda41__gtk_icon_view_selection_changed, self, 0);
	_tmp13_ = (GtkCellRendererPixbuf*) gtk_cell_renderer_pixbuf_new ();
	_tmp14_ = g_object_ref_sink (_tmp13_);
	pixbuf_renderer = _tmp14_;
	g_object_set ((GtkCellRenderer*) pixbuf_renderer, "xalign", 0.5f, NULL);
	g_object_set ((GtkCellRenderer*) pixbuf_renderer, "yalign", 0.5f, NULL);
	_tmp15_ = self->priv->icon_view;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp15_, (GtkCellRenderer*) pixbuf_renderer, FALSE);
	_tmp16_ = self->priv->icon_view;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp16_, (GtkCellRenderer*) pixbuf_renderer, "pixbuf", (gint) BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SCREENSHOT);
	_tmp17_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	_tmp18_ = g_object_ref_sink (_tmp17_);
	text_renderer = _tmp18_;
	g_object_set ((GtkCellRenderer*) text_renderer, "xalign", 0.5f, NULL);
	g_object_set (text_renderer, "foreground", "white", NULL);
	_tmp19_ = self->priv->icon_view;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp19_, (GtkCellRenderer*) text_renderer, FALSE);
	_tmp20_ = self->priv->icon_view;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp20_, (GtkCellRenderer*) text_renderer, "text", (gint) BOXES_COLLECTION_VIEW_MODEL_COLUMNS_TITLE);
	_tmp21_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	_tmp22_ = g_object_ref_sink (_tmp21_);
	scrolled_window = _tmp22_;
	_tmp23_ = self->priv->icon_view;
	gtk_container_add ((GtkContainer*) scrolled_window, (GtkWidget*) _tmp23_);
	gtk_widget_show_all ((GtkWidget*) scrolled_window);
	_tmp24_ = (GtkClutterActor*) gtk_clutter_actor_new_with_contents ((GtkWidget*) scrolled_window);
	_tmp25_ = g_object_ref_sink (_tmp24_);
	_g_object_unref0 (self->priv->gtkactor);
	self->priv->gtkactor = _tmp25_;
	_tmp26_ = (ClutterBinLayout*) clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_FILL, CLUTTER_BIN_ALIGNMENT_FILL);
	_tmp27_ = g_object_ref_sink (_tmp26_);
	_tmp28_ = (ClutterBox*) clutter_box_new ((ClutterLayoutManager*) _tmp27_);
	_tmp29_ = g_object_ref_sink (_tmp28_);
	_g_object_unref0 (self->priv->over_boxes);
	self->priv->over_boxes = _tmp29_;
	_g_object_unref0 (_tmp27_);
	_tmp30_ = self->priv->over_boxes;
	_tmp31_ = self->priv->gtkactor;
	_tmp32_ = (ClutterBindConstraint*) clutter_bind_constraint_new ((ClutterActor*) _tmp31_, CLUTTER_BIND_SIZE, (gfloat) 0);
	_tmp33_ = g_object_ref_sink (_tmp32_);
	clutter_actor_add_constraint_with_name ((ClutterActor*) _tmp30_, "top-box-size", (ClutterConstraint*) _tmp33_);
	_g_object_unref0 (_tmp33_);
	_tmp34_ = self->priv->over_boxes;
	_tmp35_ = self->priv->gtkactor;
	_tmp36_ = (ClutterBindConstraint*) clutter_bind_constraint_new ((ClutterActor*) _tmp35_, CLUTTER_BIND_POSITION, (gfloat) 0);
	_tmp37_ = g_object_ref_sink (_tmp36_);
	clutter_actor_add_constraint_with_name ((ClutterActor*) _tmp34_, "top-box-position", (ClutterConstraint*) _tmp37_);
	_g_object_unref0 (_tmp37_);
	_tmp38_ = self->priv->app;
	_tmp39_ = _tmp38_->state;
	_tmp40_ = boxes_ui_get_actor ((BoxesUI*) self);
	_tmp41_ = _tmp40_;
	g_value_init (&_tmp42_, G_TYPE_UINT);
	g_value_set_uint (&_tmp42_, (guint) 0);
	clutter_state_set_key (_tmp39_, NULL, "creds", (GObject*) _tmp41_, "opacity", (guint) CLUTTER_EASE_OUT_QUAD, &_tmp42_, (gdouble) 0, (gdouble) 0);
	G_IS_VALUE (&_tmp42_) ? (g_value_unset (&_tmp42_), NULL) : NULL;
	_tmp43_ = self->priv->app;
	_tmp44_ = _tmp43_->state;
	_tmp45_ = boxes_ui_get_actor ((BoxesUI*) self);
	_tmp46_ = _tmp45_;
	g_value_init (&_tmp47_, G_TYPE_UINT);
	g_value_set_uint (&_tmp47_, (guint) 0);
	clutter_state_set_key (_tmp44_, NULL, "display", (GObject*) _tmp46_, "opacity", (guint) CLUTTER_EASE_OUT_QUAD, &_tmp47_, (gdouble) 0, (gdouble) 0);
	G_IS_VALUE (&_tmp47_) ? (g_value_unset (&_tmp47_), NULL) : NULL;
	_tmp48_ = self->priv->app;
	_tmp49_ = _tmp48_->state;
	_tmp50_ = boxes_ui_get_actor ((BoxesUI*) self);
	_tmp51_ = _tmp50_;
	g_value_init (&_tmp52_, G_TYPE_UINT);
	g_value_set_uint (&_tmp52_, (guint) 255);
	clutter_state_set_key (_tmp49_, NULL, "collection", (GObject*) _tmp51_, "opacity", (guint) CLUTTER_EASE_OUT_QUAD, &_tmp52_, (gdouble) 0, (gdouble) 0);
	G_IS_VALUE (&_tmp52_) ? (g_value_unset (&_tmp52_), NULL) : NULL;
	_tmp53_ = self->priv->app;
	_tmp54_ = _tmp53_->state;
	_tmp55_ = self->priv->over_boxes;
	g_value_init (&_tmp56_, G_TYPE_FLOAT);
	g_value_set_float (&_tmp56_, (gfloat) 0);
	clutter_state_set_key (_tmp54_, NULL, "display", (GObject*) _tmp55_, "x", (guint) CLUTTER_EASE_OUT_QUAD, &_tmp56_, (gdouble) 0, (gdouble) 0);
	G_IS_VALUE (&_tmp56_) ? (g_value_unset (&_tmp56_), NULL) : NULL;
	_tmp57_ = self->priv->app;
	_tmp58_ = _tmp57_->state;
	_tmp59_ = self->priv->over_boxes;
	g_value_init (&_tmp60_, G_TYPE_FLOAT);
	g_value_set_float (&_tmp60_, (gfloat) 0);
	clutter_state_set_key (_tmp58_, NULL, "display", (GObject*) _tmp59_, "y", (guint) CLUTTER_EASE_OUT_QUAD, &_tmp60_, (gdouble) 0, (gdouble) 0);
	G_IS_VALUE (&_tmp60_) ? (g_value_unset (&_tmp60_), NULL) : NULL;
	_g_object_unref0 (scrolled_window);
	_g_object_unref0 (text_renderer);
	_g_object_unref0 (pixbuf_renderer);
}


static ClutterActor* boxes_collection_view_real_get_actor (BoxesUI* base) {
	ClutterActor* result;
	BoxesCollectionView* self;
	GtkClutterActor* _tmp0_;
	self = (BoxesCollectionView*) base;
	_tmp0_ = self->priv->gtkactor;
	result = (ClutterActor*) _tmp0_;
	return result;
}


BoxesCategory* boxes_collection_view_get_category (BoxesCollectionView* self) {
	BoxesCategory* result;
	BoxesCategory* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_category;
	result = _tmp0_;
	return result;
}


void boxes_collection_view_set_category (BoxesCollectionView* self, BoxesCategory* value) {
	BoxesCategory* _tmp0_;
	BoxesCategory* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_category);
	self->priv->_category = _tmp1_;
	g_object_notify ((GObject *) self, "category");
}


void boxes_collection_view_set_visible (BoxesCollectionView* self, gboolean value) {
	GtkIconView* _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->icon_view;
	_tmp1_ = value;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, _tmp1_);
	g_object_notify ((GObject *) self, "visible");
}


static void boxes_collection_view_class_init (BoxesCollectionViewClass * klass) {
	boxes_collection_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesCollectionViewPrivate));
	BOXES_UI_CLASS (klass)->ui_state_changed = boxes_collection_view_real_ui_state_changed;
	BOXES_UI_CLASS (klass)->get_actor = boxes_collection_view_real_get_actor;
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_collection_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_collection_view_set_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_collection_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_VIEW_ACTOR, g_param_spec_object ("actor", "actor", "actor", clutter_actor_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_VIEW_CATEGORY, g_param_spec_object ("category", "category", "category", BOXES_TYPE_CATEGORY, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_VIEW_VISIBLE, g_param_spec_boolean ("visible", "visible", "visible", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE));
}


static void boxes_collection_view_instance_init (BoxesCollectionView * self) {
	self->priv = BOXES_COLLECTION_VIEW_GET_PRIVATE (self);
}


static void boxes_collection_view_finalize (GObject* obj) {
	BoxesCollectionView * self;
	self = BOXES_COLLECTION_VIEW (obj);
	_g_object_unref0 (self->priv->app);
	_g_object_unref0 (self->priv->gtkactor);
	_g_object_unref0 (self->priv->over_boxes);
	_g_object_unref0 (self->priv->_category);
	_g_object_unref0 (self->priv->icon_view);
	_g_object_unref0 (self->priv->model);
	G_OBJECT_CLASS (boxes_collection_view_parent_class)->finalize (obj);
}


GType boxes_collection_view_get_type (void) {
	static volatile gsize boxes_collection_view_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_collection_view_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesCollectionViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_collection_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesCollectionView), 0, (GInstanceInitFunc) boxes_collection_view_instance_init, NULL };
		GType boxes_collection_view_type_id;
		boxes_collection_view_type_id = g_type_register_static (BOXES_TYPE_UI, "BoxesCollectionView", &g_define_type_info, 0);
		g_once_init_leave (&boxes_collection_view_type_id__volatile, boxes_collection_view_type_id);
	}
	return boxes_collection_view_type_id__volatile;
}


static void _vala_boxes_collection_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesCollectionView * self;
	self = BOXES_COLLECTION_VIEW (object);
	switch (property_id) {
		case BOXES_COLLECTION_VIEW_ACTOR:
		g_value_set_object (value, boxes_ui_get_actor ((BoxesUI*) self));
		break;
		case BOXES_COLLECTION_VIEW_CATEGORY:
		g_value_set_object (value, boxes_collection_view_get_category (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_boxes_collection_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesCollectionView * self;
	self = BOXES_COLLECTION_VIEW (object);
	switch (property_id) {
		case BOXES_COLLECTION_VIEW_CATEGORY:
		boxes_collection_view_set_category (self, g_value_get_object (value));
		break;
		case BOXES_COLLECTION_VIEW_VISIBLE:
		boxes_collection_view_set_visible (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



