/* machine.c generated by valac 0.17.1.6-d284, the Vala compiler
 * generated from machine.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 <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <clutter-gtk/clutter-gtk.h>
#include <cairo.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>
#include <glib/gi18n-lib.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_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;
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;

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

#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_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 BOXES_MACHINE_TYPE_MACHINE_STATE (boxes_machine_machine_state_get_type ())

#define BOXES_TYPE_DISPLAY (boxes_display_get_type ())
#define BOXES_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DISPLAY, BoxesDisplay))
#define BOXES_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DISPLAY, BoxesDisplayClass))
#define BOXES_IS_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DISPLAY))
#define BOXES_IS_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DISPLAY))
#define BOXES_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DISPLAY, BoxesDisplayClass))

typedef struct _BoxesDisplay BoxesDisplay;
typedef struct _BoxesDisplayClass BoxesDisplayClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block17Data Block17Data;
typedef struct _BoxesAppPrivate BoxesAppPrivate;

#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 _g_free0(var) (var = (g_free (var), NULL))
typedef struct _BoxesMachineTakeScreenshotData BoxesMachineTakeScreenshotData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesMachineUpdateScreenshotData BoxesMachineUpdateScreenshotData;
#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL)))
#define _cairo_pattern_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_pattern_destroy (var), NULL)))
#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL)))
#define _gtk_icon_info_free0(var) ((var == NULL) ? NULL : (var = (gtk_icon_info_free (var), NULL)))
typedef struct _BoxesMachineActorPrivate BoxesMachineActorPrivate;
typedef struct _Block18Data Block18Data;

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

typedef enum  {
	BOXES_MACHINE_MACHINE_STATE_UNKNOWN,
	BOXES_MACHINE_MACHINE_STATE_STOPPED,
	BOXES_MACHINE_MACHINE_STATE_RUNNING,
	BOXES_MACHINE_MACHINE_STATE_PAUSED
} BoxesMachineMachineState;

struct _BoxesMachinePrivate {
	GdkPixbuf* _pixbuf;
	gulong show_id;
	gulong hide_id;
	gulong disconnected_id;
	gulong need_password_id;
	gulong need_username_id;
	gulong ui_state_id;
	guint screenshot_id;
	BoxesMachineMachineState _state;
	BoxesDisplay* _display;
};

struct _Block17Data {
	int _ref_count_;
	BoxesMachine * 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;
};

struct _BoxesMachineTakeScreenshotData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesMachine* self;
	gboolean result;
};

struct _BoxesMachineUpdateScreenshotData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesMachine* self;
	gint width;
	gint height;
	gchar* _tmp0_;
	gchar* _tmp1_;
	GdkPixbuf* _tmp2_;
	GdkPixbuf* _tmp3_;
	GdkPixbuf* _tmp4_;
	GdkPixbuf* _tmp5_;
	BoxesMachineActor* _tmp6_;
	GdkPixbuf* _tmp7_;
	GdkPixbuf* _tmp8_;
	gint _tmp9_;
	gint _tmp10_;
	GdkPixbuf* _tmp11_;
	GdkPixbuf* _tmp12_;
	GError* _error_;
	GError* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	GError* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	GdkPixbuf* _tmp20_;
	gint _tmp21_;
	gint _tmp22_;
	GdkPixbuf* _tmp23_;
	GdkPixbuf* _tmp24_;
	BoxesMachineActor* _tmp25_;
	GdkPixbuf* _tmp26_;
	GError * _inner_error_;
};

typedef enum  {
	BOXES_ERROR_INVALID,
	BOXES_ERROR_COMMAND_FAILED
} BoxesError;
#define BOXES_ERROR boxes_error_quark ()
struct _BoxesMachineActor {
	BoxesUI parent_instance;
	BoxesMachineActorPrivate * priv;
	ClutterBox* box;
};

struct _BoxesMachineActorClass {
	BoxesUIClass parent_class;
};

struct _BoxesMachineActorPrivate {
	ClutterBindConstraint* yconstraint;
	GtkClutterTexture* screenshot;
	GtkClutterActor* gtk_vbox;
	GtkClutterActor* display;
	GtkLabel* label;
	GtkVBox* vbox;
	GtkEntry* password_entry;
	BoxesMachine* machine;
	gulong height_id;
};

struct _Block18Data {
	int _ref_count_;
	BoxesMachineActor * self;
	BoxesMachine* machine;
};


static gpointer boxes_machine_parent_class = NULL;
static GdkPixbuf* boxes_machine_default_fallback;
static GdkPixbuf* boxes_machine_default_fallback = NULL;
static BoxesIPropertiesProviderIface* boxes_machine_boxes_iproperties_provider_parent_iface = NULL;
static gpointer boxes_machine_actor_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_item_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_get_type (void) G_GNUC_CONST;
GType boxes_app_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;
GType boxes_machine_machine_state_get_type (void) G_GNUC_CONST;
GType boxes_display_get_type (void) G_GNUC_CONST;
#define BOXES_MACHINE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_MACHINE, BoxesMachinePrivate))
enum  {
	BOXES_MACHINE_DUMMY_PROPERTY,
	BOXES_MACHINE_ACTOR,
	BOXES_MACHINE_PIXBUF,
	BOXES_MACHINE_STATE,
	BOXES_MACHINE_DISPLAY
};
#define BOXES_MACHINE_SCREENSHOT_WIDTH 180
#define BOXES_MACHINE_SCREENSHOT_HEIGHT 134
BoxesMachine* boxes_machine_construct (GType object_type, BoxesCollectionSource* source, BoxesApp* app, const gchar* name);
static Block17Data* block17_data_ref (Block17Data* _data17_);
static void block17_data_unref (void * _userdata_);
BoxesCollectionItem* boxes_collection_item_construct (GType object_type);
void boxes_collection_item_set_name (BoxesCollectionItem* self, const gchar* value);
static GdkPixbuf* boxes_machine_draw_fallback_vm (gint width, gint height, gboolean force);
void boxes_machine_set_pixbuf (BoxesMachine* self, GdkPixbuf* value);
BoxesMachineActor* boxes_machine_actor_new (BoxesMachine* machine);
BoxesMachineActor* boxes_machine_actor_construct (GType object_type, BoxesMachine* machine);
static void __lambda39_ (Block17Data* _data17_);
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
void boxes_machine_set_screenshot_enable (BoxesMachine* self, gboolean enable);
static void ___lambda39__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
void boxes_machine_update_screenshot (BoxesMachine* self, gint width, gint height, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_machine_update_screenshot_finish (BoxesMachine* self, GAsyncResult* _res_);
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 gboolean ___lambda40_ (BoxesMachine* self);
static gboolean ____lambda40__gsource_func (gpointer self);
gchar* boxes_machine_get_screenshot_filename (BoxesMachine* self, const gchar* ext);
static gchar* boxes_machine_real_get_screenshot_filename (BoxesMachine* self, const gchar* ext);
gchar* boxes_get_pkgcache (const gchar* file_name);
gchar* boxes_machine_get_screenshot_prefix (BoxesMachine* self);
static void boxes_machine_real_take_screenshot_data_free (gpointer _data);
static void boxes_machine_real_take_screenshot (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_machine_take_screenshot (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean boxes_machine_take_screenshot_finish (BoxesMachine* self, GAsyncResult* _res_, GError** error);
static gboolean boxes_machine_real_take_screenshot_co (BoxesMachineTakeScreenshotData* _data_);
GList* boxes_machine_get_properties (BoxesMachine* self, BoxesPropertiesPage page);
static GList* boxes_machine_real_get_properties (BoxesMachine* self, BoxesPropertiesPage page);
static gchar* boxes_machine_real_get_screenshot_prefix (BoxesMachine* self);
void boxes_machine_connect_display (BoxesMachine* self);
static void boxes_machine_real_connect_display (BoxesMachine* self);
void boxes_machine_disconnect_display (BoxesMachine* self);
static void boxes_machine_real_disconnect_display (BoxesMachine* self);
gboolean boxes_machine_is_running (BoxesMachine* self);
BoxesMachineMachineState boxes_machine_get_state (BoxesMachine* self);
static void boxes_machine_update_screenshot_data_free (gpointer _data);
static gboolean boxes_machine_update_screenshot_co (BoxesMachineUpdateScreenshotData* _data_);
static void boxes_machine_update_screenshot_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void boxes_machine_actor_set_screenshot (BoxesMachineActor* self, GdkPixbuf* pixbuf);
GdkPixbuf* boxes_machine_get_pixbuf (BoxesMachine* self);
static GdkPixbuf* boxes_machine_draw_vm (BoxesMachine* self, GdkPixbuf* pixbuf, gint width, gint height);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
gchar* boxes_get_pixmap (const gchar* file_name);
void boxes_machine_delete (BoxesMachine* self, gboolean by_user);
static void boxes_machine_real_delete (BoxesMachine* self, gboolean by_user);
static void boxes_machine_real_ui_state_changed (BoxesUI* base);
void boxes_ui_set_ui_state (BoxesUI* self, BoxesUIState value);
ClutterActor* boxes_ui_get_actor (BoxesUI* self);
void boxes_machine_set_state (BoxesMachine* self, BoxesMachineMachineState value);
const gchar* boxes_machine_machine_state_to_string (BoxesMachineMachineState self);
BoxesDisplay* boxes_machine_get_display (BoxesMachine* self);
void boxes_machine_set_display (BoxesMachine* self, BoxesDisplay* value);
static void _boxes_machine_display___lambda18_ (BoxesMachine* self, gint id);
static gboolean __lambda19_ (BoxesMachine* self);
GQuark boxes_error_quark (void);
GtkWidget* boxes_display_get_display (BoxesDisplay* self, gint n, GError** error);
void boxes_display_page_show_display (BoxesDisplayPage* self, BoxesDisplay* display, GtkWidget* widget);
static gboolean ___lambda19__gsource_func (gpointer self);
static void __boxes_machine_display___lambda18__boxes_display_show (BoxesDisplay* _sender, gint display_id, gpointer self);
static void _boxes_machine_display___lambda31_ (BoxesMachine* self, gint id);
GtkWidget* boxes_display_page_remove_display (BoxesDisplayPage* self);
static void __boxes_machine_display___lambda31__boxes_display_hide (BoxesDisplay* _sender, gint display_id, gpointer self);
static void _boxes_machine_display___lambda32_ (BoxesMachine* self);
static void __boxes_machine_display___lambda32__boxes_display_disconnected (BoxesDisplay* _sender, gpointer self);
static void _boxes_machine_display___lambda33_ (BoxesMachine* self);
void boxes_machine_actor_set_password_needed (BoxesMachineActor* self, gboolean needed);
gboolean boxes_display_get_need_password (BoxesDisplay* self);
static void __boxes_machine_display___lambda33__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void _boxes_machine_display___lambda34_ (BoxesMachine* self);
void boxes_machine_actor_set_username_needed (BoxesMachineActor* self, gboolean needed);
gboolean boxes_display_get_need_username (BoxesDisplay* self);
static void __boxes_machine_display___lambda34__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
gchar* boxes_machine_actor_get_password (BoxesMachineActor* self);
void boxes_display_set_password (BoxesDisplay* self, const gchar* value);
static void boxes_machine_finalize (GObject* obj);
static void _vala_boxes_machine_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_machine_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
#define BOXES_MACHINE_ACTOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_MACHINE_ACTOR, BoxesMachineActorPrivate))
enum  {
	BOXES_MACHINE_ACTOR_DUMMY_PROPERTY,
	BOXES_MACHINE_ACTOR_ACTOR
};
#define BOXES_MACHINE_ACTOR_properties_y 200
static Block18Data* block18_data_ref (Block18Data* _data18_);
static void block18_data_unref (void * _userdata_);
BoxesUI* boxes_ui_construct (GType object_type);
void boxes_machine_actor_scale_screenshot (BoxesMachineActor* self, gfloat scale);
void boxes_actor_add (ClutterActor* actor, ClutterContainer* container);
void boxes_get_color (const gchar* desc, GdkColor* result);
static gboolean __lambda35_ (Block18Data* _data18_, GdkEventKey* event);
static gboolean ___lambda35__gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self);
static void __lambda36_ (Block18Data* _data18_);
static void ___lambda36__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void boxes_machine_actor_real_ui_state_changed (BoxesUI* base);
void boxes_display_page_get_size (BoxesDisplayPage* self, gint* width, gint* height);
static void _____lambda37_ (BoxesMachineActor* self);
void boxes_actor_remove (ClutterActor* actor);
void boxes_display_set_enable_inputs (BoxesDisplay* self, GtkWidget* widget, gboolean enable);
static void ______lambda37__clutter_animation_completed (ClutterAnimation* _sender, gpointer self);
void boxes_display_page_show (BoxesDisplayPage* self);
static void ___lambda38_ (BoxesMachineActor* self);
static void ____lambda38__clutter_animation_completed (ClutterAnimation* _sender, gpointer self);
static void boxes_machine_actor_finalize (GObject* obj);
static void _vala_boxes_machine_actor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


GType boxes_machine_machine_state_get_type (void) {
	static volatile gsize boxes_machine_machine_state_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_machine_machine_state_type_id__volatile)) {
		static const GEnumValue values[] = {{BOXES_MACHINE_MACHINE_STATE_UNKNOWN, "BOXES_MACHINE_MACHINE_STATE_UNKNOWN", "unknown"}, {BOXES_MACHINE_MACHINE_STATE_STOPPED, "BOXES_MACHINE_MACHINE_STATE_STOPPED", "stopped"}, {BOXES_MACHINE_MACHINE_STATE_RUNNING, "BOXES_MACHINE_MACHINE_STATE_RUNNING", "running"}, {BOXES_MACHINE_MACHINE_STATE_PAUSED, "BOXES_MACHINE_MACHINE_STATE_PAUSED", "paused"}, {0, NULL, NULL}};
		GType boxes_machine_machine_state_type_id;
		boxes_machine_machine_state_type_id = g_enum_register_static ("BoxesMachineMachineState", values);
		g_once_init_leave (&boxes_machine_machine_state_type_id__volatile, boxes_machine_machine_state_type_id);
	}
	return boxes_machine_machine_state_type_id__volatile;
}


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


static Block17Data* block17_data_ref (Block17Data* _data17_) {
	g_atomic_int_inc (&_data17_->_ref_count_);
	return _data17_;
}


static void block17_data_unref (void * _userdata_) {
	Block17Data* _data17_;
	_data17_ = (Block17Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data17_->_ref_count_)) {
		BoxesMachine * self;
		self = _data17_->self;
		_g_object_unref0 (_data17_->app);
		_g_object_unref0 (self);
		g_slice_free (Block17Data, _data17_);
	}
}


static void __lambda39_ (Block17Data* _data17_) {
	BoxesMachine * self;
	BoxesApp* _tmp0_;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
	self = _data17_->self;
	_tmp0_ = _data17_->app;
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == BOXES_UI_STATE_DISPLAY) {
		boxes_machine_set_screenshot_enable (self, FALSE);
	} else {
		boxes_machine_set_screenshot_enable (self, TRUE);
	}
}


static void ___lambda39__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda39_ (self);
}


BoxesMachine* boxes_machine_construct (GType object_type, BoxesCollectionSource* source, BoxesApp* app, const gchar* name) {
	BoxesMachine * self = NULL;
	Block17Data* _data17_;
	BoxesApp* _tmp0_;
	BoxesApp* _tmp1_;
	BoxesApp* _tmp2_;
	BoxesApp* _tmp3_;
	const gchar* _tmp4_;
	BoxesCollectionSource* _tmp5_;
	BoxesCollectionSource* _tmp6_;
	GdkPixbuf* _tmp7_ = NULL;
	GdkPixbuf* _tmp8_;
	BoxesMachineActor* _tmp9_;
	BoxesApp* _tmp10_;
	gulong _tmp11_ = 0UL;
	g_return_val_if_fail (source != NULL, NULL);
	g_return_val_if_fail (app != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_data17_ = g_slice_new0 (Block17Data);
	_data17_->_ref_count_ = 1;
	_tmp0_ = app;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_data17_->app = _tmp1_;
	self = (BoxesMachine*) boxes_collection_item_construct (object_type);
	_data17_->self = g_object_ref (self);
	_tmp2_ = _data17_->app;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->app);
	self->app = _tmp3_;
	_tmp4_ = name;
	boxes_collection_item_set_name ((BoxesCollectionItem*) self, _tmp4_);
	_tmp5_ = source;
	_tmp6_ = _g_object_ref0 (_tmp5_);
	_g_object_unref0 (self->source);
	self->source = _tmp6_;
	_tmp7_ = boxes_machine_draw_fallback_vm (BOXES_MACHINE_SCREENSHOT_WIDTH, BOXES_MACHINE_SCREENSHOT_HEIGHT, FALSE);
	_tmp8_ = _tmp7_;
	boxes_machine_set_pixbuf (self, _tmp8_);
	_g_object_unref0 (_tmp8_);
	_tmp9_ = boxes_machine_actor_new (self);
	_g_object_unref0 (self->machine_actor);
	self->machine_actor = _tmp9_;
	_tmp10_ = _data17_->app;
	_tmp11_ = g_signal_connect_data ((GObject*) _tmp10_, "notify::ui-state", (GCallback) ___lambda39__g_object_notify, block17_data_ref (_data17_), (GClosureNotify) block17_data_unref, 0);
	self->priv->ui_state_id = _tmp11_;
	block17_data_unref (_data17_);
	_data17_ = NULL;
	return self;
}


static gboolean ___lambda40_ (BoxesMachine* self) {
	gboolean result = FALSE;
	boxes_machine_update_screenshot (self, BOXES_MACHINE_SCREENSHOT_WIDTH, BOXES_MACHINE_SCREENSHOT_HEIGHT, NULL, NULL);
	result = TRUE;
	return result;
}


static gboolean ____lambda40__gsource_func (gpointer self) {
	gboolean result;
	result = ___lambda40_ (self);
	return result;
}


void boxes_machine_set_screenshot_enable (BoxesMachine* self, gboolean enable) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = enable;
	if (_tmp0_) {
		guint _tmp1_;
		BoxesApp* _tmp2_;
		GSettings* _tmp3_;
		gint _tmp4_ = 0;
		gint interval;
		gint _tmp5_;
		guint _tmp6_ = 0U;
		_tmp1_ = self->priv->screenshot_id;
		if (_tmp1_ != ((guint) 0)) {
			return;
		}
		boxes_machine_update_screenshot (self, BOXES_MACHINE_SCREENSHOT_WIDTH, BOXES_MACHINE_SCREENSHOT_HEIGHT, NULL, NULL);
		_tmp2_ = self->app;
		_tmp3_ = _tmp2_->settings;
		_tmp4_ = g_settings_get_int (_tmp3_, "screenshot-interval");
		interval = _tmp4_;
		_tmp5_ = interval;
		_tmp6_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) _tmp5_, ____lambda40__gsource_func, g_object_ref (self), g_object_unref);
		self->priv->screenshot_id = _tmp6_;
	} else {
		guint _tmp7_;
		_tmp7_ = self->priv->screenshot_id;
		if (_tmp7_ != ((guint) 0)) {
			guint _tmp8_;
			_tmp8_ = self->priv->screenshot_id;
			g_source_remove (_tmp8_);
		}
		self->priv->screenshot_id = (guint) 0;
	}
}


static gchar* boxes_machine_real_get_screenshot_filename (BoxesMachine* self, const gchar* ext) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_;
	g_return_val_if_fail (ext != NULL, NULL);
	_tmp0_ = boxes_machine_get_screenshot_prefix (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strconcat (_tmp1_, "-screenshot.", NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = ext;
	_tmp5_ = g_strconcat (_tmp3_, _tmp4_, NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = boxes_get_pkgcache (_tmp6_);
	_tmp8_ = _tmp7_;
	_g_free0 (_tmp6_);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	result = _tmp8_;
	return result;
}


gchar* boxes_machine_get_screenshot_filename (BoxesMachine* self, const gchar* ext) {
	g_return_val_if_fail (self != NULL, NULL);
	return BOXES_MACHINE_GET_CLASS (self)->get_screenshot_filename (self, ext);
}


static void boxes_machine_real_take_screenshot_data_free (gpointer _data) {
	BoxesMachineTakeScreenshotData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesMachineTakeScreenshotData, _data_);
}


static void boxes_machine_real_take_screenshot (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesMachineTakeScreenshotData* _data_;
	BoxesMachine* _tmp0_;
	_data_ = g_slice_new0 (BoxesMachineTakeScreenshotData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_machine_real_take_screenshot);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_machine_real_take_screenshot_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	boxes_machine_real_take_screenshot_co (_data_);
}


static gboolean boxes_machine_real_take_screenshot_finish (BoxesMachine* self, GAsyncResult* _res_, GError** error) {
	gboolean result;
	BoxesMachineTakeScreenshotData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return FALSE;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static gboolean boxes_machine_real_take_screenshot_co (BoxesMachineTakeScreenshotData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->result = FALSE;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


void boxes_machine_take_screenshot (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BOXES_MACHINE_GET_CLASS (self)->take_screenshot (self, _callback_, _user_data_);
}


gboolean boxes_machine_take_screenshot_finish (BoxesMachine* self, GAsyncResult* _res_, GError** error) {
	return BOXES_MACHINE_GET_CLASS (self)->take_screenshot_finish (self, _res_, error);
}


static GList* boxes_machine_real_get_properties (BoxesMachine* self, BoxesPropertiesPage page) {
	g_critical ("Type `%s' does not implement abstract method `boxes_machine_get_properties'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}


GList* boxes_machine_get_properties (BoxesMachine* self, BoxesPropertiesPage page) {
	g_return_val_if_fail (self != NULL, NULL);
	return BOXES_MACHINE_GET_CLASS (self)->get_properties (self, page);
}


static gchar* boxes_machine_real_get_screenshot_prefix (BoxesMachine* self) {
	g_critical ("Type `%s' does not implement abstract method `boxes_machine_get_screenshot_prefix'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}


gchar* boxes_machine_get_screenshot_prefix (BoxesMachine* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return BOXES_MACHINE_GET_CLASS (self)->get_screenshot_prefix (self);
}


static void boxes_machine_real_connect_display (BoxesMachine* self) {
	g_critical ("Type `%s' does not implement abstract method `boxes_machine_connect_display'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}


void boxes_machine_connect_display (BoxesMachine* self) {
	g_return_if_fail (self != NULL);
	BOXES_MACHINE_GET_CLASS (self)->connect_display (self);
}


static void boxes_machine_real_disconnect_display (BoxesMachine* self) {
	g_critical ("Type `%s' does not implement abstract method `boxes_machine_disconnect_display'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}


void boxes_machine_disconnect_display (BoxesMachine* self) {
	g_return_if_fail (self != NULL);
	BOXES_MACHINE_GET_CLASS (self)->disconnect_display (self);
}


gboolean boxes_machine_is_running (BoxesMachine* self) {
	gboolean result = FALSE;
	BoxesMachineMachineState _tmp0_;
	BoxesMachineMachineState _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = boxes_machine_get_state (self);
	_tmp1_ = _tmp0_;
	result = _tmp1_ == BOXES_MACHINE_MACHINE_STATE_RUNNING;
	return result;
}


static void boxes_machine_update_screenshot_data_free (gpointer _data) {
	BoxesMachineUpdateScreenshotData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesMachineUpdateScreenshotData, _data_);
}


void boxes_machine_update_screenshot (BoxesMachine* self, gint width, gint height, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesMachineUpdateScreenshotData* _data_;
	BoxesMachine* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	_data_ = g_slice_new0 (BoxesMachineUpdateScreenshotData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_machine_update_screenshot);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_machine_update_screenshot_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = width;
	_data_->width = _tmp1_;
	_tmp2_ = height;
	_data_->height = _tmp2_;
	boxes_machine_update_screenshot_co (_data_);
}


void boxes_machine_update_screenshot_finish (BoxesMachine* self, GAsyncResult* _res_) {
	BoxesMachineUpdateScreenshotData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void boxes_machine_update_screenshot_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesMachineUpdateScreenshotData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_machine_update_screenshot_co (_data_);
}


static gboolean boxes_machine_update_screenshot_co (BoxesMachineUpdateScreenshotData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_state_ = 1;
		boxes_machine_take_screenshot (_data_->self, boxes_machine_update_screenshot_ready, _data_);
		return FALSE;
		_state_1:
		boxes_machine_take_screenshot_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch30_g_error;
		}
		_data_->_tmp0_ = NULL;
		_data_->_tmp0_ = boxes_machine_get_screenshot_filename (_data_->self, "ppm");
		_data_->_tmp1_ = _data_->_tmp0_;
		_data_->_tmp2_ = gdk_pixbuf_new_from_file (_data_->_tmp1_, &_data_->_inner_error_);
		_data_->_tmp3_ = _data_->_tmp2_;
		_g_free0 (_data_->_tmp1_);
		_data_->_tmp4_ = _data_->_tmp3_;
		if (_data_->_inner_error_ != NULL) {
			goto __catch30_g_error;
		}
		_data_->_tmp5_ = _data_->_tmp4_;
		boxes_machine_set_pixbuf (_data_->self, _data_->_tmp5_);
		_g_object_unref0 (_data_->_tmp5_);
		_data_->_tmp6_ = _data_->self->machine_actor;
		_data_->_tmp7_ = _data_->self->priv->_pixbuf;
		boxes_machine_actor_set_screenshot (_data_->_tmp6_, _data_->_tmp7_);
		_data_->_tmp8_ = _data_->self->priv->_pixbuf;
		_data_->_tmp9_ = _data_->width;
		_data_->_tmp10_ = _data_->height;
		_data_->_tmp11_ = NULL;
		_data_->_tmp11_ = boxes_machine_draw_vm (_data_->self, _data_->_tmp8_, _data_->_tmp9_, _data_->_tmp10_);
		_data_->_tmp12_ = _data_->_tmp11_;
		boxes_machine_set_pixbuf (_data_->self, _data_->_tmp12_);
		_g_object_unref0 (_data_->_tmp12_);
	}
	goto __finally30;
	__catch30_g_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp13_ = _data_->_error_;
		if (!g_error_matches (_data_->_tmp13_, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
			_data_->_tmp14_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _data_->self);
			_data_->_tmp15_ = _data_->_tmp14_;
			_data_->_tmp16_ = _data_->_error_;
			_data_->_tmp17_ = _data_->_tmp16_->message;
			_data_->_tmp18_ = NULL;
			_data_->_tmp18_ = g_strdup_printf ("%s: %s", _data_->_tmp15_, _data_->_tmp17_);
			_data_->_tmp19_ = _data_->_tmp18_;
			g_warning ("machine.vala:157: %s", _data_->_tmp19_);
			_g_free0 (_data_->_tmp19_);
		}
		_g_error_free0 (_data_->_error_);
	}
	__finally30:
	if (_data_->_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	_data_->_tmp20_ = _data_->self->priv->_pixbuf;
	if (_data_->_tmp20_ == NULL) {
		_data_->_tmp21_ = _data_->width;
		_data_->_tmp22_ = _data_->height;
		_data_->_tmp23_ = NULL;
		_data_->_tmp23_ = boxes_machine_draw_fallback_vm (_data_->_tmp21_, _data_->_tmp22_, FALSE);
		_data_->_tmp24_ = _data_->_tmp23_;
		boxes_machine_set_pixbuf (_data_->self, _data_->_tmp24_);
		_g_object_unref0 (_data_->_tmp24_);
		_data_->_tmp25_ = _data_->self->machine_actor;
		_data_->_tmp26_ = _data_->self->priv->_pixbuf;
		boxes_machine_actor_set_screenshot (_data_->_tmp25_, _data_->_tmp26_);
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static GdkPixbuf* boxes_machine_draw_vm (BoxesMachine* self, GdkPixbuf* pixbuf, gint width, gint height) {
	GdkPixbuf* result = NULL;
	gint _tmp0_;
	gint _tmp1_;
	cairo_surface_t* _tmp2_;
	cairo_surface_t* surface;
	cairo_surface_t* _tmp3_;
	cairo_t* _tmp4_;
	cairo_t* context;
	GdkPixbuf* _tmp5_;
	gint _tmp6_ = 0;
	gdouble pw;
	GdkPixbuf* _tmp7_;
	gint _tmp8_ = 0;
	gdouble ph;
	gint _tmp9_;
	gdouble _tmp10_;
	gdouble sw;
	gint _tmp11_;
	gdouble _tmp12_;
	gdouble sh;
	gdouble x;
	gdouble y;
	gdouble _tmp13_;
	gdouble _tmp14_;
	cairo_t* _tmp19_;
	gdouble _tmp20_;
	gdouble _tmp21_;
	gint _tmp22_;
	gdouble _tmp23_;
	gint _tmp24_;
	gdouble _tmp25_;
	cairo_t* _tmp26_;
	cairo_t* _tmp27_;
	gdouble _tmp28_;
	gdouble _tmp29_;
	cairo_t* _tmp30_;
	GdkPixbuf* _tmp31_;
	gdouble _tmp32_;
	gdouble _tmp33_;
	gdouble _tmp34_;
	gdouble _tmp35_;
	cairo_t* _tmp36_;
	cairo_pattern_t* _tmp37_ = NULL;
	cairo_t* _tmp38_;
	gboolean _tmp39_ = FALSE;
	cairo_surface_t* _tmp58_;
	gint _tmp59_;
	gint _tmp60_;
	GdkPixbuf* _tmp61_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (pixbuf != NULL, NULL);
	_tmp0_ = width;
	_tmp1_ = height;
	_tmp2_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, _tmp0_, _tmp1_);
	surface = _tmp2_;
	_tmp3_ = surface;
	_tmp4_ = cairo_create (_tmp3_);
	context = _tmp4_;
	_tmp5_ = pixbuf;
	_tmp6_ = gdk_pixbuf_get_width (_tmp5_);
	pw = (gdouble) _tmp6_;
	_tmp7_ = pixbuf;
	_tmp8_ = gdk_pixbuf_get_height (_tmp7_);
	ph = (gdouble) _tmp8_;
	_tmp9_ = width;
	_tmp10_ = pw;
	sw = _tmp9_ / _tmp10_;
	_tmp11_ = height;
	_tmp12_ = ph;
	sh = _tmp11_ / _tmp12_;
	x = 0.0;
	y = 0.0;
	_tmp13_ = pw;
	_tmp14_ = ph;
	if (_tmp13_ > _tmp14_) {
		gint _tmp15_;
		gdouble _tmp16_;
		gdouble _tmp17_;
		gdouble _tmp18_;
		_tmp15_ = height;
		_tmp16_ = ph;
		_tmp17_ = sw;
		y = (_tmp15_ - (_tmp16_ * _tmp17_)) / 2;
		_tmp18_ = sw;
		sh = _tmp18_;
	}
	_tmp19_ = context;
	_tmp20_ = x;
	_tmp21_ = y;
	_tmp22_ = width;
	_tmp23_ = x;
	_tmp24_ = height;
	_tmp25_ = y;
	cairo_rectangle (_tmp19_, _tmp20_, _tmp21_, _tmp22_ - (_tmp23_ * 2), _tmp24_ - (_tmp25_ * 2));
	_tmp26_ = context;
	cairo_clip (_tmp26_);
	_tmp27_ = context;
	_tmp28_ = sw;
	_tmp29_ = sh;
	cairo_scale (_tmp27_, _tmp28_, _tmp29_);
	_tmp30_ = context;
	_tmp31_ = pixbuf;
	_tmp32_ = x;
	_tmp33_ = sw;
	_tmp34_ = y;
	_tmp35_ = sh;
	gdk_cairo_set_source_pixbuf (_tmp30_, _tmp31_, _tmp32_ / _tmp33_, _tmp34_ / _tmp35_);
	_tmp36_ = context;
	_tmp37_ = cairo_get_source (_tmp36_);
	cairo_pattern_set_filter (_tmp37_, CAIRO_FILTER_BEST);
	_tmp38_ = context;
	cairo_paint (_tmp38_);
	_tmp39_ = boxes_machine_is_running (self);
	if (!_tmp39_) {
		cairo_t* _tmp40_;
		cairo_t* _tmp41_;
		cairo_t* _tmp42_;
		cairo_t* _tmp43_;
		cairo_t* _tmp44_;
		gint _tmp45_;
		gint _tmp46_;
		gchar* _tmp47_ = NULL;
		gchar* _tmp48_;
		cairo_surface_t* _tmp49_;
		cairo_surface_t* _tmp50_;
		cairo_pattern_t* _tmp51_;
		cairo_pattern_t* _tmp52_;
		cairo_pattern_t* grid;
		cairo_pattern_t* _tmp53_;
		cairo_t* _tmp54_;
		cairo_t* _tmp55_;
		cairo_t* _tmp56_;
		cairo_pattern_t* _tmp57_;
		_tmp40_ = context;
		cairo_set_source_rgba (_tmp40_, (gdouble) 1, (gdouble) 1, (gdouble) 1, (gdouble) 1);
		_tmp41_ = context;
		cairo_set_operator (_tmp41_, CAIRO_OPERATOR_HSL_SATURATION);
		_tmp42_ = context;
		cairo_paint (_tmp42_);
		_tmp43_ = context;
		cairo_identity_matrix (_tmp43_);
		_tmp44_ = context;
		_tmp45_ = width;
		_tmp46_ = height;
		cairo_scale (_tmp44_, (0.1875 / BOXES_MACHINE_SCREENSHOT_WIDTH) * _tmp45_, (0.1875 / BOXES_MACHINE_SCREENSHOT_HEIGHT) * _tmp46_);
		_tmp47_ = boxes_get_pixmap ("boxes-grid.png");
		_tmp48_ = _tmp47_;
		_tmp49_ = cairo_image_surface_create_from_png (_tmp48_);
		_tmp50_ = _tmp49_;
		_tmp51_ = cairo_pattern_create_for_surface (_tmp50_);
		_tmp52_ = _tmp51_;
		_cairo_surface_destroy0 (_tmp50_);
		_g_free0 (_tmp48_);
		grid = _tmp52_;
		_tmp53_ = grid;
		cairo_pattern_set_extend (_tmp53_, CAIRO_EXTEND_REPEAT);
		_tmp54_ = context;
		cairo_set_source_rgba (_tmp54_, (gdouble) 0, (gdouble) 0, (gdouble) 0, (gdouble) 1);
		_tmp55_ = context;
		cairo_set_operator (_tmp55_, CAIRO_OPERATOR_OVER);
		_tmp56_ = context;
		_tmp57_ = grid;
		cairo_mask (_tmp56_, _tmp57_);
		_cairo_pattern_destroy0 (grid);
	}
	_tmp58_ = surface;
	_tmp59_ = width;
	_tmp60_ = height;
	_tmp61_ = gdk_pixbuf_get_from_surface (_tmp58_, 0, 0, _tmp59_, _tmp60_);
	result = _tmp61_;
	_cairo_destroy0 (context);
	_cairo_surface_destroy0 (surface);
	return result;
}


static GdkPixbuf* boxes_machine_draw_fallback_vm (gint width, gint height, gboolean force) {
	GdkPixbuf* result = NULL;
	GdkPixbuf* pixbuf;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gint _tmp2_;
	gboolean _tmp4_;
	gboolean _tmp6_;
	GdkPixbuf* _tmp43_;
	gint _tmp44_;
	gint _tmp45_;
	cairo_surface_t* _tmp46_;
	cairo_surface_t* surface;
	cairo_surface_t* _tmp47_;
	gint _tmp48_;
	gint _tmp49_;
	GdkPixbuf* _tmp50_ = NULL;
	GError * _inner_error_ = NULL;
	pixbuf = NULL;
	_tmp2_ = width;
	if (_tmp2_ == BOXES_MACHINE_SCREENSHOT_WIDTH) {
		gint _tmp3_;
		_tmp3_ = height;
		_tmp1_ = _tmp3_ == BOXES_MACHINE_SCREENSHOT_HEIGHT;
	} else {
		_tmp1_ = FALSE;
	}
	_tmp4_ = _tmp1_;
	if (_tmp4_) {
		gboolean _tmp5_;
		_tmp5_ = force;
		_tmp0_ = !_tmp5_;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp6_ = _tmp0_;
	if (_tmp6_) {
		GdkPixbuf* _tmp7_;
		_tmp7_ = boxes_machine_default_fallback;
		if (_tmp7_ != NULL) {
			GdkPixbuf* _tmp8_;
			GdkPixbuf* _tmp9_;
			_tmp8_ = boxes_machine_default_fallback;
			_tmp9_ = _g_object_ref0 (_tmp8_);
			result = _tmp9_;
			_g_object_unref0 (pixbuf);
			return result;
		} else {
			gint _tmp10_;
			gint _tmp11_;
			GdkPixbuf* _tmp12_ = NULL;
			_tmp10_ = width;
			_tmp11_ = height;
			_tmp12_ = boxes_machine_draw_fallback_vm (_tmp10_, _tmp11_, TRUE);
			_g_object_unref0 (boxes_machine_default_fallback);
			boxes_machine_default_fallback = _tmp12_;
		}
	}
	{
		gint _tmp13_;
		gint _tmp14_;
		cairo_surface_t* _tmp15_;
		cairo_surface_t* surface;
		cairo_surface_t* _tmp16_;
		cairo_t* _tmp17_;
		cairo_t* context;
		gint _tmp18_;
		gint size;
		GtkIconTheme* _tmp19_ = NULL;
		gint _tmp20_;
		GtkIconInfo* _tmp21_ = NULL;
		GtkIconInfo* icon_info;
		GtkIconInfo* _tmp22_;
		GdkPixbuf* _tmp23_ = NULL;
		GdkPixbuf* _tmp24_;
		cairo_t* _tmp25_;
		GdkPixbuf* _tmp26_;
		gint _tmp27_;
		gint _tmp28_;
		gint _tmp29_;
		gint _tmp30_;
		cairo_t* _tmp31_;
		gint _tmp32_;
		gint _tmp33_;
		gint _tmp34_;
		gint _tmp35_;
		gint _tmp36_;
		gint _tmp37_;
		cairo_t* _tmp38_;
		cairo_surface_t* _tmp39_;
		gint _tmp40_;
		gint _tmp41_;
		GdkPixbuf* _tmp42_ = NULL;
		_tmp13_ = width;
		_tmp14_ = height;
		_tmp15_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, _tmp13_, _tmp14_);
		surface = _tmp15_;
		_tmp16_ = surface;
		_tmp17_ = cairo_create (_tmp16_);
		context = _tmp17_;
		_tmp18_ = height;
		size = (gint) (_tmp18_ * 0.6);
		_tmp19_ = gtk_icon_theme_get_default ();
		_tmp20_ = size;
		_tmp21_ = gtk_icon_theme_lookup_icon (_tmp19_, "computer-symbolic", _tmp20_, GTK_ICON_LOOKUP_GENERIC_FALLBACK);
		icon_info = _tmp21_;
		_tmp22_ = icon_info;
		_tmp23_ = gtk_icon_info_load_icon (_tmp22_, &_inner_error_);
		_tmp24_ = _tmp23_;
		if (_inner_error_ != NULL) {
			_gtk_icon_info_free0 (icon_info);
			_cairo_destroy0 (context);
			_cairo_surface_destroy0 (surface);
			goto __catch31_g_error;
		}
		_tmp25_ = context;
		_tmp26_ = _tmp24_;
		_tmp27_ = width;
		_tmp28_ = size;
		_tmp29_ = height;
		_tmp30_ = size;
		gdk_cairo_set_source_pixbuf (_tmp25_, _tmp26_, (gdouble) ((_tmp27_ - _tmp28_) / 2), (gdouble) ((_tmp29_ - _tmp30_) / 2));
		_g_object_unref0 (_tmp26_);
		_tmp31_ = context;
		_tmp32_ = width;
		_tmp33_ = size;
		_tmp34_ = height;
		_tmp35_ = size;
		_tmp36_ = size;
		_tmp37_ = size;
		cairo_rectangle (_tmp31_, (gdouble) ((_tmp32_ - _tmp33_) / 2), (gdouble) ((_tmp34_ - _tmp35_) / 2), (gdouble) _tmp36_, (gdouble) _tmp37_);
		_tmp38_ = context;
		cairo_fill (_tmp38_);
		_tmp39_ = surface;
		_tmp40_ = width;
		_tmp41_ = height;
		_tmp42_ = gdk_pixbuf_get_from_surface (_tmp39_, 0, 0, _tmp40_, _tmp41_);
		_g_object_unref0 (pixbuf);
		pixbuf = _tmp42_;
		_gtk_icon_info_free0 (icon_info);
		_cairo_destroy0 (context);
		_cairo_surface_destroy0 (surface);
	}
	goto __finally31;
	__catch31_g_error:
	{
		g_clear_error (&_inner_error_);
		_inner_error_ = NULL;
	}
	__finally31:
	if (_inner_error_ != NULL) {
		_g_object_unref0 (pixbuf);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return NULL;
	}
	_tmp43_ = pixbuf;
	if (_tmp43_ != NULL) {
		result = pixbuf;
		return result;
	}
	_tmp44_ = width;
	_tmp45_ = height;
	_tmp46_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, _tmp44_, _tmp45_);
	surface = _tmp46_;
	_tmp47_ = surface;
	_tmp48_ = width;
	_tmp49_ = height;
	_tmp50_ = gdk_pixbuf_get_from_surface (_tmp47_, 0, 0, _tmp48_, _tmp49_);
	result = _tmp50_;
	_cairo_surface_destroy0 (surface);
	_g_object_unref0 (pixbuf);
	return result;
}


static void boxes_machine_real_delete (BoxesMachine* self, gboolean by_user) {
	gulong _tmp0_;
	self->deleted = TRUE;
	boxes_machine_set_screenshot_enable (self, FALSE);
	_tmp0_ = self->priv->ui_state_id;
	if (_tmp0_ != ((gulong) 0)) {
		BoxesApp* _tmp1_;
		gulong _tmp2_;
		_tmp1_ = self->app;
		_tmp2_ = self->priv->ui_state_id;
		g_signal_handler_disconnect ((GObject*) _tmp1_, _tmp2_);
		self->priv->ui_state_id = (gulong) 0;
	}
}


void boxes_machine_delete (BoxesMachine* self, gboolean by_user) {
	g_return_if_fail (self != NULL);
	BOXES_MACHINE_GET_CLASS (self)->delete (self, by_user);
}


static void boxes_machine_real_ui_state_changed (BoxesUI* base) {
	BoxesMachine * self;
	BoxesMachineActor* _tmp0_;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
	self = (BoxesMachine*) base;
	_tmp0_ = self->machine_actor;
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) self);
	_tmp2_ = _tmp1_;
	boxes_ui_set_ui_state ((BoxesUI*) _tmp0_, _tmp2_);
}


static ClutterActor* boxes_machine_real_get_actor (BoxesUI* base) {
	ClutterActor* result;
	BoxesMachine* self;
	BoxesMachineActor* _tmp0_;
	ClutterActor* _tmp1_;
	ClutterActor* _tmp2_;
	self = (BoxesMachine*) base;
	_tmp0_ = self->machine_actor;
	_tmp1_ = boxes_ui_get_actor ((BoxesUI*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}


GdkPixbuf* boxes_machine_get_pixbuf (BoxesMachine* self) {
	GdkPixbuf* result;
	GdkPixbuf* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_pixbuf;
	result = _tmp0_;
	return result;
}


void boxes_machine_set_pixbuf (BoxesMachine* self, GdkPixbuf* value) {
	GdkPixbuf* _tmp0_;
	GdkPixbuf* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_pixbuf);
	self->priv->_pixbuf = _tmp1_;
	g_object_notify ((GObject *) self, "pixbuf");
}


BoxesMachineMachineState boxes_machine_get_state (BoxesMachine* self) {
	BoxesMachineMachineState result;
	BoxesMachineMachineState _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_state;
	result = _tmp0_;
	return result;
}


void boxes_machine_set_state (BoxesMachine* self, BoxesMachineMachineState value) {
	BoxesMachineMachineState _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	BoxesMachineMachineState _tmp3_;
	BoxesMachineMachineState _tmp4_;
	GEnumValue* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_state = _tmp0_;
	_tmp1_ = boxes_collection_item_get_name ((BoxesCollectionItem*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = boxes_machine_get_state (self);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_enum_get_value (g_type_class_ref (BOXES_MACHINE_TYPE_MACHINE_STATE), _tmp4_);
	g_debug ("machine.vala:35: State of '%s' changed to %s", _tmp2_, (_tmp5_ != NULL) ? _tmp5_->value_name : NULL);
	g_object_notify ((GObject *) self, "state");
}


BoxesDisplay* boxes_machine_get_display (BoxesMachine* self) {
	BoxesDisplay* result;
	BoxesDisplay* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_display;
	result = _tmp0_;
	return result;
}


static gboolean __lambda19_ (BoxesMachine* self) {
	gboolean result = FALSE;
	GError * _inner_error_ = NULL;
	{
		BoxesDisplay* _tmp0_;
		BoxesDisplay* _tmp1_;
		GtkWidget* _tmp2_ = NULL;
		GtkWidget* widget;
		BoxesApp* _tmp3_;
		BoxesDisplayPage* _tmp4_;
		BoxesDisplay* _tmp5_;
		BoxesDisplay* _tmp6_;
		_tmp0_ = boxes_machine_get_display (self);
		_tmp1_ = _tmp0_;
		_tmp2_ = boxes_display_get_display (_tmp1_, 0, &_inner_error_);
		widget = _tmp2_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == BOXES_ERROR) {
				goto __catch32_boxes_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return FALSE;
		}
		_tmp3_ = self->app;
		_tmp4_ = _tmp3_->display_page;
		_tmp5_ = boxes_machine_get_display (self);
		_tmp6_ = _tmp5_;
		boxes_display_page_show_display (_tmp4_, _tmp6_, widget);
		gtk_widget_grab_focus (widget);
		_g_object_unref0 (widget);
	}
	goto __finally32;
	__catch32_boxes_error:
	{
		GError* _error_ = NULL;
		GError* _tmp7_;
		const gchar* _tmp8_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp7_ = _error_;
		_tmp8_ = _tmp7_->message;
		g_warning ("machine.vala:68: %s", _tmp8_);
		_g_error_free0 (_error_);
	}
	__finally32:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return FALSE;
	}
	result = FALSE;
	return result;
}


static gboolean ___lambda19__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda19_ (self);
	return result;
}


static void _boxes_machine_display___lambda18_ (BoxesMachine* self, gint id) {
	BoxesApp* _tmp0_;
	BoxesApp* _tmp1_;
	guint _tmp2_;
	_tmp0_ = self->app;
	boxes_ui_set_ui_state ((BoxesUI*) _tmp0_, BOXES_UI_STATE_DISPLAY);
	_tmp1_ = self->app;
	_tmp2_ = _tmp1_->duration;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp2_, ___lambda19__gsource_func, g_object_ref (self), g_object_unref);
}


static void __boxes_machine_display___lambda18__boxes_display_show (BoxesDisplay* _sender, gint display_id, gpointer self) {
	_boxes_machine_display___lambda18_ (self, display_id);
}


static void _boxes_machine_display___lambda31_ (BoxesMachine* self, gint id) {
	BoxesApp* _tmp0_;
	BoxesDisplayPage* _tmp1_;
	GtkWidget* _tmp2_ = NULL;
	GtkWidget* _tmp3_;
	_tmp0_ = self->app;
	_tmp1_ = _tmp0_->display_page;
	_tmp2_ = boxes_display_page_remove_display (_tmp1_);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (_tmp3_);
}


static void __boxes_machine_display___lambda31__boxes_display_hide (BoxesDisplay* _sender, gint display_id, gpointer self) {
	_boxes_machine_display___lambda31_ (self, display_id);
}


static const gchar* string_to_string (const gchar* self) {
	const gchar* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}


static void _boxes_machine_display___lambda32_ (BoxesMachine* self) {
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_;
	BoxesApp* _tmp5_;
	_tmp0_ = boxes_collection_item_get_name ((BoxesCollectionItem*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = string_to_string (_tmp1_);
	_tmp3_ = g_strconcat ("display ", _tmp2_, " disconnected", NULL);
	_tmp4_ = _tmp3_;
	g_message ("machine.vala:80: %s", _tmp4_);
	_g_free0 (_tmp4_);
	_tmp5_ = self->app;
	boxes_ui_set_ui_state ((BoxesUI*) _tmp5_, BOXES_UI_STATE_COLLECTION);
}


static void __boxes_machine_display___lambda32__boxes_display_disconnected (BoxesDisplay* _sender, gpointer self) {
	_boxes_machine_display___lambda32_ (self);
}


static void _boxes_machine_display___lambda33_ (BoxesMachine* self) {
	BoxesMachineActor* _tmp0_;
	BoxesDisplay* _tmp1_;
	BoxesDisplay* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	_tmp0_ = self->machine_actor;
	_tmp1_ = boxes_machine_get_display (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = boxes_display_get_need_password (_tmp2_);
	_tmp4_ = _tmp3_;
	boxes_machine_actor_set_password_needed (_tmp0_, _tmp4_);
}


static void __boxes_machine_display___lambda33__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_boxes_machine_display___lambda33_ (self);
}


static void _boxes_machine_display___lambda34_ (BoxesMachine* self) {
	BoxesMachineActor* _tmp0_;
	BoxesDisplay* _tmp1_;
	BoxesDisplay* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	_tmp0_ = self->machine_actor;
	_tmp1_ = boxes_machine_get_display (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = boxes_display_get_need_username (_tmp2_);
	_tmp4_ = _tmp3_;
	boxes_machine_actor_set_username_needed (_tmp0_, _tmp4_);
}


static void __boxes_machine_display___lambda34__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_boxes_machine_display___lambda34_ (self);
}


void boxes_machine_set_display (BoxesMachine* self, BoxesDisplay* value) {
	BoxesDisplay* _tmp0_;
	BoxesDisplay* _tmp11_;
	BoxesDisplay* _tmp12_;
	BoxesDisplay* _tmp13_;
	BoxesDisplay* _tmp14_;
	gulong _tmp15_ = 0UL;
	BoxesDisplay* _tmp16_;
	gulong _tmp17_ = 0UL;
	BoxesDisplay* _tmp18_;
	gulong _tmp19_ = 0UL;
	BoxesDisplay* _tmp20_;
	gulong _tmp21_ = 0UL;
	BoxesDisplay* _tmp22_;
	gulong _tmp23_ = 0UL;
	BoxesDisplay* _tmp24_;
	BoxesMachineActor* _tmp25_;
	gchar* _tmp26_ = NULL;
	gchar* _tmp27_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_display;
	if (_tmp0_ != NULL) {
		BoxesDisplay* _tmp1_;
		gulong _tmp2_;
		BoxesDisplay* _tmp3_;
		gulong _tmp4_;
		BoxesDisplay* _tmp5_;
		gulong _tmp6_;
		BoxesDisplay* _tmp7_;
		gulong _tmp8_;
		BoxesDisplay* _tmp9_;
		gulong _tmp10_;
		_tmp1_ = self->priv->_display;
		_tmp2_ = self->priv->show_id;
		g_signal_handler_disconnect ((GObject*) _tmp1_, _tmp2_);
		self->priv->show_id = (gulong) 0;
		_tmp3_ = self->priv->_display;
		_tmp4_ = self->priv->hide_id;
		g_signal_handler_disconnect ((GObject*) _tmp3_, _tmp4_);
		self->priv->hide_id = (gulong) 0;
		_tmp5_ = self->priv->_display;
		_tmp6_ = self->priv->disconnected_id;
		g_signal_handler_disconnect ((GObject*) _tmp5_, _tmp6_);
		self->priv->disconnected_id = (gulong) 0;
		_tmp7_ = self->priv->_display;
		_tmp8_ = self->priv->need_password_id;
		g_signal_handler_disconnect ((GObject*) _tmp7_, _tmp8_);
		self->priv->need_password_id = (gulong) 0;
		_tmp9_ = self->priv->_display;
		_tmp10_ = self->priv->need_username_id;
		g_signal_handler_disconnect ((GObject*) _tmp9_, _tmp10_);
		self->priv->need_username_id = (gulong) 0;
	}
	_tmp11_ = value;
	_tmp12_ = _g_object_ref0 (_tmp11_);
	_g_object_unref0 (self->priv->_display);
	self->priv->_display = _tmp12_;
	_tmp13_ = self->priv->_display;
	if (_tmp13_ == NULL) {
		return;
	}
	_tmp14_ = self->priv->_display;
	_tmp15_ = g_signal_connect_object (_tmp14_, "show", (GCallback) __boxes_machine_display___lambda18__boxes_display_show, self, 0);
	self->priv->show_id = _tmp15_;
	_tmp16_ = self->priv->_display;
	_tmp17_ = g_signal_connect_object (_tmp16_, "hide", (GCallback) __boxes_machine_display___lambda31__boxes_display_hide, self, 0);
	self->priv->hide_id = _tmp17_;
	_tmp18_ = self->priv->_display;
	_tmp19_ = g_signal_connect_object (_tmp18_, "disconnected", (GCallback) __boxes_machine_display___lambda32__boxes_display_disconnected, self, 0);
	self->priv->disconnected_id = _tmp19_;
	_tmp20_ = self->priv->_display;
	_tmp21_ = g_signal_connect_object ((GObject*) _tmp20_, "notify::need-password", (GCallback) __boxes_machine_display___lambda33__g_object_notify, self, 0);
	self->priv->need_password_id = _tmp21_;
	_tmp22_ = self->priv->_display;
	_tmp23_ = g_signal_connect_object ((GObject*) _tmp22_, "notify::need-username", (GCallback) __boxes_machine_display___lambda34__g_object_notify, self, 0);
	self->priv->need_username_id = _tmp23_;
	_tmp24_ = self->priv->_display;
	_tmp25_ = self->machine_actor;
	_tmp26_ = boxes_machine_actor_get_password (_tmp25_);
	_tmp27_ = _tmp26_;
	boxes_display_set_password (_tmp24_, _tmp27_);
	_g_free0 (_tmp27_);
	g_object_notify ((GObject *) self, "display");
}


static void boxes_machine_class_init (BoxesMachineClass * klass) {
	boxes_machine_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesMachinePrivate));
	BOXES_MACHINE_CLASS (klass)->get_screenshot_filename = boxes_machine_real_get_screenshot_filename;
	BOXES_MACHINE_CLASS (klass)->take_screenshot = boxes_machine_real_take_screenshot;
	BOXES_MACHINE_CLASS (klass)->take_screenshot_finish = boxes_machine_real_take_screenshot_finish;
	BOXES_MACHINE_CLASS (klass)->get_properties = boxes_machine_real_get_properties;
	BOXES_MACHINE_CLASS (klass)->get_screenshot_prefix = boxes_machine_real_get_screenshot_prefix;
	BOXES_MACHINE_CLASS (klass)->connect_display = boxes_machine_real_connect_display;
	BOXES_MACHINE_CLASS (klass)->disconnect_display = boxes_machine_real_disconnect_display;
	BOXES_MACHINE_CLASS (klass)->delete = boxes_machine_real_delete;
	BOXES_UI_CLASS (klass)->ui_state_changed = boxes_machine_real_ui_state_changed;
	BOXES_UI_CLASS (klass)->get_actor = boxes_machine_real_get_actor;
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_machine_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_machine_set_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_machine_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_MACHINE_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_MACHINE_PIXBUF, g_param_spec_object ("pixbuf", "pixbuf", "pixbuf", GDK_TYPE_PIXBUF, 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_MACHINE_STATE, g_param_spec_enum ("state", "state", "state", BOXES_MACHINE_TYPE_MACHINE_STATE, 0, 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_MACHINE_DISPLAY, g_param_spec_object ("display", "display", "display", BOXES_TYPE_DISPLAY, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void boxes_machine_boxes_iproperties_provider_interface_init (BoxesIPropertiesProviderIface * iface) {
	boxes_machine_boxes_iproperties_provider_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_properties = (GList* (*)(BoxesIPropertiesProvider*, BoxesPropertiesPage)) boxes_machine_get_properties;
}


static void boxes_machine_instance_init (BoxesMachine * self) {
	self->priv = BOXES_MACHINE_GET_PRIVATE (self);
}


static void boxes_machine_finalize (GObject* obj) {
	BoxesMachine * self;
	self = BOXES_MACHINE (obj);
	_g_object_unref0 (self->app);
	_g_object_unref0 (self->machine_actor);
	_g_object_unref0 (self->source);
	_g_object_unref0 (self->config);
	_g_object_unref0 (self->priv->_pixbuf);
	_g_object_unref0 (self->priv->_display);
	G_OBJECT_CLASS (boxes_machine_parent_class)->finalize (obj);
}


GType boxes_machine_get_type (void) {
	static volatile gsize boxes_machine_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_machine_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesMachineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_machine_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesMachine), 0, (GInstanceInitFunc) boxes_machine_instance_init, NULL };
		static const GInterfaceInfo boxes_iproperties_provider_info = { (GInterfaceInitFunc) boxes_machine_boxes_iproperties_provider_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType boxes_machine_type_id;
		boxes_machine_type_id = g_type_register_static (BOXES_TYPE_COLLECTION_ITEM, "BoxesMachine", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (boxes_machine_type_id, BOXES_TYPE_IPROPERTIES_PROVIDER, &boxes_iproperties_provider_info);
		g_once_init_leave (&boxes_machine_type_id__volatile, boxes_machine_type_id);
	}
	return boxes_machine_type_id__volatile;
}


static void _vala_boxes_machine_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesMachine * self;
	self = BOXES_MACHINE (object);
	switch (property_id) {
		case BOXES_MACHINE_ACTOR:
		g_value_set_object (value, boxes_ui_get_actor ((BoxesUI*) self));
		break;
		case BOXES_MACHINE_PIXBUF:
		g_value_set_object (value, boxes_machine_get_pixbuf (self));
		break;
		case BOXES_MACHINE_STATE:
		g_value_set_enum (value, boxes_machine_get_state (self));
		break;
		case BOXES_MACHINE_DISPLAY:
		g_value_set_object (value, boxes_machine_get_display (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_boxes_machine_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesMachine * self;
	self = BOXES_MACHINE (object);
	switch (property_id) {
		case BOXES_MACHINE_PIXBUF:
		boxes_machine_set_pixbuf (self, g_value_get_object (value));
		break;
		case BOXES_MACHINE_STATE:
		boxes_machine_set_state (self, g_value_get_enum (value));
		break;
		case BOXES_MACHINE_DISPLAY:
		boxes_machine_set_display (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static Block18Data* block18_data_ref (Block18Data* _data18_) {
	g_atomic_int_inc (&_data18_->_ref_count_);
	return _data18_;
}


static void block18_data_unref (void * _userdata_) {
	Block18Data* _data18_;
	_data18_ = (Block18Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data18_->_ref_count_)) {
		BoxesMachineActor * self;
		self = _data18_->self;
		_g_object_unref0 (_data18_->machine);
		_g_object_unref0 (self);
		g_slice_free (Block18Data, _data18_);
	}
}


static gboolean __lambda35_ (Block18Data* _data18_, GdkEventKey* event) {
	BoxesMachineActor * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GdkEventKey _tmp2_;
	guint _tmp3_;
	gboolean _tmp6_;
	gboolean _tmp9_;
	self = _data18_->self;
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp2_ = *event;
	_tmp3_ = _tmp2_.keyval;
	if (_tmp3_ == ((guint) GDK_KEY_KP_Enter)) {
		_tmp1_ = TRUE;
	} else {
		GdkEventKey _tmp4_;
		guint _tmp5_;
		_tmp4_ = *event;
		_tmp5_ = _tmp4_.keyval;
		_tmp1_ = _tmp5_ == ((guint) GDK_KEY_ISO_Enter);
	}
	_tmp6_ = _tmp1_;
	if (_tmp6_) {
		_tmp0_ = TRUE;
	} else {
		GdkEventKey _tmp7_;
		guint _tmp8_;
		_tmp7_ = *event;
		_tmp8_ = _tmp7_.keyval;
		_tmp0_ = _tmp8_ == ((guint) GDK_KEY_Return);
	}
	_tmp9_ = _tmp0_;
	if (_tmp9_) {
		BoxesMachine* _tmp10_;
		_tmp10_ = _data18_->machine;
		boxes_machine_connect_display (_tmp10_);
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}


static gboolean ___lambda35__gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self) {
	gboolean result;
	result = __lambda35_ (self, event);
	return result;
}


static void __lambda36_ (Block18Data* _data18_) {
	BoxesMachineActor * self;
	ClutterBindConstraint* _tmp0_;
	BoxesMachine* _tmp1_;
	BoxesApp* _tmp2_;
	ClutterActor* _tmp3_;
	ClutterActor* _tmp4_;
	gfloat _tmp5_;
	gfloat _tmp6_;
	self = _data18_->self;
	_tmp0_ = self->priv->yconstraint;
	_tmp1_ = _data18_->machine;
	_tmp2_ = _tmp1_->app;
	_tmp3_ = boxes_ui_get_actor ((BoxesUI*) _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = clutter_actor_get_height (_tmp4_);
	_tmp6_ = _tmp5_;
	clutter_bind_constraint_set_offset (_tmp0_, _tmp6_ - BOXES_MACHINE_ACTOR_properties_y);
}


static void ___lambda36__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda36_ (self);
}


BoxesMachineActor* boxes_machine_actor_construct (GType object_type, BoxesMachine* machine) {
	BoxesMachineActor * self = NULL;
	Block18Data* _data18_;
	BoxesMachine* _tmp0_;
	BoxesMachine* _tmp1_;
	BoxesMachine* _tmp2_;
	BoxesMachine* _tmp3_;
	ClutterBoxLayout* _tmp4_;
	ClutterBoxLayout* _tmp5_;
	ClutterBoxLayout* layout;
	ClutterBox* _tmp6_;
	ClutterBox* _tmp7_;
	GtkClutterTexture* _tmp8_;
	GtkClutterTexture* _tmp9_;
	GtkClutterTexture* _tmp10_;
	BoxesMachine* _tmp11_;
	GdkPixbuf* _tmp12_;
	GdkPixbuf* _tmp13_;
	GtkClutterTexture* _tmp14_;
	ClutterBox* _tmp15_;
	GtkClutterTexture* _tmp16_;
	GtkVBox* _tmp17_;
	GtkVBox* _tmp18_;
	GtkVBox* _tmp19_;
	GtkClutterActor* _tmp20_;
	GtkClutterActor* _tmp21_;
	GtkClutterActor* _tmp22_;
	GtkWidget* _tmp23_ = NULL;
	GtkStyleContext* _tmp24_ = NULL;
	BoxesMachine* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	GtkLabel* _tmp28_;
	GtkLabel* _tmp29_;
	GtkLabel* _tmp30_;
	GdkColor _tmp31_ = {0};
	BoxesMachine* _tmp32_;
	GtkLabel* _tmp33_;
	GtkVBox* _tmp34_;
	GtkLabel* _tmp35_;
	GtkEntry* _tmp36_;
	GtkEntry* _tmp37_;
	GtkEntry* _tmp38_;
	GtkEntry* _tmp39_;
	const gchar* _tmp40_ = NULL;
	GtkEntry* _tmp41_;
	GtkVBox* _tmp42_;
	GtkEntry* _tmp43_;
	GtkVBox* _tmp44_;
	GtkEntry* _tmp45_;
	GtkClutterActor* _tmp46_;
	ClutterBox* _tmp47_;
	ClutterActor* _tmp48_;
	ClutterActor* _tmp49_;
	BoxesMachine* _tmp50_;
	BoxesApp* _tmp51_;
	ClutterActor* _tmp52_;
	ClutterActor* _tmp53_;
	BoxesMachine* _tmp54_;
	BoxesApp* _tmp55_;
	ClutterActor* _tmp56_;
	ClutterActor* _tmp57_;
	gfloat _tmp58_;
	gfloat _tmp59_;
	ClutterBindConstraint* _tmp60_;
	ClutterBindConstraint* _tmp61_;
	BoxesMachine* _tmp62_;
	BoxesApp* _tmp63_;
	ClutterActor* _tmp64_;
	ClutterActor* _tmp65_;
	gulong _tmp66_ = 0UL;
	ClutterBindConstraint* _tmp67_;
	g_return_val_if_fail (machine != NULL, NULL);
	_data18_ = g_slice_new0 (Block18Data);
	_data18_->_ref_count_ = 1;
	_tmp0_ = machine;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_data18_->machine = _tmp1_;
	self = (BoxesMachineActor*) boxes_ui_construct (object_type);
	_data18_->self = g_object_ref (self);
	_tmp2_ = _data18_->machine;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->priv->machine);
	self->priv->machine = _tmp3_;
	_tmp4_ = (ClutterBoxLayout*) clutter_box_layout_new ();
	_tmp5_ = g_object_ref_sink (_tmp4_);
	layout = _tmp5_;
	clutter_box_layout_set_vertical (layout, TRUE);
	clutter_box_layout_set_spacing (layout, (guint) 10);
	_tmp6_ = (ClutterBox*) clutter_box_new ((ClutterLayoutManager*) layout);
	_tmp7_ = g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->box);
	self->box = _tmp7_;
	_tmp8_ = (GtkClutterTexture*) gtk_clutter_texture_new ();
	_tmp9_ = g_object_ref_sink (_tmp8_);
	_g_object_unref0 (self->priv->screenshot);
	self->priv->screenshot = _tmp9_;
	_tmp10_ = self->priv->screenshot;
	clutter_actor_set_name ((ClutterActor*) _tmp10_, "screenshot");
	_tmp11_ = _data18_->machine;
	_tmp12_ = boxes_machine_get_pixbuf (_tmp11_);
	_tmp13_ = _tmp12_;
	boxes_machine_actor_set_screenshot (self, _tmp13_);
	boxes_machine_actor_scale_screenshot (self, 1.5f);
	_tmp14_ = self->priv->screenshot;
	_tmp15_ = self->box;
	boxes_actor_add ((ClutterActor*) _tmp14_, (ClutterContainer*) _tmp15_);
	_tmp16_ = self->priv->screenshot;
	clutter_texture_set_keep_aspect_ratio ((ClutterTexture*) _tmp16_, TRUE);
	_tmp17_ = (GtkVBox*) gtk_vbox_new (FALSE, 0);
	_tmp18_ = g_object_ref_sink (_tmp17_);
	_g_object_unref0 (self->priv->vbox);
	self->priv->vbox = _tmp18_;
	_tmp19_ = self->priv->vbox;
	_tmp20_ = (GtkClutterActor*) gtk_clutter_actor_new_with_contents ((GtkWidget*) _tmp19_);
	_tmp21_ = g_object_ref_sink (_tmp20_);
	_g_object_unref0 (self->priv->gtk_vbox);
	self->priv->gtk_vbox = _tmp21_;
	_tmp22_ = self->priv->gtk_vbox;
	_tmp23_ = gtk_clutter_actor_get_widget (_tmp22_);
	_tmp24_ = gtk_widget_get_style_context (_tmp23_);
	gtk_style_context_add_class (_tmp24_, "boxes-bg");
	_tmp25_ = _data18_->machine;
	_tmp26_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _tmp25_);
	_tmp27_ = _tmp26_;
	_tmp28_ = (GtkLabel*) gtk_label_new (_tmp27_);
	_tmp29_ = g_object_ref_sink (_tmp28_);
	_g_object_unref0 (self->priv->label);
	self->priv->label = _tmp29_;
	_tmp30_ = self->priv->label;
	boxes_get_color ("white", &_tmp31_);
	gtk_widget_modify_fg ((GtkWidget*) _tmp30_, GTK_STATE_NORMAL, &_tmp31_);
	_tmp32_ = _data18_->machine;
	_tmp33_ = self->priv->label;
	g_object_bind_property_with_closures ((GObject*) _tmp32_, "name", (GObject*) _tmp33_, "label", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)));
	_tmp34_ = self->priv->vbox;
	_tmp35_ = self->priv->label;
	gtk_container_add ((GtkContainer*) _tmp34_, (GtkWidget*) _tmp35_);
	_tmp36_ = (GtkEntry*) gtk_entry_new ();
	_tmp37_ = g_object_ref_sink (_tmp36_);
	_g_object_unref0 (self->priv->password_entry);
	self->priv->password_entry = _tmp37_;
	_tmp38_ = self->priv->password_entry;
	gtk_entry_set_visibility (_tmp38_, FALSE);
	_tmp39_ = self->priv->password_entry;
	_tmp40_ = _ ("Password");
	gtk_entry_set_placeholder_text (_tmp39_, _tmp40_);
	boxes_machine_actor_set_password_needed (self, FALSE);
	_tmp41_ = self->priv->password_entry;
	g_signal_connect_data ((GtkWidget*) _tmp41_, "key-press-event", (GCallback) ___lambda35__gtk_widget_key_press_event, block18_data_ref (_data18_), (GClosureNotify) block18_data_unref, 0);
	_tmp42_ = self->priv->vbox;
	_tmp43_ = self->priv->password_entry;
	gtk_container_add ((GtkContainer*) _tmp42_, (GtkWidget*) _tmp43_);
	_tmp44_ = self->priv->vbox;
	gtk_widget_show_all ((GtkWidget*) _tmp44_);
	_tmp45_ = self->priv->password_entry;
	gtk_widget_hide ((GtkWidget*) _tmp45_);
	_tmp46_ = self->priv->gtk_vbox;
	_tmp47_ = self->box;
	boxes_actor_add ((ClutterActor*) _tmp46_, (ClutterContainer*) _tmp47_);
	_tmp48_ = boxes_ui_get_actor ((BoxesUI*) self);
	_tmp49_ = _tmp48_;
	clutter_actor_set_reactive (_tmp49_, TRUE);
	_tmp50_ = _data18_->machine;
	_tmp51_ = _tmp50_->app;
	_tmp52_ = boxes_ui_get_actor ((BoxesUI*) _tmp51_);
	_tmp53_ = _tmp52_;
	_tmp54_ = _data18_->machine;
	_tmp55_ = _tmp54_->app;
	_tmp56_ = boxes_ui_get_actor ((BoxesUI*) _tmp55_);
	_tmp57_ = _tmp56_;
	_tmp58_ = clutter_actor_get_height (_tmp57_);
	_tmp59_ = _tmp58_;
	_tmp60_ = (ClutterBindConstraint*) clutter_bind_constraint_new (_tmp53_, CLUTTER_BIND_Y, _tmp59_ - BOXES_MACHINE_ACTOR_properties_y);
	_tmp61_ = g_object_ref_sink (_tmp60_);
	_g_object_unref0 (self->priv->yconstraint);
	self->priv->yconstraint = _tmp61_;
	_tmp62_ = _data18_->machine;
	_tmp63_ = _tmp62_->app;
	_tmp64_ = boxes_ui_get_actor ((BoxesUI*) _tmp63_);
	_tmp65_ = _tmp64_;
	_tmp66_ = g_signal_connect_data ((GObject*) _tmp65_, "notify::height", (GCallback) ___lambda36__g_object_notify, block18_data_ref (_data18_), (GClosureNotify) block18_data_unref, 0);
	self->priv->height_id = _tmp66_;
	_tmp67_ = self->priv->yconstraint;
	clutter_actor_meta_set_enabled ((ClutterActorMeta*) _tmp67_, FALSE);
	_g_object_unref0 (layout);
	block18_data_unref (_data18_);
	_data18_ = NULL;
	return self;
}


BoxesMachineActor* boxes_machine_actor_new (BoxesMachine* machine) {
	return boxes_machine_actor_construct (BOXES_TYPE_MACHINE_ACTOR, machine);
}


void boxes_machine_actor_scale_screenshot (BoxesMachineActor* self, gfloat scale) {
	GtkClutterTexture* _tmp0_;
	gfloat _tmp1_;
	gfloat _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->screenshot;
	_tmp1_ = scale;
	_tmp2_ = scale;
	clutter_actor_set_size ((ClutterActor*) _tmp0_, BOXES_MACHINE_SCREENSHOT_WIDTH * _tmp1_, BOXES_MACHINE_SCREENSHOT_HEIGHT * _tmp2_);
}


void boxes_machine_actor_set_screenshot (BoxesMachineActor* self, GdkPixbuf* pixbuf) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (pixbuf != NULL);
	{
		GtkClutterTexture* _tmp0_;
		GdkPixbuf* _tmp1_;
		_tmp0_ = self->priv->screenshot;
		_tmp1_ = pixbuf;
		gtk_clutter_texture_set_from_pixbuf (_tmp0_, _tmp1_, &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch33_g_error;
		}
	}
	goto __finally33;
	__catch33_g_error:
	{
		GError* err = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
		err = _inner_error_;
		_inner_error_ = NULL;
		_tmp2_ = err;
		_tmp3_ = _tmp2_->message;
		g_warning ("machine.vala:343: %s", _tmp3_);
		_g_error_free0 (err);
	}
	__finally33:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


void boxes_machine_actor_set_password_needed (BoxesMachineActor* self, gboolean needed) {
	GtkEntry* _tmp0_;
	gboolean _tmp1_;
	GtkEntry* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->password_entry;
	_tmp1_ = needed;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, _tmp1_);
	_tmp2_ = self->priv->password_entry;
	_tmp3_ = needed;
	gtk_widget_set_can_focus ((GtkWidget*) _tmp2_, _tmp3_);
	_tmp4_ = needed;
	if (_tmp4_) {
		GtkEntry* _tmp5_;
		BoxesMachine* _tmp6_;
		_tmp5_ = self->priv->password_entry;
		gtk_widget_grab_focus ((GtkWidget*) _tmp5_);
		_tmp6_ = self->priv->machine;
		boxes_machine_set_display (_tmp6_, NULL);
	}
}


void boxes_machine_actor_set_username_needed (BoxesMachineActor* self, gboolean needed) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	g_debug ("machine.vala:357: FIXME: Do something about fetching username when req" \
"uired?");
	_tmp0_ = needed;
	if (_tmp0_) {
		BoxesMachine* _tmp1_;
		_tmp1_ = self->priv->machine;
		boxes_machine_set_display (_tmp1_, NULL);
	}
}


gchar* boxes_machine_actor_get_password (BoxesMachineActor* self) {
	gchar* result = NULL;
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->password_entry;
	_tmp1_ = gtk_entry_get_text (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	result = _tmp3_;
	return result;
}


static void _____lambda37_ (BoxesMachineActor* self) {
	GtkClutterActor* _tmp0_;
	GtkClutterActor* _tmp1_;
	GtkWidget* _tmp2_ = NULL;
	GtkWidget* _tmp3_;
	GtkWidget* widget;
	GtkClutterActor* _tmp4_;
	BoxesMachine* _tmp5_;
	BoxesDisplay* _tmp6_;
	BoxesDisplay* _tmp7_;
	BoxesMachine* _tmp8_;
	BoxesApp* _tmp9_;
	BoxesDisplayPage* _tmp10_;
	BoxesMachine* _tmp11_;
	BoxesDisplay* _tmp12_;
	BoxesDisplay* _tmp13_;
	_tmp0_ = self->priv->display;
	boxes_actor_remove ((ClutterActor*) _tmp0_);
	_tmp1_ = self->priv->display;
	g_object_get (_tmp1_, "contents", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	widget = _tmp3_;
	_tmp4_ = self->priv->display;
	g_object_set (_tmp4_, "contents", NULL, NULL);
	_g_object_unref0 (self->priv->display);
	self->priv->display = NULL;
	_tmp5_ = self->priv->machine;
	_tmp6_ = boxes_machine_get_display (_tmp5_);
	_tmp7_ = _tmp6_;
	boxes_display_set_enable_inputs (_tmp7_, widget, TRUE);
	_tmp8_ = self->priv->machine;
	_tmp9_ = _tmp8_->app;
	_tmp10_ = _tmp9_->display_page;
	_tmp11_ = self->priv->machine;
	_tmp12_ = boxes_machine_get_display (_tmp11_);
	_tmp13_ = _tmp12_;
	boxes_display_page_show_display (_tmp10_, _tmp13_, widget);
	_g_object_unref0 (widget);
}


static void ______lambda37__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) {
	_____lambda37_ (self);
}


static void ___lambda38_ (BoxesMachineActor* self) {
	ClutterBindConstraint* _tmp0_;
	_tmp0_ = self->priv->yconstraint;
	clutter_actor_meta_set_enabled ((ClutterActorMeta*) _tmp0_, TRUE);
}


static void ____lambda38__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) {
	___lambda38_ (self);
}


static void boxes_machine_actor_real_ui_state_changed (BoxesUI* base) {
	BoxesMachineActor * self;
	gint window_width = 0;
	gint window_height = 0;
	gint width = 0;
	gint height = 0;
	gint x = 0;
	gint y = 0;
	ClutterBindConstraint* _tmp0_;
	BoxesMachine* _tmp1_;
	BoxesApp* _tmp2_;
	BoxesDisplayPage* _tmp3_;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	BoxesMachine* _tmp6_;
	BoxesApp* _tmp7_;
	GtkApplicationWindow* _tmp8_;
	gint _tmp9_ = 0;
	gint _tmp10_ = 0;
	gint _tmp11_;
	gint _tmp12_;
	gint _tmp13_;
	gint _tmp14_;
	BoxesUIState _tmp15_;
	BoxesUIState _tmp16_;
	self = (BoxesMachineActor*) base;
	_tmp0_ = self->priv->yconstraint;
	clutter_actor_meta_set_enabled ((ClutterActorMeta*) _tmp0_, FALSE);
	_tmp1_ = self->priv->machine;
	_tmp2_ = _tmp1_->app;
	_tmp3_ = _tmp2_->display_page;
	boxes_display_page_get_size (_tmp3_, &_tmp4_, &_tmp5_);
	width = _tmp4_;
	height = _tmp5_;
	_tmp6_ = self->priv->machine;
	_tmp7_ = _tmp6_->app;
	_tmp8_ = _tmp7_->window;
	gtk_window_get_size ((GtkWindow*) _tmp8_, &_tmp9_, &_tmp10_);
	window_width = _tmp9_;
	window_height = _tmp10_;
	_tmp11_ = window_width;
	_tmp12_ = width;
	x = _tmp11_ - _tmp12_;
	_tmp13_ = window_height;
	_tmp14_ = height;
	y = _tmp13_ - _tmp14_;
	_tmp15_ = boxes_ui_get_ui_state ((BoxesUI*) self);
	_tmp16_ = _tmp15_;
	switch (_tmp16_) {
		case BOXES_UI_STATE_CREDS:
		{
			boxes_machine_actor_scale_screenshot (self, 2.0f);
			break;
		}
		case BOXES_UI_STATE_DISPLAY:
		{
			BoxesUIState _tmp17_;
			_tmp17_ = ((BoxesUI*) self)->previous_ui_state;
			if (_tmp17_ == BOXES_UI_STATE_CREDS) {
				GtkEntry* _tmp18_;
				GtkLabel* _tmp19_;
				GtkClutterTexture* _tmp20_;
				BoxesMachine* _tmp21_;
				BoxesApp* _tmp22_;
				guint _tmp23_;
				gint _tmp24_;
				gint _tmp25_;
				ClutterActor* _tmp26_;
				ClutterActor* _tmp27_;
				BoxesMachine* _tmp28_;
				BoxesApp* _tmp29_;
				guint _tmp30_;
				gint _tmp31_;
				gint _tmp32_;
				_tmp18_ = self->priv->password_entry;
				gtk_widget_hide ((GtkWidget*) _tmp18_);
				_tmp19_ = self->priv->label;
				gtk_widget_hide ((GtkWidget*) _tmp19_);
				_tmp20_ = self->priv->screenshot;
				_tmp21_ = self->priv->machine;
				_tmp22_ = _tmp21_->app;
				_tmp23_ = _tmp22_->duration;
				_tmp24_ = width;
				_tmp25_ = height;
				clutter_actor_animate ((ClutterActor*) _tmp20_, (gulong) CLUTTER_LINEAR, _tmp23_, "width", (gfloat) _tmp24_, "height", (gfloat) _tmp25_, NULL);
				_tmp26_ = boxes_ui_get_actor ((BoxesUI*) self);
				_tmp27_ = _tmp26_;
				_tmp28_ = self->priv->machine;
				_tmp29_ = _tmp28_->app;
				_tmp30_ = _tmp29_->duration;
				_tmp31_ = x;
				_tmp32_ = y;
				clutter_actor_animate (_tmp27_, (gulong) CLUTTER_LINEAR, _tmp30_, "x", (gfloat) _tmp31_, "y", (gfloat) _tmp32_, NULL);
			} else {
				GtkClutterActor* _tmp33_;
				_tmp33_ = self->priv->display;
				if (_tmp33_ != NULL) {
					GtkClutterActor* _tmp34_;
					BoxesMachine* _tmp35_;
					BoxesApp* _tmp36_;
					guint _tmp37_;
					gint _tmp38_;
					gint _tmp39_;
					gint _tmp40_;
					gint _tmp41_;
					ClutterAnimation* _tmp42_ = NULL;
					ClutterAnimation* _tmp43_;
					ClutterAnimation* anim;
					ClutterAnimation* _tmp44_;
					_tmp34_ = self->priv->display;
					_tmp35_ = self->priv->machine;
					_tmp36_ = _tmp35_->app;
					_tmp37_ = _tmp36_->duration;
					_tmp38_ = x;
					_tmp39_ = y;
					_tmp40_ = width;
					_tmp41_ = height;
					_tmp42_ = clutter_actor_animate ((ClutterActor*) _tmp34_, (gulong) CLUTTER_LINEAR, _tmp37_, "x", (gfloat) _tmp38_, "y", (gfloat) _tmp39_, "width", (gfloat) _tmp40_, "height", (gfloat) _tmp41_, NULL);
					_tmp43_ = _g_object_ref0 (_tmp42_);
					anim = _tmp43_;
					_tmp44_ = anim;
					g_signal_connect_object (_tmp44_, "completed", (GCallback) ______lambda37__clutter_animation_completed, self, 0);
					_g_object_unref0 (anim);
				} else {
					BoxesMachine* _tmp45_;
					BoxesApp* _tmp46_;
					BoxesDisplayPage* _tmp47_;
					_tmp45_ = self->priv->machine;
					_tmp46_ = _tmp45_->app;
					_tmp47_ = _tmp46_->display_page;
					boxes_display_page_show (_tmp47_);
				}
			}
			break;
		}
		case BOXES_UI_STATE_COLLECTION:
		{
			GtkEntry* _tmp48_;
			GtkEntry* _tmp49_;
			GtkLabel* _tmp50_;
			boxes_machine_actor_scale_screenshot (self, 1.5f);
			_tmp48_ = self->priv->password_entry;
			gtk_widget_set_can_focus ((GtkWidget*) _tmp48_, FALSE);
			_tmp49_ = self->priv->password_entry;
			gtk_widget_hide ((GtkWidget*) _tmp49_);
			_tmp50_ = self->priv->label;
			gtk_widget_show ((GtkWidget*) _tmp50_);
			break;
		}
		case BOXES_UI_STATE_PROPERTIES:
		{
			BoxesMachine* _tmp51_;
			BoxesApp* _tmp52_;
			BoxesDisplayPage* _tmp53_;
			GtkWidget* _tmp54_ = NULL;
			GtkWidget* widget;
			BoxesMachine* _tmp55_;
			BoxesDisplay* _tmp56_;
			BoxesDisplay* _tmp57_;
			GtkWidget* _tmp58_;
			GtkWidget* _tmp59_;
			GtkClutterActor* _tmp60_;
			GtkClutterActor* _tmp61_;
			GtkClutterActor* _tmp62_;
			GtkClutterActor* _tmp63_;
			GtkClutterActor* _tmp64_;
			gint _tmp65_;
			GtkClutterActor* _tmp66_;
			gint _tmp67_;
			GtkClutterActor* _tmp68_;
			BoxesMachine* _tmp69_;
			BoxesApp* _tmp70_;
			ClutterStage* _tmp71_;
			GtkClutterActor* _tmp72_;
			ClutterBindConstraint* _tmp73_;
			GtkClutterActor* _tmp74_;
			BoxesMachine* _tmp75_;
			BoxesApp* _tmp76_;
			guint _tmp77_;
			gint _tmp78_;
			ClutterAnimation* _tmp79_ = NULL;
			_tmp51_ = self->priv->machine;
			_tmp52_ = _tmp51_->app;
			_tmp53_ = _tmp52_->display_page;
			_tmp54_ = boxes_display_page_remove_display (_tmp53_);
			widget = _tmp54_;
			_tmp55_ = self->priv->machine;
			_tmp56_ = boxes_machine_get_display (_tmp55_);
			_tmp57_ = _tmp56_;
			_tmp58_ = widget;
			boxes_display_set_enable_inputs (_tmp57_, _tmp58_, FALSE);
			_tmp59_ = widget;
			_tmp60_ = (GtkClutterActor*) gtk_clutter_actor_new_with_contents (_tmp59_);
			_tmp61_ = g_object_ref_sink (_tmp60_);
			_g_object_unref0 (self->priv->display);
			self->priv->display = _tmp61_;
			_tmp62_ = self->priv->display;
			clutter_actor_set_x ((ClutterActor*) _tmp62_, 0.0f);
			_tmp63_ = self->priv->display;
			clutter_actor_set_y ((ClutterActor*) _tmp63_, 0.0f);
			_tmp64_ = self->priv->display;
			_tmp65_ = width;
			clutter_actor_set_width ((ClutterActor*) _tmp64_, (gfloat) _tmp65_);
			_tmp66_ = self->priv->display;
			_tmp67_ = height;
			clutter_actor_set_height ((ClutterActor*) _tmp66_, (gfloat) _tmp67_);
			_tmp68_ = self->priv->display;
			_tmp69_ = self->priv->machine;
			_tmp70_ = _tmp69_->app;
			_tmp71_ = _tmp70_->stage;
			boxes_actor_add ((ClutterActor*) _tmp68_, (ClutterContainer*) _tmp71_);
			_tmp72_ = self->priv->display;
			_tmp73_ = self->priv->yconstraint;
			clutter_actor_add_constraint ((ClutterActor*) _tmp72_, (ClutterConstraint*) _tmp73_);
			_tmp74_ = self->priv->display;
			_tmp75_ = self->priv->machine;
			_tmp76_ = _tmp75_->app;
			_tmp77_ = _tmp76_->duration;
			_tmp78_ = height;
			_tmp79_ = clutter_actor_animate ((ClutterActor*) _tmp74_, (gulong) CLUTTER_LINEAR, _tmp77_, "x", 10.0f, "y", _tmp78_ - 200.0f, "width", 180.0f, "height", 130.0f, NULL);
			g_signal_connect_object (_tmp79_, "completed", (GCallback) ____lambda38__clutter_animation_completed, self, 0);
			_g_object_unref0 (widget);
			break;
		}
		default:
		{
			break;
		}
	}
}


static ClutterActor* boxes_machine_actor_real_get_actor (BoxesUI* base) {
	ClutterActor* result;
	BoxesMachineActor* self;
	ClutterBox* _tmp0_;
	self = (BoxesMachineActor*) base;
	_tmp0_ = self->box;
	result = (ClutterActor*) _tmp0_;
	return result;
}


static void boxes_machine_actor_class_init (BoxesMachineActorClass * klass) {
	boxes_machine_actor_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesMachineActorPrivate));
	BOXES_UI_CLASS (klass)->ui_state_changed = boxes_machine_actor_real_ui_state_changed;
	BOXES_UI_CLASS (klass)->get_actor = boxes_machine_actor_real_get_actor;
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_machine_actor_get_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_machine_actor_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_MACHINE_ACTOR_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_machine_actor_instance_init (BoxesMachineActor * self) {
	self->priv = BOXES_MACHINE_ACTOR_GET_PRIVATE (self);
}


static void boxes_machine_actor_finalize (GObject* obj) {
	BoxesMachineActor * self;
	BoxesMachine* _tmp0_;
	BoxesApp* _tmp1_;
	ClutterActor* _tmp2_;
	ClutterActor* _tmp3_;
	gulong _tmp4_;
	self = BOXES_MACHINE_ACTOR (obj);
	_tmp0_ = self->priv->machine;
	_tmp1_ = _tmp0_->app;
	_tmp2_ = boxes_ui_get_actor ((BoxesUI*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->height_id;
	g_signal_handler_disconnect ((GObject*) _tmp3_, _tmp4_);
	self->priv->height_id = (gulong) 0;
	_g_object_unref0 (self->box);
	_g_object_unref0 (self->priv->yconstraint);
	_g_object_unref0 (self->priv->screenshot);
	_g_object_unref0 (self->priv->gtk_vbox);
	_g_object_unref0 (self->priv->display);
	_g_object_unref0 (self->priv->label);
	_g_object_unref0 (self->priv->vbox);
	_g_object_unref0 (self->priv->password_entry);
	_g_object_unref0 (self->priv->machine);
	G_OBJECT_CLASS (boxes_machine_actor_parent_class)->finalize (obj);
}


GType boxes_machine_actor_get_type (void) {
	static volatile gsize boxes_machine_actor_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_machine_actor_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesMachineActorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_machine_actor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesMachineActor), 0, (GInstanceInitFunc) boxes_machine_actor_instance_init, NULL };
		GType boxes_machine_actor_type_id;
		boxes_machine_actor_type_id = g_type_register_static (BOXES_TYPE_UI, "BoxesMachineActor", &g_define_type_info, 0);
		g_once_init_leave (&boxes_machine_actor_type_id__volatile, boxes_machine_actor_type_id);
	}
	return boxes_machine_actor_type_id__volatile;
}


static void _vala_boxes_machine_actor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesMachineActor * self;
	self = BOXES_MACHINE_ACTOR (object);
	switch (property_id) {
		case BOXES_MACHINE_ACTOR_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;
	}
}



