/* selectionbar.c generated by valac 0.17.3.12-6a5ea3, the Vala compiler
 * generated from selectionbar.vala, do not modify */

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

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


#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;
typedef struct _BoxesSelectionbarPrivate BoxesSelectionbarPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

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

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

#define BOXES_TYPE_UI_STATE (boxes_ui_state_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_PROPERTY (boxes_property_get_type ())
#define BOXES_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PROPERTY, BoxesProperty))
#define BOXES_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PROPERTY, BoxesPropertyClass))
#define BOXES_IS_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PROPERTY))
#define BOXES_IS_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PROPERTY))
#define BOXES_PROPERTY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PROPERTY, BoxesPropertyClass))

typedef struct _BoxesProperty BoxesProperty;
typedef struct _BoxesPropertyClass BoxesPropertyClass;
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;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))

struct _BoxesSelectionbar {
	GObject parent_instance;
	BoxesSelectionbarPrivate * priv;
};

struct _BoxesSelectionbarClass {
	GObjectClass parent_class;
};

struct _BoxesSelectionbarPrivate {
	GtkClutterActor* gtk_actor;
	GtkToolbar* toolbar;
	GtkToggleToolButton* favorite_btn;
	GtkToggleToolButton* remove_btn;
};

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 _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;
	BoxesMachineActor* machine_actor;
	BoxesCollectionSource* source;
	BoxesDisplayConfig* config;
	gboolean stay_on_display;
	gboolean deleted;
};

struct _BoxesMachineClass {
	BoxesCollectionItemClass parent_class;
	void (*take_screenshot) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GdkPixbuf* (*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);
};


static gpointer boxes_selectionbar_parent_class = NULL;
extern BoxesApp* boxes_app_app;

GType boxes_selectionbar_get_type (void) G_GNUC_CONST;
#define BOXES_SELECTIONBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbarPrivate))
enum  {
	BOXES_SELECTIONBAR_DUMMY_PROPERTY,
	BOXES_SELECTIONBAR_ACTOR
};
#define BOXES_SELECTIONBAR_spacing 60.0f
BoxesSelectionbar* boxes_selectionbar_new (void);
BoxesSelectionbar* boxes_selectionbar_construct (GType object_type);
void boxes_draw_as_css_box (GtkWidget* widget);
static void __lambda100_ (BoxesSelectionbar* self);
GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_app_get_type (void) G_GNUC_CONST;
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
GList* boxes_app_get_selected_items (BoxesApp* self);
GType boxes_machine_get_type (void) G_GNUC_CONST;
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_properties_page_get_type (void) G_GNUC_CONST;
GType boxes_property_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;
void boxes_display_config_add_category (BoxesDisplayConfig* self, const gchar* category);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
static void ___lambda100__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
static void __lambda101_ (BoxesSelectionbar* self);
void boxes_app_remove_selected_items (BoxesApp* self);
static void ___lambda101__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
ClutterActor* boxes_selectionbar_get_actor (BoxesSelectionbar* self);
static void __lambda104_ (BoxesSelectionbar* self);
static void boxes_selectionbar_update_visible (BoxesSelectionbar* self);
static void ___lambda104__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __lambda105_ (BoxesSelectionbar* self);
static void ___lambda105__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
gboolean boxes_app_get_selection_mode (BoxesApp* self);
static void boxes_selectionbar_set_visible (BoxesSelectionbar* self, gboolean value);
void boxes_fade_actor (ClutterActor* actor, guint opacity);
static void boxes_selectionbar_finalize (GObject* obj);
static void _vala_boxes_selectionbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_selectionbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


static gpointer _g_object_ref0 (gpointer self) {
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	return self ? g_object_ref (self) : NULL;
#line 260 "selectionbar.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 267 "selectionbar.c"
}


static void _g_list_free__g_object_unref0_ (GList* self) {
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_list_free (self);
#line 276 "selectionbar.c"
}


static void __lambda100_ (BoxesSelectionbar* self) {
	BoxesApp* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp0_ = boxes_app_app;
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp1_ = boxes_app_get_selected_items (_tmp0_);
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp2_ = _tmp1_;
#line 290 "selectionbar.c"
	{
		GList* item_collection = NULL;
		GList* item_it = NULL;
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		item_collection = _tmp2_;
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		for (item_it = item_collection; item_it != NULL; item_it = item_it->next) {
#line 298 "selectionbar.c"
			BoxesCollectionItem* _tmp3_;
			BoxesCollectionItem* item = NULL;
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
			_tmp3_ = _g_object_ref0 ((BoxesCollectionItem*) item_it->data);
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
			item = _tmp3_;
#line 305 "selectionbar.c"
			{
				BoxesCollectionItem* _tmp4_;
				BoxesMachine* _tmp5_;
				BoxesMachine* machine;
				BoxesMachine* _tmp6_;
#line 33 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
				_tmp4_ = item;
#line 33 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
				_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp4_) : NULL);
#line 33 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
				machine = _tmp5_;
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
				_tmp6_ = machine;
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
				if (_tmp6_ != NULL) {
#line 321 "selectionbar.c"
					BoxesMachine* _tmp7_;
					BoxesDisplayConfig* _tmp8_;
#line 35 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
					_tmp7_ = machine;
#line 35 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
					_tmp8_ = _tmp7_->config;
#line 35 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
					boxes_display_config_add_category (_tmp8_, "favourite");
#line 330 "selectionbar.c"
				}
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
				_g_object_unref0 (machine);
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
				_g_object_unref0 (item);
#line 336 "selectionbar.c"
			}
		}
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		__g_list_free__g_object_unref0_0 (item_collection);
#line 341 "selectionbar.c"
	}
}


static void ___lambda100__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
#line 31 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	__lambda100_ (self);
#line 349 "selectionbar.c"
}


static void __lambda101_ (BoxesSelectionbar* self) {
	BoxesApp* _tmp0_;
#line 46 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp0_ = boxes_app_app;
#line 46 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	boxes_app_remove_selected_items (_tmp0_);
#line 359 "selectionbar.c"
}


static void ___lambda101__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
#line 45 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	__lambda101_ (self);
#line 366 "selectionbar.c"
}


static void __lambda104_ (BoxesSelectionbar* self) {
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	boxes_selectionbar_update_visible (self);
#line 373 "selectionbar.c"
}


static void ___lambda104__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	__lambda104_ (self);
#line 380 "selectionbar.c"
}


static void __lambda105_ (BoxesSelectionbar* self) {
#line 57 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	boxes_selectionbar_update_visible (self);
#line 387 "selectionbar.c"
}


static void ___lambda105__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	__lambda105_ (self);
#line 394 "selectionbar.c"
}


BoxesSelectionbar* boxes_selectionbar_construct (GType object_type) {
	BoxesSelectionbar * self = NULL;
	GtkToolbar* _tmp0_;
	GtkToolbar* _tmp1_;
	GtkToolbar* _tmp2_;
	GtkAlignment* _tmp3_;
	GtkAlignment* bin;
	GtkToolbar* _tmp4_;
	GtkStyleContext* _tmp5_ = NULL;
	GtkClutterActor* _tmp6_;
	GtkClutterActor* _tmp7_;
	GtkWidget* _tmp8_ = NULL;
	GtkStyleContext* _tmp9_ = NULL;
	GtkClutterActor* _tmp10_;
	GtkToggleToolButton* _tmp11_;
	GtkToolbar* _tmp12_;
	GtkToggleToolButton* _tmp13_;
	GtkToggleToolButton* _tmp14_;
	GtkToggleToolButton* _tmp15_;
	GtkSeparatorToolItem* _tmp16_;
	GtkSeparatorToolItem* separator;
	GtkToolbar* _tmp17_;
	GtkToggleToolButton* _tmp18_;
	GtkToolbar* _tmp19_;
	GtkToggleToolButton* _tmp20_;
	GtkToggleToolButton* _tmp21_;
	GtkToggleToolButton* _tmp22_;
	GtkToolbar* _tmp23_;
	ClutterActor* _tmp24_;
	ClutterActor* _tmp25_;
	BoxesApp* _tmp26_;
	BoxesApp* _tmp27_;
#line 14 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	self = (BoxesSelectionbar*) g_object_new (object_type, NULL);
#line 15 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp0_ = (GtkToolbar*) gtk_toolbar_new ();
#line 15 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_object_ref_sink (_tmp0_);
#line 15 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_g_object_unref0 (self->priv->toolbar);
#line 15 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	self->priv->toolbar = _tmp0_;
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp1_ = self->priv->toolbar;
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	gtk_toolbar_set_show_arrow (_tmp1_, FALSE);
#line 17 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp2_ = self->priv->toolbar;
#line 17 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	gtk_toolbar_set_icon_size (_tmp2_, (gint) GTK_ICON_SIZE_LARGE_TOOLBAR);
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp3_ = (GtkAlignment*) gtk_alignment_new ((gfloat) 0, (gfloat) 0, (gfloat) 1, (gfloat) 1);
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_object_ref_sink (_tmp3_);
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	bin = _tmp3_;
#line 20 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	boxes_draw_as_css_box ((GtkWidget*) bin);
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp4_ = self->priv->toolbar;
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	gtk_container_add ((GtkContainer*) bin, (GtkWidget*) _tmp4_);
#line 22 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp5_ = gtk_widget_get_style_context ((GtkWidget*) bin);
#line 22 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	gtk_style_context_add_class (_tmp5_, "selectionbar");
#line 24 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp6_ = (GtkClutterActor*) gtk_clutter_actor_new_with_contents ((GtkWidget*) bin);
#line 24 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_object_ref_sink (_tmp6_);
#line 24 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_g_object_unref0 (self->priv->gtk_actor);
#line 24 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	self->priv->gtk_actor = _tmp6_;
#line 25 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp7_ = self->priv->gtk_actor;
#line 25 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp8_ = gtk_clutter_actor_get_widget (_tmp7_);
#line 25 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp9_ = gtk_widget_get_style_context (_tmp8_);
#line 25 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	gtk_style_context_add_class (_tmp9_, "boxes-bg");
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp10_ = self->priv->gtk_actor;
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	clutter_actor_set_opacity ((ClutterActor*) _tmp10_, (guint) 0);
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp11_ = (GtkToggleToolButton*) gtk_toggle_tool_button_new ();
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_object_ref_sink (_tmp11_);
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_g_object_unref0 (self->priv->favorite_btn);
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	self->priv->favorite_btn = _tmp11_;
#line 29 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp12_ = self->priv->toolbar;
#line 29 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp13_ = self->priv->favorite_btn;
#line 29 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	gtk_toolbar_insert (_tmp12_, (GtkToolItem*) _tmp13_, 0);
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp14_ = self->priv->favorite_btn;
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	gtk_tool_button_set_icon_name ((GtkToolButton*) _tmp14_, "emblem-favorite-symbolic");
#line 31 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp15_ = self->priv->favorite_btn;
#line 31 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_signal_connect_object ((GtkToolButton*) _tmp15_, "clicked", (GCallback) ___lambda100__gtk_tool_button_clicked, self, 0);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp16_ = (GtkSeparatorToolItem*) gtk_separator_tool_item_new ();
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_object_ref_sink (_tmp16_);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	separator = _tmp16_;
#line 40 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp17_ = self->priv->toolbar;
#line 40 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	gtk_toolbar_insert (_tmp17_, (GtkToolItem*) separator, 1);
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp18_ = (GtkToggleToolButton*) gtk_toggle_tool_button_new ();
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_object_ref_sink (_tmp18_);
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_g_object_unref0 (self->priv->remove_btn);
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	self->priv->remove_btn = _tmp18_;
#line 43 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp19_ = self->priv->toolbar;
#line 43 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp20_ = self->priv->remove_btn;
#line 43 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	gtk_toolbar_insert (_tmp19_, (GtkToolItem*) _tmp20_, 2);
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp21_ = self->priv->remove_btn;
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	gtk_tool_button_set_icon_name ((GtkToolButton*) _tmp21_, "edit-delete-symbolic");
#line 45 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp22_ = self->priv->remove_btn;
#line 45 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_signal_connect_object ((GtkToolButton*) _tmp22_, "clicked", (GCallback) ___lambda101__gtk_tool_button_clicked, self, 0);
#line 48 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp23_ = self->priv->toolbar;
#line 48 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	gtk_widget_show_all ((GtkWidget*) _tmp23_);
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp24_ = boxes_selectionbar_get_actor (self);
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp25_ = _tmp24_;
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	clutter_actor_set_reactive (_tmp25_, TRUE);
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp26_ = boxes_app_app;
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_signal_connect_object ((GObject*) _tmp26_, "notify::selection-mode", (GCallback) ___lambda104__g_object_notify, self, 0);
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp27_ = boxes_app_app;
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_signal_connect_object ((GObject*) _tmp27_, "notify::selected-items", (GCallback) ___lambda105__g_object_notify, self, 0);
#line 14 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_g_object_unref0 (separator);
#line 14 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_g_object_unref0 (bin);
#line 14 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	return self;
#line 562 "selectionbar.c"
}


BoxesSelectionbar* boxes_selectionbar_new (void) {
#line 14 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	return boxes_selectionbar_construct (BOXES_TYPE_SELECTIONBAR);
#line 569 "selectionbar.c"
}


static void boxes_selectionbar_update_visible (BoxesSelectionbar* self) {
	BoxesApp* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_return_if_fail (self != NULL);
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp0_ = boxes_app_app;
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp1_ = boxes_app_get_selection_mode (_tmp0_);
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp2_ = _tmp1_;
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	if (!_tmp2_) {
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		boxes_selectionbar_set_visible (self, FALSE);
#line 589 "selectionbar.c"
	} else {
		BoxesApp* _tmp3_;
		GList* _tmp4_;
		GList* _tmp5_;
		GList* _tmp6_;
		guint _tmp7_ = 0U;
#line 65 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		_tmp3_ = boxes_app_app;
#line 65 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		_tmp4_ = boxes_app_get_selected_items (_tmp3_);
#line 65 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		_tmp5_ = _tmp4_;
#line 65 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		_tmp6_ = _tmp5_;
#line 65 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		_tmp7_ = g_list_length (_tmp6_);
#line 65 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		boxes_selectionbar_set_visible (self, _tmp7_ > ((guint) 0));
#line 65 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		__g_list_free__g_object_unref0_0 (_tmp6_);
#line 610 "selectionbar.c"
	}
}


ClutterActor* boxes_selectionbar_get_actor (BoxesSelectionbar* self) {
	ClutterActor* result;
	GtkClutterActor* _tmp0_;
#line 6 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 6 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp0_ = self->priv->gtk_actor;
#line 6 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	result = (ClutterActor*) _tmp0_;
#line 6 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	return result;
#line 626 "selectionbar.c"
}


static void boxes_selectionbar_set_visible (BoxesSelectionbar* self, gboolean value) {
	gint _tmp0_ = 0;
	gboolean _tmp1_;
	ClutterActor* _tmp2_;
	ClutterActor* _tmp3_;
	gint _tmp4_;
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_return_if_fail (self != NULL);
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp1_ = value;
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	if (_tmp1_) {
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		_tmp0_ = 255;
#line 644 "selectionbar.c"
	} else {
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		_tmp0_ = 0;
#line 648 "selectionbar.c"
	}
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp2_ = boxes_selectionbar_get_actor (self);
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp3_ = _tmp2_;
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_tmp4_ = _tmp0_;
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	boxes_fade_actor (_tmp3_, (guint) _tmp4_);
#line 658 "selectionbar.c"
}


static void boxes_selectionbar_class_init (BoxesSelectionbarClass * klass) {
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	boxes_selectionbar_parent_class = g_type_class_peek_parent (klass);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_type_class_add_private (klass, sizeof (BoxesSelectionbarPrivate));
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_selectionbar_get_property;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_selectionbar_set_property;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_selectionbar_finalize;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SELECTIONBAR_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));
#line 675 "selectionbar.c"
}


static void boxes_selectionbar_instance_init (BoxesSelectionbar * self) {
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	self->priv = BOXES_SELECTIONBAR_GET_PRIVATE (self);
#line 682 "selectionbar.c"
}


static void boxes_selectionbar_finalize (GObject* obj) {
	BoxesSelectionbar * self;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_SELECTIONBAR, BoxesSelectionbar);
#line 9 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_g_object_unref0 (self->priv->gtk_actor);
#line 10 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_g_object_unref0 (self->priv->toolbar);
#line 11 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_g_object_unref0 (self->priv->favorite_btn);
#line 12 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	_g_object_unref0 (self->priv->remove_btn);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	G_OBJECT_CLASS (boxes_selectionbar_parent_class)->finalize (obj);
#line 700 "selectionbar.c"
}


GType boxes_selectionbar_get_type (void) {
	static volatile gsize boxes_selectionbar_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_selectionbar_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesSelectionbarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_selectionbar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesSelectionbar), 0, (GInstanceInitFunc) boxes_selectionbar_instance_init, NULL };
		GType boxes_selectionbar_type_id;
		boxes_selectionbar_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesSelectionbar", &g_define_type_info, 0);
		g_once_init_leave (&boxes_selectionbar_type_id__volatile, boxes_selectionbar_type_id);
	}
	return boxes_selectionbar_type_id__volatile;
}


static void _vala_boxes_selectionbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesSelectionbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_SELECTIONBAR, BoxesSelectionbar);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	switch (property_id) {
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		case BOXES_SELECTIONBAR_ACTOR:
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		g_value_set_object (value, boxes_selectionbar_get_actor (self));
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		break;
#line 727 "selectionbar.c"
		default:
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		break;
#line 733 "selectionbar.c"
	}
}


static void _vala_boxes_selectionbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesSelectionbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_SELECTIONBAR, BoxesSelectionbar);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
	switch (property_id) {
#line 743 "selectionbar.c"
		default:
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/selectionbar.vala"
		break;
#line 749 "selectionbar.c"
	}
}



