/* topbar.c generated by valac 0.16.0.2-f2187, the Vala compiler
 * generated from topbar.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 <gtk/gtk.h>
#include <clutter-gtk/clutter-gtk.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>


#define BOXES_TYPE_TOPBAR_PAGE (boxes_topbar_page_get_type ())

#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_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;
typedef struct _BoxesTopbarPrivate BoxesTopbarPrivate;

#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 _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
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_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 __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

typedef enum  {
	BOXES_TOPBAR_PAGE_COLLECTION,
	BOXES_TOPBAR_PAGE_SELECTION,
	BOXES_TOPBAR_PAGE_WIZARD,
	BOXES_TOPBAR_PAGE_PROPERTIES
} BoxesTopbarPage;

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 _BoxesTopbar {
	BoxesUI parent_instance;
	BoxesTopbarPrivate * priv;
	GtkLabel* label;
	GtkNotebook* notebook;
};

struct _BoxesTopbarClass {
	BoxesUIClass parent_class;
};

struct _BoxesTopbarPrivate {
	BoxesApp* app;
	GtkClutterActor* gtk_actor;
	GtkSpinner* spinner;
	GtkToggleToolButton* select_btn;
	GtkToolButton* cancel_btn;
	GtkToolButton* spinner_btn;
	GtkToolButton* back_btn;
	GtkButton* new_btn;
	GtkLabel* selection_label;
};

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


static gpointer boxes_topbar_parent_class = NULL;

GType boxes_topbar_page_get_type (void) G_GNUC_CONST;
GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_topbar_get_type (void) G_GNUC_CONST;
GType boxes_app_get_type (void) G_GNUC_CONST;
#define BOXES_TOPBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_TOPBAR, BoxesTopbarPrivate))
enum  {
	BOXES_TOPBAR_DUMMY_PROPERTY,
	BOXES_TOPBAR_ACTOR
};
#define BOXES_TOPBAR_height ((guint) 50)
BoxesTopbar* boxes_topbar_new (BoxesApp* app);
BoxesTopbar* boxes_topbar_construct (GType object_type, BoxesApp* app);
BoxesUI* boxes_ui_construct (GType object_type);
static void boxes_topbar_setup_topbar (BoxesTopbar* self);
static void __lambda104_ (BoxesTopbar* self);
static void boxes_topbar_update_selection_label (BoxesTopbar* self);
static void ___lambda104__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __lambda2_ (BoxesTopbar* self, GtkToolButton* button);
void boxes_ui_set_ui_state (BoxesUI* self, BoxesUIState value);
static void ___lambda2__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
static void __lambda3_ (BoxesTopbar* self, GtkButton* button);
static void ___lambda3__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void __lambda4_ (BoxesTopbar* self);
void boxes_app_set_selection_mode (BoxesApp* self, gboolean value);
static void ___lambda4__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
static void __lambda103_ (BoxesTopbar* self);
static void ___lambda103__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
GType boxes_collection_item_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;
GList* boxes_app_get_selected_items (BoxesApp* self);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
static void boxes_topbar_real_ui_state_changed (BoxesUI* base);
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
void boxes_actor_pin (ClutterActor* actor);
static void boxes_topbar_finalize (GObject* obj);
ClutterActor* boxes_ui_get_actor (BoxesUI* self);
static void _vala_boxes_topbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


GType boxes_topbar_page_get_type (void) {
	static volatile gsize boxes_topbar_page_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_topbar_page_type_id__volatile)) {
		static const GEnumValue values[] = {{BOXES_TOPBAR_PAGE_COLLECTION, "BOXES_TOPBAR_PAGE_COLLECTION", "collection"}, {BOXES_TOPBAR_PAGE_SELECTION, "BOXES_TOPBAR_PAGE_SELECTION", "selection"}, {BOXES_TOPBAR_PAGE_WIZARD, "BOXES_TOPBAR_PAGE_WIZARD", "wizard"}, {BOXES_TOPBAR_PAGE_PROPERTIES, "BOXES_TOPBAR_PAGE_PROPERTIES", "properties"}, {0, NULL, NULL}};
		GType boxes_topbar_page_type_id;
		boxes_topbar_page_type_id = g_enum_register_static ("BoxesTopbarPage", values);
		g_once_init_leave (&boxes_topbar_page_type_id__volatile, boxes_topbar_page_type_id);
	}
	return boxes_topbar_page_type_id__volatile;
}


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


static void __lambda104_ (BoxesTopbar* self) {
	boxes_topbar_update_selection_label (self);
}


static void ___lambda104__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda104_ (self);
}


BoxesTopbar* boxes_topbar_construct (GType object_type, BoxesApp* app) {
	BoxesTopbar * self = NULL;
	BoxesApp* _tmp0_;
	BoxesApp* _tmp1_;
	BoxesApp* _tmp2_;
	g_return_val_if_fail (app != NULL, NULL);
	self = (BoxesTopbar*) boxes_ui_construct (object_type);
	_tmp0_ = app;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->app);
	self->priv->app = _tmp1_;
	boxes_topbar_setup_topbar (self);
	_tmp2_ = app;
	g_signal_connect_object ((GObject*) _tmp2_, "notify::selected-items", (GCallback) ___lambda104__g_object_notify, self, 0);
	return self;
}


BoxesTopbar* boxes_topbar_new (BoxesApp* app) {
	return boxes_topbar_construct (BOXES_TYPE_TOPBAR, app);
}


static void __lambda2_ (BoxesTopbar* self, GtkToolButton* button) {
	BoxesApp* _tmp0_;
	g_return_if_fail (button != NULL);
	_tmp0_ = self->priv->app;
	boxes_ui_set_ui_state ((BoxesUI*) _tmp0_, BOXES_UI_STATE_COLLECTION);
}


static void ___lambda2__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	__lambda2_ (self, _sender);
}


static void __lambda3_ (BoxesTopbar* self, GtkButton* button) {
	BoxesApp* _tmp0_;
	g_return_if_fail (button != NULL);
	_tmp0_ = self->priv->app;
	boxes_ui_set_ui_state ((BoxesUI*) _tmp0_, BOXES_UI_STATE_WIZARD);
}


static void ___lambda3__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda3_ (self, _sender);
}


static void __lambda4_ (BoxesTopbar* self) {
	GtkNotebook* _tmp0_;
	BoxesApp* _tmp1_;
	_tmp0_ = self->notebook;
	g_object_set (_tmp0_, "page", (gint) BOXES_TOPBAR_PAGE_SELECTION, NULL);
	_tmp1_ = self->priv->app;
	boxes_app_set_selection_mode (_tmp1_, TRUE);
}


static void ___lambda4__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	__lambda4_ (self);
}


static void __lambda103_ (BoxesTopbar* self) {
	GtkToggleToolButton* _tmp0_;
	BoxesApp* _tmp1_;
	GtkNotebook* _tmp2_;
	_tmp0_ = self->priv->select_btn;
	gtk_toggle_tool_button_set_active (_tmp0_, FALSE);
	_tmp1_ = self->priv->app;
	boxes_app_set_selection_mode (_tmp1_, FALSE);
	_tmp2_ = self->notebook;
	g_object_set (_tmp2_, "page", (gint) BOXES_TOPBAR_PAGE_COLLECTION, NULL);
}


static void ___lambda103__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	__lambda103_ (self);
}


static void boxes_topbar_setup_topbar (BoxesTopbar* self) {
	GtkNotebook* _tmp0_;
	GtkNotebook* _tmp1_;
	GtkNotebook* _tmp2_;
	GtkNotebook* _tmp3_;
	GtkClutterActor* _tmp4_;
	GtkClutterActor* _tmp5_;
	GtkHBox* _tmp6_;
	GtkHBox* _tmp7_;
	GtkHBox* hbox;
	GtkNotebook* _tmp8_;
	GtkHBox* _tmp9_;
	GtkHBox* _tmp10_;
	GtkStyleContext* _tmp11_ = NULL;
	GtkToolbar* _tmp12_;
	GtkToolbar* _tmp13_;
	GtkToolbar* toolbar_start;
	GtkStyleContext* _tmp14_ = NULL;
	GtkHBox* _tmp15_;
	GtkToolButton* _tmp16_;
	GtkToolButton* _tmp17_;
	GtkToolButton* _tmp18_;
	GtkToolButton* _tmp19_;
	GtkToolButton* _tmp20_;
	GtkStyleContext* _tmp21_ = NULL;
	GtkToolButton* _tmp22_;
	GtkToolButton* _tmp23_;
	const gchar* _tmp24_ = NULL;
	GtkButton* _tmp25_;
	GtkButton* _tmp26_;
	GtkButton* _tmp27_;
	GtkButton* _tmp28_;
	GtkStyleContext* _tmp29_ = NULL;
	GtkToolItem* _tmp30_;
	GtkToolItem* _tmp31_;
	GtkToolItem* tool_item;
	GtkToolItem* _tmp32_;
	GtkButton* _tmp33_;
	GtkToolItem* _tmp34_;
	GtkButton* _tmp35_;
	GtkToolItem* _tmp36_;
	GtkLabel* _tmp37_;
	GtkLabel* _tmp38_;
	GtkLabel* _tmp39_;
	GtkLabel* _tmp40_;
	GtkToolItem* _tmp41_;
	GtkToolItem* _tmp42_;
	GtkToolItem* _tmp43_;
	GtkToolItem* _tmp44_;
	GtkLabel* _tmp45_;
	GtkToolItem* _tmp46_;
	GtkToolbar* _tmp47_;
	GtkToolbar* _tmp48_;
	GtkToolbar* toolbar_end;
	GtkStyleContext* _tmp49_ = NULL;
	GtkSpinner* _tmp50_;
	GtkSpinner* _tmp51_;
	GtkSpinner* _tmp52_;
	GtkSpinner* _tmp53_;
	GtkToolButton* _tmp54_;
	GtkToolButton* _tmp55_;
	GtkToolButton* _tmp56_;
	GtkToolButton* _tmp57_;
	GtkStyleContext* _tmp58_ = NULL;
	GtkToolButton* _tmp59_;
	GtkToggleToolButton* _tmp60_;
	GtkToggleToolButton* _tmp61_;
	GtkToggleToolButton* _tmp62_;
	GtkToggleToolButton* _tmp63_;
	GtkStyleContext* _tmp64_ = NULL;
	GtkToggleToolButton* _tmp65_;
	GtkToggleToolButton* _tmp66_;
	GtkToggleToolButton* _tmp67_;
	GtkHBox* _tmp68_;
	GtkHBox* _tmp69_;
	GtkHBox* _tmp70_;
	GtkNotebook* _tmp71_;
	GtkHBox* _tmp72_;
	GtkHBox* _tmp73_;
	GtkStyleContext* _tmp74_ = NULL;
	GtkToolbar* _tmp75_;
	GtkToolbar* _tmp76_;
	GtkToolbar* toolbar_selection;
	GtkStyleContext* _tmp77_ = NULL;
	GtkHBox* _tmp78_;
	GtkLabel* _tmp79_;
	GtkLabel* _tmp80_;
	GtkLabel* _tmp81_;
	GtkToolItem* _tmp82_;
	GtkToolItem* _tmp83_;
	GtkToolItem* _tmp84_;
	GtkToolItem* _tmp85_;
	GtkLabel* _tmp86_;
	GtkToolItem* _tmp87_;
	GtkToolButton* _tmp88_;
	GtkToolButton* _tmp89_;
	GtkToolButton* _tmp90_;
	GtkStyleContext* _tmp91_ = NULL;
	GtkToolButton* _tmp92_;
	GtkToolButton* _tmp93_;
	GtkToolButton* _tmp94_;
	GtkHBox* _tmp95_;
	GtkHBox* _tmp96_;
	GtkHBox* _tmp97_;
	GtkNotebook* _tmp98_;
	GtkHBox* _tmp99_;
	GtkHBox* _tmp100_;
	GtkStyleContext* _tmp101_ = NULL;
	GtkHBox* _tmp102_;
	GtkHBox* _tmp103_;
	GtkNotebook* _tmp104_;
	GtkHBox* _tmp105_;
	GtkHBox* _tmp106_;
	GtkStyleContext* _tmp107_ = NULL;
	GtkNotebook* _tmp108_;
	GtkNotebook* _tmp109_;
	BoxesApp* _tmp110_;
	ClutterState* _tmp111_;
	GtkClutterActor* _tmp112_;
	GValue _tmp113_ = {0};
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkNotebook*) gtk_notebook_new ();
	_tmp1_ = g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->notebook);
	self->notebook = _tmp1_;
	_tmp2_ = self->notebook;
	gtk_widget_set_size_request ((GtkWidget*) _tmp2_, 50, (gint) BOXES_TOPBAR_height);
	_tmp3_ = self->notebook;
	_tmp4_ = (GtkClutterActor*) gtk_clutter_actor_new_with_contents ((GtkWidget*) _tmp3_);
	_tmp5_ = g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->gtk_actor);
	self->priv->gtk_actor = _tmp5_;
	_tmp6_ = (GtkHBox*) gtk_hbox_new (FALSE, 0);
	_tmp7_ = g_object_ref_sink (_tmp6_);
	hbox = _tmp7_;
	_tmp8_ = self->notebook;
	_tmp9_ = hbox;
	gtk_notebook_append_page (_tmp8_, (GtkWidget*) _tmp9_, NULL);
	_tmp10_ = hbox;
	_tmp11_ = gtk_widget_get_style_context ((GtkWidget*) _tmp10_);
	gtk_style_context_add_class (_tmp11_, GTK_STYLE_CLASS_SIDEBAR);
	_tmp12_ = (GtkToolbar*) gtk_toolbar_new ();
	_tmp13_ = g_object_ref_sink (_tmp12_);
	toolbar_start = _tmp13_;
	gtk_toolbar_set_icon_size (toolbar_start, (gint) GTK_ICON_SIZE_MENU);
	_tmp14_ = gtk_widget_get_style_context ((GtkWidget*) toolbar_start);
	gtk_style_context_add_class (_tmp14_, GTK_STYLE_CLASS_MENUBAR);
	gtk_toolbar_set_show_arrow (toolbar_start, FALSE);
	_tmp15_ = hbox;
	gtk_box_pack_start ((GtkBox*) _tmp15_, (GtkWidget*) toolbar_start, TRUE, TRUE, (guint) 0);
	_tmp16_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
	_tmp17_ = g_object_ref_sink (_tmp16_);
	_g_object_unref0 (self->priv->back_btn);
	self->priv->back_btn = _tmp17_;
	_tmp18_ = self->priv->back_btn;
	gtk_widget_set_valign ((GtkWidget*) _tmp18_, GTK_ALIGN_CENTER);
	_tmp19_ = self->priv->back_btn;
	gtk_tool_button_set_icon_name (_tmp19_, "go-previous-symbolic");
	_tmp20_ = self->priv->back_btn;
	_tmp21_ = gtk_widget_get_style_context ((GtkWidget*) _tmp20_);
	gtk_style_context_add_class (_tmp21_, "raised");
	_tmp22_ = self->priv->back_btn;
	g_signal_connect_object (_tmp22_, "clicked", (GCallback) ___lambda2__gtk_tool_button_clicked, self, 0);
	_tmp23_ = self->priv->back_btn;
	gtk_toolbar_insert (toolbar_start, (GtkToolItem*) _tmp23_, 0);
	_tmp24_ = _ ("New");
	_tmp25_ = (GtkButton*) gtk_button_new_with_label (_tmp24_);
	_tmp26_ = g_object_ref_sink (_tmp25_);
	_g_object_unref0 (self->priv->new_btn);
	self->priv->new_btn = _tmp26_;
	_tmp27_ = self->priv->new_btn;
	gtk_widget_set_size_request ((GtkWidget*) _tmp27_, 70, -1);
	_tmp28_ = self->priv->new_btn;
	_tmp29_ = gtk_widget_get_style_context ((GtkWidget*) _tmp28_);
	gtk_style_context_add_class (_tmp29_, "raised");
	_tmp30_ = gtk_tool_item_new ();
	_tmp31_ = g_object_ref_sink (_tmp30_);
	tool_item = _tmp31_;
	_tmp32_ = tool_item;
	_tmp33_ = self->priv->new_btn;
	g_object_set ((GtkContainer*) _tmp32_, "child", (GtkWidget*) _tmp33_, NULL);
	_tmp34_ = tool_item;
	gtk_widget_set_valign ((GtkWidget*) _tmp34_, GTK_ALIGN_CENTER);
	_tmp35_ = self->priv->new_btn;
	g_signal_connect_object (_tmp35_, "clicked", (GCallback) ___lambda3__gtk_button_clicked, self, 0);
	_tmp36_ = tool_item;
	gtk_toolbar_insert (toolbar_start, _tmp36_, 1);
	_tmp37_ = (GtkLabel*) gtk_label_new ("");
	_tmp38_ = g_object_ref_sink (_tmp37_);
	_g_object_unref0 (self->label);
	self->label = _tmp38_;
	_tmp39_ = self->label;
	gtk_widget_set_name ((GtkWidget*) _tmp39_, "TopbarLabel");
	_tmp40_ = self->label;
	gtk_widget_set_halign ((GtkWidget*) _tmp40_, GTK_ALIGN_START);
	_tmp41_ = gtk_tool_item_new ();
	_tmp42_ = g_object_ref_sink (_tmp41_);
	_g_object_unref0 (tool_item);
	tool_item = _tmp42_;
	_tmp43_ = tool_item;
	gtk_tool_item_set_expand (_tmp43_, TRUE);
	_tmp44_ = tool_item;
	_tmp45_ = self->label;
	g_object_set ((GtkContainer*) _tmp44_, "child", (GtkWidget*) _tmp45_, NULL);
	_tmp46_ = tool_item;
	gtk_toolbar_insert (toolbar_start, _tmp46_, 2);
	_tmp47_ = (GtkToolbar*) gtk_toolbar_new ();
	_tmp48_ = g_object_ref_sink (_tmp47_);
	toolbar_end = _tmp48_;
	gtk_toolbar_set_icon_size (toolbar_end, (gint) GTK_ICON_SIZE_MENU);
	_tmp49_ = gtk_widget_get_style_context ((GtkWidget*) toolbar_end);
	gtk_style_context_add_class (_tmp49_, GTK_STYLE_CLASS_MENUBAR);
	_tmp50_ = (GtkSpinner*) gtk_spinner_new ();
	_tmp51_ = g_object_ref_sink (_tmp50_);
	_g_object_unref0 (self->priv->spinner);
	self->priv->spinner = _tmp51_;
	_tmp52_ = self->priv->spinner;
	gtk_spinner_start (_tmp52_);
	_tmp53_ = self->priv->spinner;
	_tmp54_ = (GtkToolButton*) gtk_tool_button_new ((GtkWidget*) _tmp53_, NULL);
	_tmp55_ = g_object_ref_sink (_tmp54_);
	_g_object_unref0 (self->priv->spinner_btn);
	self->priv->spinner_btn = _tmp55_;
	_tmp56_ = self->priv->spinner_btn;
	gtk_widget_set_valign ((GtkWidget*) _tmp56_, GTK_ALIGN_CENTER);
	_tmp57_ = self->priv->spinner_btn;
	_tmp58_ = gtk_widget_get_style_context ((GtkWidget*) _tmp57_);
	gtk_style_context_add_class (_tmp58_, "raised");
	_tmp59_ = self->priv->spinner_btn;
	gtk_toolbar_insert (toolbar_end, (GtkToolItem*) _tmp59_, 0);
	_tmp60_ = (GtkToggleToolButton*) gtk_toggle_tool_button_new ();
	_tmp61_ = g_object_ref_sink (_tmp60_);
	_g_object_unref0 (self->priv->select_btn);
	self->priv->select_btn = _tmp61_;
	_tmp62_ = self->priv->select_btn;
	gtk_tool_button_set_icon_name ((GtkToolButton*) _tmp62_, "emblem-default-symbolic");
	_tmp63_ = self->priv->select_btn;
	_tmp64_ = gtk_widget_get_style_context ((GtkWidget*) _tmp63_);
	gtk_style_context_add_class (_tmp64_, "raised");
	_tmp65_ = self->priv->select_btn;
	gtk_widget_set_valign ((GtkWidget*) _tmp65_, GTK_ALIGN_CENTER);
	_tmp66_ = self->priv->select_btn;
	g_signal_connect_object ((GtkToolButton*) _tmp66_, "clicked", (GCallback) ___lambda4__gtk_tool_button_clicked, self, 0);
	_tmp67_ = self->priv->select_btn;
	gtk_toolbar_insert (toolbar_end, (GtkToolItem*) _tmp67_, 1);
	gtk_toolbar_set_show_arrow (toolbar_end, FALSE);
	_tmp68_ = hbox;
	gtk_box_pack_start ((GtkBox*) _tmp68_, (GtkWidget*) toolbar_end, FALSE, FALSE, (guint) 0);
	_tmp69_ = (GtkHBox*) gtk_hbox_new (FALSE, 0);
	_tmp70_ = g_object_ref_sink (_tmp69_);
	_g_object_unref0 (hbox);
	hbox = _tmp70_;
	_tmp71_ = self->notebook;
	_tmp72_ = hbox;
	gtk_notebook_append_page (_tmp71_, (GtkWidget*) _tmp72_, NULL);
	_tmp73_ = hbox;
	_tmp74_ = gtk_widget_get_style_context ((GtkWidget*) _tmp73_);
	gtk_style_context_add_class (_tmp74_, GTK_STYLE_CLASS_SIDEBAR);
	_tmp75_ = (GtkToolbar*) gtk_toolbar_new ();
	_tmp76_ = g_object_ref_sink (_tmp75_);
	toolbar_selection = _tmp76_;
	gtk_toolbar_set_style (toolbar_selection, GTK_TOOLBAR_TEXT);
	_tmp77_ = gtk_widget_get_style_context ((GtkWidget*) toolbar_selection);
	gtk_style_context_add_class (_tmp77_, GTK_STYLE_CLASS_MENUBAR);
	gtk_toolbar_set_icon_size (toolbar_selection, (gint) GTK_ICON_SIZE_MENU);
	gtk_toolbar_set_show_arrow (toolbar_selection, FALSE);
	_tmp78_ = hbox;
	gtk_box_pack_start ((GtkBox*) _tmp78_, (GtkWidget*) toolbar_selection, TRUE, TRUE, (guint) 0);
	_tmp79_ = (GtkLabel*) gtk_label_new ("");
	_tmp80_ = g_object_ref_sink (_tmp79_);
	_g_object_unref0 (self->priv->selection_label);
	self->priv->selection_label = _tmp80_;
	boxes_topbar_update_selection_label (self);
	_tmp81_ = self->priv->selection_label;
	gtk_label_set_use_markup (_tmp81_, TRUE);
	_tmp82_ = gtk_tool_item_new ();
	_tmp83_ = g_object_ref_sink (_tmp82_);
	_g_object_unref0 (tool_item);
	tool_item = _tmp83_;
	_tmp84_ = tool_item;
	gtk_tool_item_set_expand (_tmp84_, TRUE);
	_tmp85_ = tool_item;
	_tmp86_ = self->priv->selection_label;
	g_object_set ((GtkContainer*) _tmp85_, "child", (GtkWidget*) _tmp86_, NULL);
	_tmp87_ = tool_item;
	gtk_toolbar_insert (toolbar_selection, _tmp87_, 0);
	_tmp88_ = (GtkToolButton*) gtk_tool_button_new_from_stock ("gtk-cancel");
	_tmp89_ = g_object_ref_sink (_tmp88_);
	_g_object_unref0 (self->priv->cancel_btn);
	self->priv->cancel_btn = _tmp89_;
	_tmp90_ = self->priv->cancel_btn;
	_tmp91_ = gtk_widget_get_style_context ((GtkWidget*) _tmp90_);
	gtk_style_context_add_class (_tmp91_, "raised");
	_tmp92_ = self->priv->cancel_btn;
	gtk_widget_set_valign ((GtkWidget*) _tmp92_, GTK_ALIGN_CENTER);
	_tmp93_ = self->priv->cancel_btn;
	gtk_toolbar_insert (toolbar_selection, (GtkToolItem*) _tmp93_, 1);
	_tmp94_ = self->priv->cancel_btn;
	g_signal_connect_object (_tmp94_, "clicked", (GCallback) ___lambda103__gtk_tool_button_clicked, self, 0);
	_tmp95_ = (GtkHBox*) gtk_hbox_new (FALSE, 0);
	_tmp96_ = g_object_ref_sink (_tmp95_);
	_g_object_unref0 (hbox);
	hbox = _tmp96_;
	_tmp97_ = hbox;
	g_object_set ((GtkWidget*) _tmp97_, "margin", 5, NULL);
	_tmp98_ = self->notebook;
	_tmp99_ = hbox;
	gtk_notebook_append_page (_tmp98_, (GtkWidget*) _tmp99_, NULL);
	_tmp100_ = hbox;
	_tmp101_ = gtk_widget_get_style_context ((GtkWidget*) _tmp100_);
	gtk_style_context_add_class (_tmp101_, GTK_STYLE_CLASS_SIDEBAR);
	_tmp102_ = (GtkHBox*) gtk_hbox_new (FALSE, 0);
	_tmp103_ = g_object_ref_sink (_tmp102_);
	_g_object_unref0 (hbox);
	hbox = _tmp103_;
	_tmp104_ = self->notebook;
	_tmp105_ = hbox;
	gtk_notebook_append_page (_tmp104_, (GtkWidget*) _tmp105_, NULL);
	_tmp106_ = hbox;
	_tmp107_ = gtk_widget_get_style_context ((GtkWidget*) _tmp106_);
	gtk_style_context_add_class (_tmp107_, GTK_STYLE_CLASS_SIDEBAR);
	_tmp108_ = self->notebook;
	gtk_notebook_set_show_tabs (_tmp108_, FALSE);
	_tmp109_ = self->notebook;
	gtk_widget_show_all ((GtkWidget*) _tmp109_);
	_tmp110_ = self->priv->app;
	_tmp111_ = _tmp110_->state;
	_tmp112_ = self->priv->gtk_actor;
	g_value_init (&_tmp113_, G_TYPE_FLOAT);
	g_value_set_float (&_tmp113_, -((gfloat) BOXES_TOPBAR_height));
	clutter_state_set_key (_tmp111_, NULL, "display-fullscreen", (GObject*) _tmp112_, "y", (guint) CLUTTER_EASE_OUT_QUAD, &_tmp113_, (gdouble) 0, (gdouble) 0);
	G_IS_VALUE (&_tmp113_) ? (g_value_unset (&_tmp113_), NULL) : NULL;
	_g_object_unref0 (toolbar_selection);
	_g_object_unref0 (toolbar_end);
	_g_object_unref0 (tool_item);
	_g_object_unref0 (toolbar_start);
	_g_object_unref0 (hbox);
}


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


static void boxes_topbar_update_selection_label (BoxesTopbar* self) {
	BoxesApp* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	GList* _tmp3_;
	guint _tmp4_ = 0U;
	guint _tmp5_;
	guint items;
	guint _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->app;
	_tmp1_ = boxes_app_get_selected_items (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp4_ = g_list_length (_tmp3_);
	_tmp5_ = _tmp4_;
	__g_list_free__g_object_unref0_0 (_tmp3_);
	items = _tmp5_;
	_tmp6_ = items;
	if (_tmp6_ > ((guint) 0)) {
		GtkLabel* _tmp7_;
		guint _tmp8_;
		const gchar* _tmp9_ = NULL;
		guint _tmp10_;
		gchar* _tmp11_ = NULL;
		gchar* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		_tmp7_ = self->priv->selection_label;
		_tmp8_ = items;
		_tmp9_ = ngettext ("%d selected", "%d selected", (gulong) _tmp8_);
		_tmp10_ = items;
		_tmp11_ = g_strdup_printf (_tmp9_, _tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = g_strconcat ("<b>", _tmp12_, NULL);
		_tmp14_ = _tmp13_;
		_tmp15_ = g_strconcat (_tmp14_, "</b>", NULL);
		_tmp16_ = _tmp15_;
		gtk_label_set_markup (_tmp7_, _tmp16_);
		_g_free0 (_tmp16_);
		_g_free0 (_tmp14_);
		_g_free0 (_tmp12_);
	} else {
		GtkLabel* _tmp17_;
		const gchar* _tmp18_ = NULL;
		gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		_tmp17_ = self->priv->selection_label;
		_tmp18_ = _ ("Click on items to select them");
		_tmp19_ = g_strconcat ("<i>", _tmp18_, NULL);
		_tmp20_ = _tmp19_;
		_tmp21_ = g_strconcat (_tmp20_, "</i>", NULL);
		_tmp22_ = _tmp21_;
		gtk_label_set_markup (_tmp17_, _tmp22_);
		_g_free0 (_tmp22_);
		_g_free0 (_tmp20_);
	}
}


static void boxes_topbar_real_ui_state_changed (BoxesUI* base) {
	BoxesTopbar * self;
	BoxesUIState _tmp0_;
	BoxesUIState _tmp1_;
	self = (BoxesTopbar*) base;
	_tmp0_ = boxes_ui_get_ui_state ((BoxesUI*) self);
	_tmp1_ = _tmp0_;
	switch (_tmp1_) {
		case BOXES_UI_STATE_COLLECTION:
		{
			GtkNotebook* _tmp2_;
			GtkToolButton* _tmp3_;
			GtkToolButton* _tmp4_;
			GtkToggleToolButton* _tmp5_;
			GtkButton* _tmp6_;
			_tmp2_ = self->notebook;
			g_object_set (_tmp2_, "page", (gint) BOXES_TOPBAR_PAGE_COLLECTION, NULL);
			_tmp3_ = self->priv->back_btn;
			gtk_widget_hide ((GtkWidget*) _tmp3_);
			_tmp4_ = self->priv->spinner_btn;
			gtk_widget_hide ((GtkWidget*) _tmp4_);
			_tmp5_ = self->priv->select_btn;
			gtk_widget_show ((GtkWidget*) _tmp5_);
			_tmp6_ = self->priv->new_btn;
			gtk_widget_show ((GtkWidget*) _tmp6_);
			break;
		}
		case BOXES_UI_STATE_CREDS:
		{
			GtkButton* _tmp7_;
			GtkToolButton* _tmp8_;
			GtkToolButton* _tmp9_;
			GtkToggleToolButton* _tmp10_;
			_tmp7_ = self->priv->new_btn;
			gtk_widget_hide ((GtkWidget*) _tmp7_);
			_tmp8_ = self->priv->back_btn;
			gtk_widget_show ((GtkWidget*) _tmp8_);
			_tmp9_ = self->priv->spinner_btn;
			gtk_widget_show ((GtkWidget*) _tmp9_);
			_tmp10_ = self->priv->select_btn;
			gtk_widget_hide ((GtkWidget*) _tmp10_);
			break;
		}
		case BOXES_UI_STATE_DISPLAY:
		{
			GtkClutterActor* _tmp11_;
			_tmp11_ = self->priv->gtk_actor;
			boxes_actor_pin ((ClutterActor*) _tmp11_);
			break;
		}
		case BOXES_UI_STATE_PROPERTIES:
		{
			GtkNotebook* _tmp12_;
			_tmp12_ = self->notebook;
			g_object_set (_tmp12_, "page", (gint) BOXES_TOPBAR_PAGE_PROPERTIES, NULL);
			break;
		}
		case BOXES_UI_STATE_WIZARD:
		{
			GtkNotebook* _tmp13_;
			_tmp13_ = self->notebook;
			g_object_set (_tmp13_, "page", (gint) BOXES_TOPBAR_PAGE_WIZARD, NULL);
			break;
		}
		default:
		{
			break;
		}
	}
}


static ClutterActor* boxes_topbar_real_get_actor (BoxesUI* base) {
	ClutterActor* result;
	BoxesTopbar* self;
	GtkClutterActor* _tmp0_;
	self = (BoxesTopbar*) base;
	_tmp0_ = self->priv->gtk_actor;
	result = (ClutterActor*) _tmp0_;
	return result;
}


static void boxes_topbar_class_init (BoxesTopbarClass * klass) {
	boxes_topbar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesTopbarPrivate));
	BOXES_UI_CLASS (klass)->ui_state_changed = boxes_topbar_real_ui_state_changed;
	BOXES_UI_CLASS (klass)->get_actor = boxes_topbar_real_get_actor;
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_topbar_get_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_topbar_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_TOPBAR_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));
}


static void boxes_topbar_instance_init (BoxesTopbar * self) {
	self->priv = BOXES_TOPBAR_GET_PRIVATE (self);
}


static void boxes_topbar_finalize (GObject* obj) {
	BoxesTopbar * self;
	self = BOXES_TOPBAR (obj);
	_g_object_unref0 (self->label);
	_g_object_unref0 (self->priv->app);
	_g_object_unref0 (self->priv->gtk_actor);
	_g_object_unref0 (self->notebook);
	_g_object_unref0 (self->priv->spinner);
	_g_object_unref0 (self->priv->select_btn);
	_g_object_unref0 (self->priv->cancel_btn);
	_g_object_unref0 (self->priv->spinner_btn);
	_g_object_unref0 (self->priv->back_btn);
	_g_object_unref0 (self->priv->new_btn);
	_g_object_unref0 (self->priv->selection_label);
	G_OBJECT_CLASS (boxes_topbar_parent_class)->finalize (obj);
}


GType boxes_topbar_get_type (void) {
	static volatile gsize boxes_topbar_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_topbar_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesTopbarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_topbar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesTopbar), 0, (GInstanceInitFunc) boxes_topbar_instance_init, NULL };
		GType boxes_topbar_type_id;
		boxes_topbar_type_id = g_type_register_static (BOXES_TYPE_UI, "BoxesTopbar", &g_define_type_info, 0);
		g_once_init_leave (&boxes_topbar_type_id__volatile, boxes_topbar_type_id);
	}
	return boxes_topbar_type_id__volatile;
}


static void _vala_boxes_topbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesTopbar * self;
	self = BOXES_TOPBAR (object);
	switch (property_id) {
		case BOXES_TOPBAR_ACTOR:
		g_value_set_object (value, boxes_ui_get_actor ((BoxesUI*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



