/* display-page.c generated by valac 0.16.0, the Vala compiler
 * generated from display-page.vala, do not modify */

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

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


#define BOXES_TYPE_DISPLAY_TOOLBAR (boxes_display_toolbar_get_type ())
#define BOXES_DISPLAY_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DISPLAY_TOOLBAR, BoxesDisplayToolbar))
#define BOXES_DISPLAY_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DISPLAY_TOOLBAR, BoxesDisplayToolbarClass))
#define BOXES_IS_DISPLAY_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DISPLAY_TOOLBAR))
#define BOXES_IS_DISPLAY_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DISPLAY_TOOLBAR))
#define BOXES_DISPLAY_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DISPLAY_TOOLBAR, BoxesDisplayToolbarClass))

typedef struct _BoxesDisplayToolbar BoxesDisplayToolbar;
typedef struct _BoxesDisplayToolbarClass BoxesDisplayToolbarClass;
typedef struct _BoxesDisplayToolbarPrivate BoxesDisplayToolbarPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

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

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIClass BoxesUIClass;

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

typedef struct _BoxesApp BoxesApp;
typedef struct _BoxesAppClass BoxesAppClass;
typedef struct _Block6Data Block6Data;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())

#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;
typedef struct _BoxesDisplayPagePrivate BoxesDisplayPagePrivate;
typedef struct _Block7Data Block7Data;
typedef struct _BoxesUIPrivate BoxesUIPrivate;
typedef struct _BoxesAppPrivate BoxesAppPrivate;

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

typedef struct _BoxesCollectionItem BoxesCollectionItem;
typedef struct _BoxesCollectionItemClass BoxesCollectionItemClass;

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

typedef struct _BoxesTopbar BoxesTopbar;
typedef struct _BoxesTopbarClass BoxesTopbarClass;

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

typedef struct _BoxesNotificationbar BoxesNotificationbar;
typedef struct _BoxesNotificationbarClass BoxesNotificationbarClass;

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

typedef struct _BoxesSidebar BoxesSidebar;
typedef struct _BoxesSidebarClass BoxesSidebarClass;

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

typedef struct _BoxesSelectionbar BoxesSelectionbar;
typedef struct _BoxesSelectionbarClass BoxesSelectionbarClass;

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

typedef struct _BoxesWizard BoxesWizard;
typedef struct _BoxesWizardClass BoxesWizardClass;

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

typedef struct _BoxesProperties BoxesProperties;
typedef struct _BoxesPropertiesClass BoxesPropertiesClass;

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

typedef struct _BoxesCollection BoxesCollection;
typedef struct _BoxesCollectionClass BoxesCollectionClass;

#define BOXES_TYPE_APP_PAGE (boxes_app_page_get_type ())

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

struct _BoxesDisplayToolbar {
	GtkToolbar parent_instance;
	BoxesDisplayToolbarPrivate * priv;
};

struct _BoxesDisplayToolbarClass {
	GtkToolbarClass parent_class;
};

struct _BoxesDisplayToolbarPrivate {
	GtkLabel* label;
};

struct _Block6Data {
	int _ref_count_;
	BoxesDisplayToolbar * self;
	BoxesApp* app;
};

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 _BoxesDisplayPage {
	GObject parent_instance;
	BoxesDisplayPagePrivate * priv;
};

struct _BoxesDisplayPageClass {
	GObjectClass parent_class;
};

struct _BoxesDisplayPagePrivate {
	GtkOverlay* overlay;
	BoxesApp* app;
	GtkEventBox* event_box;
	GtkBox* box;
	BoxesDisplayToolbar* overlay_toolbar;
	BoxesDisplayToolbar* toolbar;
	guint toolbar_hide_id;
	gulong display_id;
	gulong cursor_id;
};

struct _Block7Data {
	int _ref_count_;
	BoxesDisplayPage * self;
	BoxesApp* app;
};

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

struct _BoxesAppClass {
	BoxesUIClass parent_class;
};

typedef enum  {
	BOXES_APP_PAGE_MAIN,
	BOXES_APP_PAGE_DISPLAY
} BoxesAppPage;

struct _Block8Data {
	int _ref_count_;
	BoxesDisplayPage * self;
	gulong draw_id;
	GtkWidget* display;
};


static gpointer boxes_display_toolbar_parent_class = NULL;
static gpointer boxes_display_page_parent_class = NULL;

GType boxes_display_toolbar_get_type (void) G_GNUC_CONST;
#define BOXES_DISPLAY_TOOLBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_DISPLAY_TOOLBAR, BoxesDisplayToolbarPrivate))
enum  {
	BOXES_DISPLAY_TOOLBAR_DUMMY_PROPERTY,
	BOXES_DISPLAY_TOOLBAR_TITLE
};
GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_app_get_type (void) G_GNUC_CONST;
BoxesDisplayToolbar* boxes_display_toolbar_new (BoxesApp* app);
BoxesDisplayToolbar* boxes_display_toolbar_construct (GType object_type, BoxesApp* app);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static void __lambda20_ (Block6Data* _data6_, GtkButton* button);
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
void boxes_ui_set_ui_state (BoxesUI* self, BoxesUIState value);
static void ___lambda20__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void __lambda21_ (Block6Data* _data6_, GtkButton* button);
gboolean boxes_app_get_fullscreen (BoxesApp* self);
void boxes_app_set_fullscreen (BoxesApp* self, gboolean value);
static void ___lambda21__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void __lambda22_ (Block6Data* _data6_, GtkButton* button);
static void ___lambda22__gtk_button_clicked (GtkButton* _sender, gpointer self);
const gchar* boxes_display_toolbar_get_title (BoxesDisplayToolbar* self);
void boxes_display_toolbar_set_title (BoxesDisplayToolbar* self, const gchar* value);
static void boxes_display_toolbar_finalize (GObject* obj);
static void _vala_boxes_display_toolbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_display_toolbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType boxes_display_page_get_type (void) G_GNUC_CONST;
#define BOXES_DISPLAY_PAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPagePrivate))
enum  {
	BOXES_DISPLAY_PAGE_DUMMY_PROPERTY,
	BOXES_DISPLAY_PAGE_WIDGET
};
static void boxes_display_page_toolbar_event_stop (BoxesDisplayPage* self);
BoxesDisplayPage* boxes_display_page_new (BoxesApp* app);
BoxesDisplayPage* boxes_display_page_construct (GType object_type, BoxesApp* app);
static Block7Data* block7_data_ref (Block7Data* _data7_);
static void block7_data_unref (void * _userdata_);
static gboolean __lambda23_ (Block7Data* _data7_, GdkEvent* event);
static void boxes_display_page_set_overlay_toolbar_visible (BoxesDisplayPage* self, gboolean visible);
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
GType boxes_topbar_get_type (void) G_GNUC_CONST;
GType boxes_notificationbar_get_type (void) G_GNUC_CONST;
GType boxes_sidebar_get_type (void) G_GNUC_CONST;
GType boxes_selectionbar_get_type (void) G_GNUC_CONST;
GType boxes_wizard_get_type (void) G_GNUC_CONST;
GType boxes_properties_get_type (void) G_GNUC_CONST;
GType boxes_collection_get_type (void) G_GNUC_CONST;
static gboolean _____lambda24_ (BoxesDisplayPage* self);
static gboolean ______lambda24__gsource_func (gpointer self);
static gboolean ___lambda23__gtk_widget_event (GtkWidget* _sender, GdkEvent* event, gpointer self);
static gboolean __lambda25_ (Block7Data* _data7_, GdkEventWindowState* event);
static gboolean ___lambda25__gtk_widget_window_state_event (GtkWidget* _sender, GdkEventWindowState* event, gpointer self);
void boxes_display_page_get_size (BoxesDisplayPage* self, gint* width, gint* height);
void boxes_display_page_show (BoxesDisplayPage* self);
GType boxes_app_page_get_type (void) G_GNUC_CONST;
GType boxes_machine_get_type (void) G_GNUC_CONST;
void boxes_display_page_show_display (BoxesDisplayPage* self, BoxesMachine* machine, GtkWidget* display);
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void block8_data_unref (void * _userdata_);
GtkWidget* boxes_display_page_remove_display (BoxesDisplayPage* self);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
static gboolean __lambda26_ (BoxesDisplayPage* self, GdkEvent* event);
static gboolean ___lambda26__gtk_widget_event (GtkWidget* _sender, GdkEvent* event, gpointer self);
static gboolean __lambda27_ (Block8Data* _data8_);
static void __lambda28_ (Block8Data* _data8_);
static void ___lambda28__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static gboolean ___lambda27__gtk_widget_draw (GtkWidget* _sender, cairo_t* cr, gpointer self);
GtkWidget* boxes_display_page_get_widget (BoxesDisplayPage* self);
static void boxes_display_page_finalize (GObject* obj);
static void _vala_boxes_display_page_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


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


static Block6Data* block6_data_ref (Block6Data* _data6_) {
	g_atomic_int_inc (&_data6_->_ref_count_);
	return _data6_;
}


static void block6_data_unref (void * _userdata_) {
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
		BoxesDisplayToolbar * self;
		self = _data6_->self;
		_g_object_unref0 (_data6_->app);
		_g_object_unref0 (self);
		g_slice_free (Block6Data, _data6_);
	}
}


static void __lambda20_ (Block6Data* _data6_, GtkButton* button) {
	BoxesDisplayToolbar * self;
	BoxesApp* _tmp0_;
	self = _data6_->self;
	g_return_if_fail (button != NULL);
	_tmp0_ = _data6_->app;
	boxes_ui_set_ui_state ((BoxesUI*) _tmp0_, BOXES_UI_STATE_COLLECTION);
}


static void ___lambda20__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda20_ (self, _sender);
}


static void __lambda21_ (Block6Data* _data6_, GtkButton* button) {
	BoxesDisplayToolbar * self;
	BoxesApp* _tmp0_;
	BoxesApp* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	self = _data6_->self;
	g_return_if_fail (button != NULL);
	_tmp0_ = _data6_->app;
	_tmp1_ = _data6_->app;
	_tmp2_ = boxes_app_get_fullscreen (_tmp1_);
	_tmp3_ = _tmp2_;
	boxes_app_set_fullscreen (_tmp0_, !_tmp3_);
}


static void ___lambda21__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda21_ (self, _sender);
}


static void __lambda22_ (Block6Data* _data6_, GtkButton* button) {
	BoxesDisplayToolbar * self;
	BoxesApp* _tmp0_;
	self = _data6_->self;
	g_return_if_fail (button != NULL);
	_tmp0_ = _data6_->app;
	boxes_ui_set_ui_state ((BoxesUI*) _tmp0_, BOXES_UI_STATE_PROPERTIES);
}


static void ___lambda22__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda22_ (self, _sender);
}


BoxesDisplayToolbar* boxes_display_toolbar_construct (GType object_type, BoxesApp* app) {
	BoxesDisplayToolbar * self = NULL;
	Block6Data* _data6_;
	BoxesApp* _tmp0_;
	BoxesApp* _tmp1_;
	GtkStyleContext* _tmp2_ = NULL;
	GtkToolItem* _tmp3_;
	GtkToolItem* _tmp4_;
	GtkToolItem* left_group;
	GtkToolItem* _tmp5_;
	GtkToolItem* _tmp6_;
	GtkToolItem* center_group;
	GtkToolItem* _tmp7_;
	GtkToolItem* _tmp8_;
	GtkToolItem* right_group;
	GtkSizeGroup* _tmp9_;
	GtkSizeGroup* size_group;
	GtkBox* _tmp10_;
	GtkBox* _tmp11_;
	GtkBox* left_box;
	GtkButton* _tmp12_;
	GtkButton* _tmp13_;
	GtkButton* back;
	GtkImage* _tmp14_;
	GtkImage* _tmp15_;
	GtkStyleContext* _tmp16_ = NULL;
	GtkLabel* _tmp17_;
	GtkLabel* _tmp18_;
	GtkLabel* _tmp19_;
	GtkBox* _tmp20_;
	GtkBox* _tmp21_;
	GtkBox* right_box;
	GtkButton* _tmp22_;
	GtkButton* _tmp23_;
	GtkButton* btn;
	GtkImage* _tmp24_;
	GtkImage* _tmp25_;
	GtkStyleContext* _tmp26_ = NULL;
	GtkButton* _tmp27_;
	GtkButton* _tmp28_;
	GtkButton* props;
	GtkImage* _tmp29_;
	GtkImage* _tmp30_;
	GtkStyleContext* _tmp31_ = NULL;
	g_return_val_if_fail (app != NULL, NULL);
	_data6_ = g_slice_new0 (Block6Data);
	_data6_->_ref_count_ = 1;
	_tmp0_ = app;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_data6_->app = _tmp1_;
	self = (BoxesDisplayToolbar*) g_object_new (object_type, NULL);
	_data6_->self = g_object_ref (self);
	gtk_toolbar_set_icon_size ((GtkToolbar*) self, (gint) GTK_ICON_SIZE_MENU);
	_tmp2_ = gtk_widget_get_style_context ((GtkWidget*) self);
	gtk_style_context_add_class (_tmp2_, GTK_STYLE_CLASS_MENUBAR);
	gtk_toolbar_set_show_arrow ((GtkToolbar*) self, FALSE);
	_tmp3_ = gtk_tool_item_new ();
	_tmp4_ = g_object_ref_sink (_tmp3_);
	left_group = _tmp4_;
	gtk_toolbar_insert ((GtkToolbar*) self, left_group, 0);
	_tmp5_ = gtk_tool_item_new ();
	_tmp6_ = g_object_ref_sink (_tmp5_);
	center_group = _tmp6_;
	gtk_tool_item_set_expand (center_group, TRUE);
	gtk_toolbar_insert ((GtkToolbar*) self, center_group, -1);
	_tmp7_ = gtk_tool_item_new ();
	_tmp8_ = g_object_ref_sink (_tmp7_);
	right_group = _tmp8_;
	gtk_toolbar_insert ((GtkToolbar*) self, right_group, -1);
	_tmp9_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
	size_group = _tmp9_;
	gtk_size_group_add_widget (size_group, (GtkWidget*) left_group);
	gtk_size_group_add_widget (size_group, (GtkWidget*) right_group);
	_tmp10_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	_tmp11_ = g_object_ref_sink (_tmp10_);
	left_box = _tmp11_;
	gtk_container_add ((GtkContainer*) left_group, (GtkWidget*) left_box);
	_tmp12_ = (GtkButton*) gtk_button_new ();
	_tmp13_ = g_object_ref_sink (_tmp12_);
	back = _tmp13_;
	_tmp14_ = (GtkImage*) gtk_image_new_from_icon_name ("go-previous-symbolic", GTK_ICON_SIZE_MENU);
	_tmp15_ = g_object_ref_sink (_tmp14_);
	gtk_container_add ((GtkContainer*) back, (GtkWidget*) _tmp15_);
	_g_object_unref0 (_tmp15_);
	_tmp16_ = gtk_widget_get_style_context ((GtkWidget*) back);
	gtk_style_context_add_class (_tmp16_, "raised");
	g_signal_connect_data (back, "clicked", (GCallback) ___lambda20__gtk_button_clicked, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
	gtk_box_pack_start (left_box, (GtkWidget*) back, FALSE, FALSE, (guint) 0);
	_tmp17_ = (GtkLabel*) gtk_label_new ("Display");
	_tmp18_ = g_object_ref_sink (_tmp17_);
	_g_object_unref0 (self->priv->label);
	self->priv->label = _tmp18_;
	_tmp19_ = self->priv->label;
	gtk_container_add ((GtkContainer*) center_group, (GtkWidget*) _tmp19_);
	_tmp20_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
	_tmp21_ = g_object_ref_sink (_tmp20_);
	right_box = _tmp21_;
	gtk_container_add ((GtkContainer*) right_group, (GtkWidget*) right_box);
	_tmp22_ = (GtkButton*) gtk_button_new ();
	_tmp23_ = g_object_ref_sink (_tmp22_);
	btn = _tmp23_;
	_tmp24_ = (GtkImage*) gtk_image_new_from_icon_name ("view-fullscreen-symbolic", GTK_ICON_SIZE_MENU);
	_tmp25_ = g_object_ref_sink (_tmp24_);
	gtk_container_add ((GtkContainer*) btn, (GtkWidget*) _tmp25_);
	_g_object_unref0 (_tmp25_);
	_tmp26_ = gtk_widget_get_style_context ((GtkWidget*) btn);
	gtk_style_context_add_class (_tmp26_, "raised");
	g_signal_connect_data (btn, "clicked", (GCallback) ___lambda21__gtk_button_clicked, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
	gtk_box_pack_start (right_box, (GtkWidget*) btn, FALSE, FALSE, (guint) 0);
	_tmp27_ = (GtkButton*) gtk_button_new ();
	_tmp28_ = g_object_ref_sink (_tmp27_);
	props = _tmp28_;
	_tmp29_ = (GtkImage*) gtk_image_new_from_icon_name ("utilities-system-monitor-symbolic", GTK_ICON_SIZE_MENU);
	_tmp30_ = g_object_ref_sink (_tmp29_);
	gtk_container_add ((GtkContainer*) props, (GtkWidget*) _tmp30_);
	_g_object_unref0 (_tmp30_);
	_tmp31_ = gtk_widget_get_style_context ((GtkWidget*) props);
	gtk_style_context_add_class (_tmp31_, "raised");
	g_signal_connect_data (props, "clicked", (GCallback) ___lambda22__gtk_button_clicked, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
	gtk_box_pack_start (right_box, (GtkWidget*) props, FALSE, FALSE, (guint) 0);
	_g_object_unref0 (props);
	_g_object_unref0 (btn);
	_g_object_unref0 (right_box);
	_g_object_unref0 (back);
	_g_object_unref0 (left_box);
	_g_object_unref0 (size_group);
	_g_object_unref0 (right_group);
	_g_object_unref0 (center_group);
	_g_object_unref0 (left_group);
	block6_data_unref (_data6_);
	_data6_ = NULL;
	return self;
}


BoxesDisplayToolbar* boxes_display_toolbar_new (BoxesApp* app) {
	return boxes_display_toolbar_construct (BOXES_TYPE_DISPLAY_TOOLBAR, app);
}


const gchar* boxes_display_toolbar_get_title (BoxesDisplayToolbar* self) {
	const gchar* result;
	GtkLabel* _tmp0_;
	const gchar* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->label;
	_tmp1_ = gtk_label_get_text (_tmp0_);
	result = _tmp1_;
	return result;
}


void boxes_display_toolbar_set_title (BoxesDisplayToolbar* self, const gchar* value) {
	GtkLabel* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->label;
	_tmp1_ = value;
	gtk_label_set_text (_tmp0_, _tmp1_);
	g_object_notify ((GObject *) self, "title");
}


static void boxes_display_toolbar_class_init (BoxesDisplayToolbarClass * klass) {
	boxes_display_toolbar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesDisplayToolbarPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_display_toolbar_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_display_toolbar_set_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_display_toolbar_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_DISPLAY_TOOLBAR_TITLE, g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void boxes_display_toolbar_instance_init (BoxesDisplayToolbar * self) {
	self->priv = BOXES_DISPLAY_TOOLBAR_GET_PRIVATE (self);
}


static void boxes_display_toolbar_finalize (GObject* obj) {
	BoxesDisplayToolbar * self;
	self = BOXES_DISPLAY_TOOLBAR (obj);
	_g_object_unref0 (self->priv->label);
	G_OBJECT_CLASS (boxes_display_toolbar_parent_class)->finalize (obj);
}


GType boxes_display_toolbar_get_type (void) {
	static volatile gsize boxes_display_toolbar_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_display_toolbar_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesDisplayToolbarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_display_toolbar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesDisplayToolbar), 0, (GInstanceInitFunc) boxes_display_toolbar_instance_init, NULL };
		GType boxes_display_toolbar_type_id;
		boxes_display_toolbar_type_id = g_type_register_static (GTK_TYPE_TOOLBAR, "BoxesDisplayToolbar", &g_define_type_info, 0);
		g_once_init_leave (&boxes_display_toolbar_type_id__volatile, boxes_display_toolbar_type_id);
	}
	return boxes_display_toolbar_type_id__volatile;
}


static void _vala_boxes_display_toolbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesDisplayToolbar * self;
	self = BOXES_DISPLAY_TOOLBAR (object);
	switch (property_id) {
		case BOXES_DISPLAY_TOOLBAR_TITLE:
		g_value_set_string (value, boxes_display_toolbar_get_title (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_boxes_display_toolbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesDisplayToolbar * self;
	self = BOXES_DISPLAY_TOOLBAR (object);
	switch (property_id) {
		case BOXES_DISPLAY_TOOLBAR_TITLE:
		boxes_display_toolbar_set_title (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static Block7Data* block7_data_ref (Block7Data* _data7_) {
	g_atomic_int_inc (&_data7_->_ref_count_);
	return _data7_;
}


static void block7_data_unref (void * _userdata_) {
	Block7Data* _data7_;
	_data7_ = (Block7Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
		BoxesDisplayPage * self;
		self = _data7_->self;
		_g_object_unref0 (_data7_->app);
		_g_object_unref0 (self);
		g_slice_free (Block7Data, _data7_);
	}
}


static gboolean _____lambda24_ (BoxesDisplayPage* self) {
	gboolean result = FALSE;
	boxes_display_page_set_overlay_toolbar_visible (self, FALSE);
	self->priv->toolbar_hide_id = (guint) 0;
	result = FALSE;
	return result;
}


static gboolean ______lambda24__gsource_func (gpointer self) {
	gboolean result;
	result = _____lambda24_ (self);
	return result;
}


static gboolean __lambda23_ (Block7Data* _data7_, GdkEvent* event) {
	BoxesDisplayPage * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	BoxesApp* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp6_;
	GtkEventBox* _tmp18_;
	GtkWidget* _tmp19_ = NULL;
	self = _data7_->self;
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp1_ = _data7_->app;
	_tmp2_ = boxes_app_get_fullscreen (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		GdkEvent* _tmp4_;
		GdkEventType _tmp5_;
		_tmp4_ = event;
		_tmp5_ = _tmp4_->type;
		_tmp0_ = _tmp5_ == GDK_MOTION_NOTIFY;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp6_ = _tmp0_;
	if (_tmp6_) {
		GdkEvent* _tmp7_;
		GdkEventMotion _tmp8_;
		gdouble _tmp9_;
		gdouble y;
		gdouble _tmp10_;
		_tmp7_ = event;
		_tmp8_ = _tmp7_->motion;
		_tmp9_ = _tmp8_.y;
		y = _tmp9_;
		_tmp10_ = y;
		if (_tmp10_ == ((gdouble) 0)) {
			boxes_display_page_toolbar_event_stop (self);
			boxes_display_page_set_overlay_toolbar_visible (self, TRUE);
		} else {
			gboolean _tmp11_ = FALSE;
			gdouble _tmp12_;
			gboolean _tmp14_;
			_tmp12_ = y;
			if (_tmp12_ > ((gdouble) 5)) {
				guint _tmp13_;
				_tmp13_ = self->priv->toolbar_hide_id;
				_tmp11_ = _tmp13_ == ((guint) 0);
			} else {
				_tmp11_ = FALSE;
			}
			_tmp14_ = _tmp11_;
			if (_tmp14_) {
				BoxesApp* _tmp15_;
				guint _tmp16_;
				guint _tmp17_ = 0U;
				boxes_display_page_toolbar_event_stop (self);
				_tmp15_ = _data7_->app;
				_tmp16_ = _tmp15_->duration;
				_tmp17_ = g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp16_, ______lambda24__gsource_func, g_object_ref (self), g_object_unref);
				self->priv->toolbar_hide_id = _tmp17_;
			}
		}
	}
	_tmp18_ = self->priv->event_box;
	_tmp19_ = gtk_bin_get_child ((GtkBin*) _tmp18_);
	if (_tmp19_ != NULL) {
		GtkEventBox* _tmp20_;
		GtkWidget* _tmp21_ = NULL;
		GdkEvent* _tmp22_;
		_tmp20_ = self->priv->event_box;
		_tmp21_ = gtk_bin_get_child ((GtkBin*) _tmp20_);
		_tmp22_ = event;
		gtk_widget_event (_tmp21_, _tmp22_);
	}
	result = FALSE;
	return result;
}


static gboolean ___lambda23__gtk_widget_event (GtkWidget* _sender, GdkEvent* event, gpointer self) {
	gboolean result;
	result = __lambda23_ (self, event);
	return result;
}


static gboolean __lambda25_ (Block7Data* _data7_, GdkEventWindowState* event) {
	BoxesDisplayPage * self;
	gboolean result = FALSE;
	BoxesDisplayToolbar* _tmp0_;
	BoxesApp* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	self = _data7_->self;
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = self->priv->toolbar;
	_tmp1_ = _data7_->app;
	_tmp2_ = boxes_app_get_fullscreen (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, !_tmp3_);
	boxes_display_page_set_overlay_toolbar_visible (self, FALSE);
	result = FALSE;
	return result;
}


static gboolean ___lambda25__gtk_widget_window_state_event (GtkWidget* _sender, GdkEventWindowState* event, gpointer self) {
	gboolean result;
	result = __lambda25_ (self, event);
	return result;
}


BoxesDisplayPage* boxes_display_page_construct (GType object_type, BoxesApp* app) {
	BoxesDisplayPage * self = NULL;
	Block7Data* _data7_;
	BoxesApp* _tmp0_;
	BoxesApp* _tmp1_;
	BoxesApp* _tmp2_;
	BoxesApp* _tmp3_;
	GtkEventBox* _tmp4_;
	GtkEventBox* _tmp5_;
	GtkEventBox* _tmp6_;
	GtkEventBox* _tmp7_;
	GtkEventBox* _tmp8_;
	BoxesApp* _tmp9_;
	BoxesDisplayToolbar* _tmp10_;
	BoxesDisplayToolbar* _tmp11_;
	GtkBox* _tmp12_;
	GtkBox* _tmp13_;
	GtkBox* _tmp14_;
	BoxesDisplayToolbar* _tmp15_;
	GtkBox* _tmp16_;
	GtkEventBox* _tmp17_;
	GtkOverlay* _tmp18_;
	GtkOverlay* _tmp19_;
	BoxesApp* _tmp20_;
	GtkApplicationWindow* _tmp21_;
	GtkOverlay* _tmp22_;
	GtkOverlay* _tmp23_;
	GtkBox* _tmp24_;
	BoxesApp* _tmp25_;
	BoxesDisplayToolbar* _tmp26_;
	BoxesDisplayToolbar* _tmp27_;
	BoxesDisplayToolbar* _tmp28_;
	GtkOverlay* _tmp29_;
	BoxesDisplayToolbar* _tmp30_;
	GtkOverlay* _tmp31_;
	g_return_val_if_fail (app != NULL, NULL);
	_data7_ = g_slice_new0 (Block7Data);
	_data7_->_ref_count_ = 1;
	_tmp0_ = app;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_data7_->app = _tmp1_;
	self = (BoxesDisplayPage*) g_object_new (object_type, NULL);
	_data7_->self = g_object_ref (self);
	_tmp2_ = _data7_->app;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->priv->app);
	self->priv->app = _tmp3_;
	_tmp4_ = (GtkEventBox*) gtk_event_box_new ();
	_tmp5_ = g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->event_box);
	self->priv->event_box = _tmp5_;
	_tmp6_ = self->priv->event_box;
	gtk_widget_set_events ((GtkWidget*) _tmp6_, (gint) GDK_POINTER_MOTION_MASK);
	_tmp7_ = self->priv->event_box;
	gtk_event_box_set_above_child (_tmp7_, TRUE);
	_tmp8_ = self->priv->event_box;
	g_signal_connect_data ((GtkWidget*) _tmp8_, "event", (GCallback) ___lambda23__gtk_widget_event, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
	_tmp9_ = _data7_->app;
	_tmp10_ = boxes_display_toolbar_new (_tmp9_);
	_tmp11_ = g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->toolbar);
	self->priv->toolbar = _tmp11_;
	_tmp12_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	_tmp13_ = g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->box);
	self->priv->box = _tmp13_;
	_tmp14_ = self->priv->box;
	_tmp15_ = self->priv->toolbar;
	gtk_box_pack_start (_tmp14_, (GtkWidget*) _tmp15_, FALSE, FALSE, (guint) 0);
	_tmp16_ = self->priv->box;
	_tmp17_ = self->priv->event_box;
	gtk_box_pack_start (_tmp16_, (GtkWidget*) _tmp17_, TRUE, TRUE, (guint) 0);
	_tmp18_ = (GtkOverlay*) gtk_overlay_new ();
	_tmp19_ = g_object_ref_sink (_tmp18_);
	_g_object_unref0 (self->priv->overlay);
	self->priv->overlay = _tmp19_;
	_tmp20_ = _data7_->app;
	_tmp21_ = _tmp20_->window;
	g_signal_connect_data ((GtkWidget*) _tmp21_, "window-state-event", (GCallback) ___lambda25__gtk_widget_window_state_event, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
	_tmp22_ = self->priv->overlay;
	g_object_set ((GtkWidget*) _tmp22_, "margin", 0, NULL);
	_tmp23_ = self->priv->overlay;
	_tmp24_ = self->priv->box;
	gtk_container_add ((GtkContainer*) _tmp23_, (GtkWidget*) _tmp24_);
	_tmp25_ = _data7_->app;
	_tmp26_ = boxes_display_toolbar_new (_tmp25_);
	_tmp27_ = g_object_ref_sink (_tmp26_);
	_g_object_unref0 (self->priv->overlay_toolbar);
	self->priv->overlay_toolbar = _tmp27_;
	_tmp28_ = self->priv->overlay_toolbar;
	gtk_widget_set_valign ((GtkWidget*) _tmp28_, GTK_ALIGN_START);
	_tmp29_ = self->priv->overlay;
	_tmp30_ = self->priv->overlay_toolbar;
	gtk_overlay_add_overlay (_tmp29_, (GtkWidget*) _tmp30_);
	_tmp31_ = self->priv->overlay;
	gtk_widget_show_all ((GtkWidget*) _tmp31_);
	block7_data_unref (_data7_);
	_data7_ = NULL;
	return self;
}


BoxesDisplayPage* boxes_display_page_new (BoxesApp* app) {
	return boxes_display_page_construct (BOXES_TYPE_DISPLAY_PAGE, app);
}


void boxes_display_page_get_size (BoxesDisplayPage* self, gint* width, gint* height) {
	gint _vala_width = 0;
	gint _vala_height = 0;
	gint tb_height = 0;
	BoxesApp* _tmp0_;
	GtkApplicationWindow* _tmp1_;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	BoxesApp* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->app;
	_tmp1_ = _tmp0_->window;
	gtk_window_get_size ((GtkWindow*) _tmp1_, &_tmp2_, &_tmp3_);
	_vala_width = _tmp2_;
	_vala_height = _tmp3_;
	_tmp4_ = self->priv->app;
	_tmp5_ = boxes_app_get_fullscreen (_tmp4_);
	_tmp6_ = _tmp5_;
	if (!_tmp6_) {
		BoxesDisplayToolbar* _tmp7_;
		gint _tmp8_ = 0;
		gint _tmp9_;
		gint _tmp10_;
		_tmp7_ = self->priv->toolbar;
		gtk_widget_get_preferred_height ((GtkWidget*) _tmp7_, NULL, &_tmp8_);
		tb_height = _tmp8_;
		_tmp9_ = _vala_height;
		_tmp10_ = tb_height;
		_vala_height = _tmp9_ - _tmp10_;
	}
	if (width) {
		*width = _vala_width;
	}
	if (height) {
		*height = _vala_height;
	}
}


static void boxes_display_page_set_overlay_toolbar_visible (BoxesDisplayPage* self, gboolean visible) {
	BoxesDisplayToolbar* _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->overlay_toolbar;
	_tmp1_ = visible;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, _tmp1_);
}


static void boxes_display_page_toolbar_event_stop (BoxesDisplayPage* self) {
	guint _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->toolbar_hide_id;
	if (_tmp0_ != ((guint) 0)) {
		guint _tmp1_;
		_tmp1_ = self->priv->toolbar_hide_id;
		g_source_remove (_tmp1_);
	}
	self->priv->toolbar_hide_id = (guint) 0;
}


void boxes_display_page_show (BoxesDisplayPage* self) {
	BoxesApp* _tmp0_;
	GtkNotebook* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->app;
	_tmp1_ = _tmp0_->notebook;
	g_object_set (_tmp1_, "page", (gint) BOXES_APP_PAGE_DISPLAY, NULL);
}


static Block8Data* block8_data_ref (Block8Data* _data8_) {
	g_atomic_int_inc (&_data8_->_ref_count_);
	return _data8_;
}


static void block8_data_unref (void * _userdata_) {
	Block8Data* _data8_;
	_data8_ = (Block8Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
		BoxesDisplayPage * self;
		self = _data8_->self;
		_g_object_unref0 (_data8_->display);
		_g_object_unref0 (self);
		g_slice_free (Block8Data, _data8_);
	}
}


static gboolean __lambda26_ (BoxesDisplayPage* self, GdkEvent* event) {
	gboolean result = FALSE;
	GdkEvent* _tmp0_;
	GdkEventType _tmp1_;
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = event;
	_tmp1_ = _tmp0_->type;
	switch (_tmp1_) {
		case GDK_LEAVE_NOTIFY:
		{
			boxes_display_page_toolbar_event_stop (self);
			break;
		}
		case GDK_ENTER_NOTIFY:
		{
			boxes_display_page_toolbar_event_stop (self);
			break;
		}
		default:
		break;
	}
	result = FALSE;
	return result;
}


static gboolean ___lambda26__gtk_widget_event (GtkWidget* _sender, GdkEvent* event, gpointer self) {
	gboolean result;
	result = __lambda26_ (self, event);
	return result;
}


static void __lambda28_ (Block8Data* _data8_) {
	BoxesDisplayPage * self;
	GtkEventBox* _tmp0_;
	GdkWindow* _tmp1_ = NULL;
	GtkWidget* _tmp2_;
	GdkWindow* _tmp3_ = NULL;
	GdkCursor* _tmp4_;
	GdkCursor* _tmp5_;
	self = _data8_->self;
	_tmp0_ = self->priv->event_box;
	_tmp1_ = gtk_widget_get_window ((GtkWidget*) _tmp0_);
	_tmp2_ = _data8_->display;
	_tmp3_ = gtk_widget_get_window (_tmp2_);
	_tmp4_ = gdk_window_get_cursor (_tmp3_);
	_tmp5_ = _tmp4_;
	gdk_window_set_cursor (_tmp1_, _tmp5_);
}


static void ___lambda28__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda28_ (self);
}


static gboolean __lambda27_ (Block8Data* _data8_) {
	BoxesDisplayPage * self;
	gboolean result = FALSE;
	GtkWidget* _tmp0_;
	gulong _tmp1_;
	GtkWidget* _tmp2_;
	GdkWindow* _tmp3_ = NULL;
	gulong _tmp4_ = 0UL;
	self = _data8_->self;
	_tmp0_ = _data8_->display;
	_tmp1_ = _data8_->draw_id;
	g_signal_handler_disconnect ((GObject*) _tmp0_, _tmp1_);
	_tmp2_ = _data8_->display;
	_tmp3_ = gtk_widget_get_window (_tmp2_);
	_tmp4_ = g_signal_connect_data ((GObject*) _tmp3_, "notify::cursor", (GCallback) ___lambda28__g_object_notify, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0);
	self->priv->cursor_id = _tmp4_;
	result = FALSE;
	return result;
}


static gboolean ___lambda27__gtk_widget_draw (GtkWidget* _sender, cairo_t* cr, gpointer self) {
	gboolean result;
	result = __lambda27_ (self);
	return result;
}


void boxes_display_page_show_display (BoxesDisplayPage* self, BoxesMachine* machine, GtkWidget* display) {
	Block8Data* _data8_;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_ = NULL;
	GtkWidget* _tmp3_;
	BoxesDisplayToolbar* _tmp4_;
	BoxesDisplayToolbar* _tmp5_;
	BoxesMachine* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	GtkWidget* _tmp9_;
	GtkWidget* _tmp10_;
	gint _tmp11_ = 0;
	GtkEventBox* _tmp12_;
	GtkWidget* _tmp13_;
	GtkEventBox* _tmp14_;
	GtkWidget* _tmp15_;
	gulong _tmp16_ = 0UL;
	GtkWidget* _tmp17_;
	gulong _tmp18_ = 0UL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (machine != NULL);
	g_return_if_fail (display != NULL);
	_data8_ = g_slice_new0 (Block8Data);
	_data8_->_ref_count_ = 1;
	_data8_->self = g_object_ref (self);
	_tmp0_ = display;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_data8_->display = _tmp1_;
	_tmp2_ = boxes_display_page_remove_display (self);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (_tmp3_);
	boxes_display_page_set_overlay_toolbar_visible (self, FALSE);
	_tmp4_ = self->priv->overlay_toolbar;
	_tmp5_ = self->priv->toolbar;
	_tmp6_ = machine;
	_tmp7_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _tmp6_);
	_tmp8_ = _tmp7_;
	boxes_display_toolbar_set_title (_tmp5_, _tmp8_);
	boxes_display_toolbar_set_title (_tmp4_, _tmp8_);
	_tmp9_ = _data8_->display;
	_tmp10_ = _data8_->display;
	_tmp11_ = gtk_widget_get_events (_tmp10_);
	gtk_widget_set_events (_tmp9_, _tmp11_ & (~GDK_POINTER_MOTION_MASK));
	_tmp12_ = self->priv->event_box;
	_tmp13_ = _data8_->display;
	gtk_container_add ((GtkContainer*) _tmp12_, _tmp13_);
	_tmp14_ = self->priv->event_box;
	gtk_widget_show_all ((GtkWidget*) _tmp14_);
	_tmp15_ = _data8_->display;
	_tmp16_ = g_signal_connect_object (_tmp15_, "event", (GCallback) ___lambda26__gtk_widget_event, self, 0);
	self->priv->display_id = _tmp16_;
	_data8_->draw_id = (gulong) 0;
	_tmp17_ = _data8_->display;
	_tmp18_ = g_signal_connect_data (_tmp17_, "draw", (GCallback) ___lambda27__gtk_widget_draw, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0);
	_data8_->draw_id = _tmp18_;
	boxes_display_page_show (self);
	block8_data_unref (_data8_);
	_data8_ = NULL;
}


GtkWidget* boxes_display_page_remove_display (BoxesDisplayPage* self) {
	GtkWidget* result = NULL;
	GtkEventBox* _tmp0_;
	GtkWidget* _tmp1_ = NULL;
	GtkWidget* _tmp2_;
	GtkWidget* display;
	gulong _tmp3_;
	gulong _tmp6_;
	GtkWidget* _tmp10_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->event_box;
	_tmp1_ = gtk_bin_get_child ((GtkBin*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	display = _tmp2_;
	_tmp3_ = self->priv->display_id;
	if (_tmp3_ != ((gulong) 0)) {
		GtkWidget* _tmp4_;
		gulong _tmp5_;
		_tmp4_ = display;
		_tmp5_ = self->priv->display_id;
		g_signal_handler_disconnect ((GObject*) _tmp4_, _tmp5_);
		self->priv->display_id = (gulong) 0;
	}
	_tmp6_ = self->priv->cursor_id;
	if (_tmp6_ != ((gulong) 0)) {
		GtkWidget* _tmp7_;
		GdkWindow* _tmp8_ = NULL;
		gulong _tmp9_;
		_tmp7_ = display;
		_tmp8_ = gtk_widget_get_window (_tmp7_);
		_tmp9_ = self->priv->cursor_id;
		g_signal_handler_disconnect ((GObject*) _tmp8_, _tmp9_);
		self->priv->cursor_id = (gulong) 0;
	}
	_tmp10_ = display;
	if (_tmp10_ != NULL) {
		GtkEventBox* _tmp11_;
		GtkWidget* _tmp12_;
		_tmp11_ = self->priv->event_box;
		_tmp12_ = display;
		gtk_container_remove ((GtkContainer*) _tmp11_, _tmp12_);
	}
	result = display;
	return result;
}


GtkWidget* boxes_display_page_get_widget (BoxesDisplayPage* self) {
	GtkWidget* result;
	GtkOverlay* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->overlay;
	result = (GtkWidget*) _tmp0_;
	return result;
}


static void boxes_display_page_class_init (BoxesDisplayPageClass * klass) {
	boxes_display_page_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesDisplayPagePrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_display_page_get_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_display_page_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_DISPLAY_PAGE_WIDGET, g_param_spec_object ("widget", "widget", "widget", GTK_TYPE_WIDGET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void boxes_display_page_instance_init (BoxesDisplayPage * self) {
	self->priv = BOXES_DISPLAY_PAGE_GET_PRIVATE (self);
}


static void boxes_display_page_finalize (GObject* obj) {
	BoxesDisplayPage * self;
	self = BOXES_DISPLAY_PAGE (obj);
	boxes_display_page_toolbar_event_stop (self);
	_g_object_unref0 (self->priv->overlay);
	_g_object_unref0 (self->priv->app);
	_g_object_unref0 (self->priv->event_box);
	_g_object_unref0 (self->priv->box);
	_g_object_unref0 (self->priv->overlay_toolbar);
	_g_object_unref0 (self->priv->toolbar);
	G_OBJECT_CLASS (boxes_display_page_parent_class)->finalize (obj);
}


GType boxes_display_page_get_type (void) {
	static volatile gsize boxes_display_page_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_display_page_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesDisplayPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_display_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesDisplayPage), 0, (GInstanceInitFunc) boxes_display_page_instance_init, NULL };
		GType boxes_display_page_type_id;
		boxes_display_page_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesDisplayPage", &g_define_type_info, 0);
		g_once_init_leave (&boxes_display_page_type_id__volatile, boxes_display_page_type_id);
	}
	return boxes_display_page_type_id__volatile;
}


static void _vala_boxes_display_page_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesDisplayPage * self;
	self = BOXES_DISPLAY_PAGE (object);
	switch (property_id) {
		case BOXES_DISPLAY_PAGE_WIDGET:
		g_value_set_object (value, boxes_display_page_get_widget (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



