/* notificationbar.c generated by valac 0.17.1.6-d284, the Vala compiler
 * generated from notificationbar.vala, do not modify */

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

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


#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;
typedef struct _BoxesNotificationbarPrivate BoxesNotificationbarPrivate;

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

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIClass BoxesUIClass;

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

typedef struct _BoxesApp BoxesApp;
typedef struct _BoxesAppClass BoxesAppClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block39Data Block39Data;
typedef struct _BoxesUIPrivate BoxesUIPrivate;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())
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_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;
typedef struct _Block40Data Block40Data;

struct _BoxesNotificationbar {
	GObject parent_instance;
	BoxesNotificationbarPrivate * priv;
};

struct _BoxesNotificationbarClass {
	GObjectClass parent_class;
};

struct _BoxesNotificationbarPrivate {
	ClutterActor* _actor;
	BoxesApp* app;
	GtkInfoBar* info_bar;
	GtkLabel* message_label;
	GtkButton* ok_button;
	guint timeout_id;
	gulong response_id;
};

typedef void (*BoxesNotificationbarOKFunc) (void* user_data);
typedef void (*BoxesNotificationbarCancelFunc) (void* user_data);
struct _Block39Data {
	int _ref_count_;
	BoxesNotificationbar * self;
	BoxesNotificationbarOKFunc ok_func;
	gpointer ok_func_target;
	GDestroyNotify ok_func_target_destroy_notify;
	BoxesNotificationbarCancelFunc cancel_func;
	gpointer cancel_func_target;
	GDestroyNotify cancel_func_target_destroy_notify;
};

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 _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 _Block40Data {
	int _ref_count_;
	BoxesNotificationbar * self;
	gulong active_id;
};


static gpointer boxes_notificationbar_parent_class = NULL;

GType boxes_notificationbar_get_type (void) G_GNUC_CONST;
GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_app_get_type (void) G_GNUC_CONST;
#define BOXES_NOTIFICATIONBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbarPrivate))
enum  {
	BOXES_NOTIFICATIONBAR_DUMMY_PROPERTY,
	BOXES_NOTIFICATIONBAR_ACTOR
};
#define BOXES_NOTIFICATIONBAR_spacing 60.0f
BoxesNotificationbar* boxes_notificationbar_new (BoxesApp* app);
BoxesNotificationbar* boxes_notificationbar_construct (GType object_type, BoxesApp* app);
static void boxes_notificationbar_setup_action_notify (BoxesNotificationbar* self);
void boxes_notificationbar_display_for_action (BoxesNotificationbar* self, const gchar* message, const gchar* action_label, BoxesNotificationbarOKFunc action_func, void* action_func_target, GDestroyNotify action_func_target_destroy_notify, BoxesNotificationbarCancelFunc ignore_func, void* ignore_func_target, GDestroyNotify ignore_func_target_destroy_notify);
static void boxes_notificationbar_display (BoxesNotificationbar* self, const gchar* message, GtkMessageType message_type, const gchar* ok_label, BoxesNotificationbarOKFunc ok_func, void* ok_func_target, GDestroyNotify ok_func_target_destroy_notify, BoxesNotificationbarCancelFunc cancel_func, void* cancel_func_target, GDestroyNotify cancel_func_target_destroy_notify);
void boxes_notificationbar_display_error (BoxesNotificationbar* self, const gchar* message);
void boxes_notificationbar_cancel (BoxesNotificationbar* self);
static Block39Data* block39_data_ref (Block39Data* _data39_);
static void block39_data_unref (void * _userdata_);
static void boxes_notificationbar_add_timeout (BoxesNotificationbar* self);
static void __lambda82_ (Block39Data* _data39_, gint response);
static void boxes_notificationbar_hide (BoxesNotificationbar* self);
static void ___lambda82__gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self);
static void boxes_notificationbar_show (BoxesNotificationbar* self);
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
GType boxes_topbar_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 Block40Data* block40_data_ref (Block40Data* _data40_);
static void block40_data_unref (void * _userdata_);
static void ___lambda80_ (Block40Data* _data40_);
static void ____lambda80__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static gboolean __lambda81_ (BoxesNotificationbar* self);
static gboolean ___lambda81__gsource_func (gpointer self);
static void boxes_notificationbar_set_actor (BoxesNotificationbar* self, ClutterActor* value);
ClutterActor* boxes_notificationbar_get_actor (BoxesNotificationbar* self);
static void __lambda83_ (BoxesNotificationbar* self);
static void ___lambda83__clutter_animation_completed (ClutterAnimation* _sender, gpointer self);
static void boxes_notificationbar_finalize (GObject* obj);
static void _vala_boxes_notificationbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_notificationbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


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


BoxesNotificationbar* boxes_notificationbar_construct (GType object_type, BoxesApp* app) {
	BoxesNotificationbar * self = NULL;
	BoxesApp* _tmp0_;
	BoxesApp* _tmp1_;
	g_return_val_if_fail (app != NULL, NULL);
	self = (BoxesNotificationbar*) g_object_new (object_type, NULL);
	_tmp0_ = app;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->app);
	self->priv->app = _tmp1_;
	boxes_notificationbar_setup_action_notify (self);
	return self;
}


BoxesNotificationbar* boxes_notificationbar_new (BoxesApp* app) {
	return boxes_notificationbar_construct (BOXES_TYPE_NOTIFICATIONBAR, app);
}


void boxes_notificationbar_display_for_action (BoxesNotificationbar* self, const gchar* message, const gchar* action_label, BoxesNotificationbarOKFunc action_func, void* action_func_target, GDestroyNotify action_func_target_destroy_notify, BoxesNotificationbarCancelFunc ignore_func, void* ignore_func_target, GDestroyNotify ignore_func_target_destroy_notify) {
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	BoxesNotificationbarOKFunc _tmp2_;
	void* _tmp2__target;
	GDestroyNotify _tmp2__target_destroy_notify;
	BoxesNotificationbarCancelFunc _tmp3_;
	void* _tmp3__target;
	GDestroyNotify _tmp3__target_destroy_notify;
	g_return_if_fail (self != NULL);
	g_return_if_fail (message != NULL);
	g_return_if_fail (action_label != NULL);
	_tmp0_ = message;
	_tmp1_ = action_label;
	_tmp2_ = action_func;
	_tmp2__target = action_func_target;
	_tmp2__target_destroy_notify = action_func_target_destroy_notify;
	action_func_target_destroy_notify = NULL;
	_tmp3_ = ignore_func;
	_tmp3__target = ignore_func_target;
	_tmp3__target_destroy_notify = ignore_func_target_destroy_notify;
	ignore_func_target_destroy_notify = NULL;
	boxes_notificationbar_display (self, _tmp0_, GTK_MESSAGE_INFO, _tmp1_, _tmp2_, _tmp2__target, _tmp2__target_destroy_notify, _tmp3_, _tmp3__target, _tmp3__target_destroy_notify);
	(action_func_target_destroy_notify == NULL) ? NULL : (action_func_target_destroy_notify (action_func_target), NULL);
	action_func = NULL;
	action_func_target = NULL;
	action_func_target_destroy_notify = NULL;
	(ignore_func_target_destroy_notify == NULL) ? NULL : (ignore_func_target_destroy_notify (ignore_func_target), NULL);
	ignore_func = NULL;
	ignore_func_target = NULL;
	ignore_func_target_destroy_notify = NULL;
}


void boxes_notificationbar_display_error (BoxesNotificationbar* self, const gchar* message) {
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (message != NULL);
	_tmp0_ = message;
	boxes_notificationbar_display (self, _tmp0_, GTK_MESSAGE_ERROR, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
}


void boxes_notificationbar_cancel (BoxesNotificationbar* self) {
	GtkInfoBar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->info_bar;
	gtk_info_bar_response (_tmp0_, (gint) GTK_RESPONSE_CANCEL);
}


static Block39Data* block39_data_ref (Block39Data* _data39_) {
	g_atomic_int_inc (&_data39_->_ref_count_);
	return _data39_;
}


static void block39_data_unref (void * _userdata_) {
	Block39Data* _data39_;
	_data39_ = (Block39Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data39_->_ref_count_)) {
		BoxesNotificationbar * self;
		self = _data39_->self;
		(_data39_->ok_func_target_destroy_notify == NULL) ? NULL : (_data39_->ok_func_target_destroy_notify (_data39_->ok_func_target), NULL);
		_data39_->ok_func = NULL;
		_data39_->ok_func_target = NULL;
		_data39_->ok_func_target_destroy_notify = NULL;
		(_data39_->cancel_func_target_destroy_notify == NULL) ? NULL : (_data39_->cancel_func_target_destroy_notify (_data39_->cancel_func_target), NULL);
		_data39_->cancel_func = NULL;
		_data39_->cancel_func_target = NULL;
		_data39_->cancel_func_target_destroy_notify = NULL;
		_g_object_unref0 (self);
		g_slice_free (Block39Data, _data39_);
	}
}


static void __lambda82_ (Block39Data* _data39_, gint response) {
	BoxesNotificationbar * self;
	guint _tmp0_;
	GtkInfoBar* _tmp1_;
	gulong _tmp2_;
	gint _tmp3_;
	self = _data39_->self;
	boxes_notificationbar_hide (self);
	_tmp0_ = self->priv->timeout_id;
	g_source_remove (_tmp0_);
	_tmp1_ = self->priv->info_bar;
	_tmp2_ = self->priv->response_id;
	g_signal_handler_disconnect ((GObject*) _tmp1_, _tmp2_);
	self->priv->timeout_id = (guint) 0;
	self->priv->response_id = (gulong) 0;
	_tmp3_ = response;
	if (_tmp3_ == ((gint) GTK_RESPONSE_OK)) {
		BoxesNotificationbarOKFunc _tmp4_;
		void* _tmp4__target;
		_tmp4_ = _data39_->ok_func;
		_tmp4__target = _data39_->ok_func_target;
		if (_tmp4_ != NULL) {
			BoxesNotificationbarOKFunc _tmp5_;
			void* _tmp5__target;
			_tmp5_ = _data39_->ok_func;
			_tmp5__target = _data39_->ok_func_target;
			_tmp5_ (_tmp5__target);
		}
	} else {
		BoxesNotificationbarCancelFunc _tmp6_;
		void* _tmp6__target;
		_tmp6_ = _data39_->cancel_func;
		_tmp6__target = _data39_->cancel_func_target;
		if (_tmp6_ != NULL) {
			BoxesNotificationbarCancelFunc _tmp7_;
			void* _tmp7__target;
			_tmp7_ = _data39_->cancel_func;
			_tmp7__target = _data39_->cancel_func_target;
			_tmp7_ (_tmp7__target);
		}
	}
}


static void ___lambda82__gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self) {
	__lambda82_ (self, response_id);
}


static void boxes_notificationbar_display (BoxesNotificationbar* self, const gchar* message, GtkMessageType message_type, const gchar* ok_label, BoxesNotificationbarOKFunc ok_func, void* ok_func_target, GDestroyNotify ok_func_target_destroy_notify, BoxesNotificationbarCancelFunc cancel_func, void* cancel_func_target, GDestroyNotify cancel_func_target_destroy_notify) {
	Block39Data* _data39_;
	BoxesNotificationbarOKFunc _tmp0_;
	void* _tmp0__target;
	BoxesNotificationbarCancelFunc _tmp1_;
	void* _tmp1__target;
	const gchar* _tmp2_;
	GtkLabel* _tmp9_;
	const gchar* _tmp10_;
	GtkInfoBar* _tmp11_;
	GtkMessageType _tmp12_;
	guint _tmp13_;
	GtkInfoBar* _tmp17_;
	gulong _tmp18_ = 0UL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (message != NULL);
	_data39_ = g_slice_new0 (Block39Data);
	_data39_->_ref_count_ = 1;
	_data39_->self = g_object_ref (self);
	_tmp0_ = ok_func;
	_tmp0__target = ok_func_target;
	(_data39_->ok_func_target_destroy_notify == NULL) ? NULL : (_data39_->ok_func_target_destroy_notify (_data39_->ok_func_target), NULL);
	_data39_->ok_func = NULL;
	_data39_->ok_func_target = NULL;
	_data39_->ok_func_target_destroy_notify = NULL;
	_data39_->ok_func = _tmp0_;
	_data39_->ok_func_target = _tmp0__target;
	_data39_->ok_func_target_destroy_notify = ok_func_target_destroy_notify;
	_tmp1_ = cancel_func;
	_tmp1__target = cancel_func_target;
	(_data39_->cancel_func_target_destroy_notify == NULL) ? NULL : (_data39_->cancel_func_target_destroy_notify (_data39_->cancel_func_target), NULL);
	_data39_->cancel_func = NULL;
	_data39_->cancel_func_target = NULL;
	_data39_->cancel_func_target_destroy_notify = NULL;
	_data39_->cancel_func = _tmp1_;
	_data39_->cancel_func_target = _tmp1__target;
	_data39_->cancel_func_target_destroy_notify = cancel_func_target_destroy_notify;
	_tmp2_ = ok_label;
	if (_tmp2_ != NULL) {
		GtkButton* _tmp3_;
		const gchar* _tmp4_;
		GtkInfoBar* _tmp5_;
		GtkButton* _tmp6_;
		_tmp3_ = self->priv->ok_button;
		_tmp4_ = ok_label;
		gtk_button_set_label (_tmp3_, _tmp4_);
		_tmp5_ = self->priv->info_bar;
		gtk_box_set_spacing ((GtkBox*) _tmp5_, 120);
		_tmp6_ = self->priv->ok_button;
		gtk_widget_show ((GtkWidget*) _tmp6_);
	} else {
		GtkInfoBar* _tmp7_;
		GtkButton* _tmp8_;
		_tmp7_ = self->priv->info_bar;
		gtk_box_set_spacing ((GtkBox*) _tmp7_, 60);
		_tmp8_ = self->priv->ok_button;
		gtk_widget_hide ((GtkWidget*) _tmp8_);
	}
	_tmp9_ = self->priv->message_label;
	_tmp10_ = message;
	gtk_label_set_label (_tmp9_, _tmp10_);
	_tmp11_ = self->priv->info_bar;
	_tmp12_ = message_type;
	gtk_info_bar_set_message_type (_tmp11_, _tmp12_);
	_tmp13_ = self->priv->timeout_id;
	if (_tmp13_ != ((guint) 0)) {
		guint _tmp14_;
		GtkInfoBar* _tmp15_;
		gulong _tmp16_;
		_tmp14_ = self->priv->timeout_id;
		g_source_remove (_tmp14_);
		_tmp15_ = self->priv->info_bar;
		_tmp16_ = self->priv->response_id;
		g_signal_handler_disconnect ((GObject*) _tmp15_, _tmp16_);
	}
	boxes_notificationbar_add_timeout (self);
	_tmp17_ = self->priv->info_bar;
	_tmp18_ = g_signal_connect_data (_tmp17_, "response", (GCallback) ___lambda82__gtk_info_bar_response, block39_data_ref (_data39_), (GClosureNotify) block39_data_unref, 0);
	self->priv->response_id = _tmp18_;
	boxes_notificationbar_show (self);
	block39_data_unref (_data39_);
	_data39_ = NULL;
}


static Block40Data* block40_data_ref (Block40Data* _data40_) {
	g_atomic_int_inc (&_data40_->_ref_count_);
	return _data40_;
}


static void block40_data_unref (void * _userdata_) {
	Block40Data* _data40_;
	_data40_ = (Block40Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data40_->_ref_count_)) {
		BoxesNotificationbar * self;
		self = _data40_->self;
		_g_object_unref0 (self);
		g_slice_free (Block40Data, _data40_);
	}
}


static void ___lambda80_ (Block40Data* _data40_) {
	BoxesNotificationbar * self;
	BoxesApp* _tmp0_;
	GtkApplicationWindow* _tmp1_;
	gulong _tmp2_;
	self = _data40_->self;
	boxes_notificationbar_add_timeout (self);
	_tmp0_ = self->priv->app;
	_tmp1_ = _tmp0_->window;
	_tmp2_ = _data40_->active_id;
	g_signal_handler_disconnect ((GObject*) _tmp1_, _tmp2_);
}


static void ____lambda80__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	___lambda80_ (self);
}


static gboolean __lambda81_ (BoxesNotificationbar* self) {
	gboolean result = FALSE;
	GtkInfoBar* _tmp0_;
	_tmp0_ = self->priv->info_bar;
	gtk_info_bar_response (_tmp0_, (gint) GTK_RESPONSE_CANCEL);
	result = FALSE;
	return result;
}


static gboolean ___lambda81__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda81_ (self);
	return result;
}


static void boxes_notificationbar_add_timeout (BoxesNotificationbar* self) {
	BoxesApp* _tmp0_;
	GtkApplicationWindow* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_;
	guint _tmp7_ = 0U;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->app;
	_tmp1_ = _tmp0_->window;
	g_object_get ((GtkWindow*) _tmp1_, "is-active", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	if (!_tmp3_) {
		Block40Data* _data40_;
		BoxesApp* _tmp4_;
		GtkApplicationWindow* _tmp5_;
		gulong _tmp6_ = 0UL;
		_data40_ = g_slice_new0 (Block40Data);
		_data40_->_ref_count_ = 1;
		_data40_->self = g_object_ref (self);
		_data40_->active_id = (gulong) 0;
		_tmp4_ = self->priv->app;
		_tmp5_ = _tmp4_->window;
		_tmp6_ = g_signal_connect_data ((GObject*) _tmp5_, "notify::is-active", (GCallback) ____lambda80__g_object_notify, block40_data_ref (_data40_), (GClosureNotify) block40_data_unref, 0);
		_data40_->active_id = _tmp6_;
		block40_data_unref (_data40_);
		_data40_ = NULL;
		return;
	}
	_tmp7_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 6, ___lambda81__gsource_func, g_object_ref (self), g_object_unref);
	self->priv->timeout_id = _tmp7_;
}


static void boxes_notificationbar_setup_action_notify (BoxesNotificationbar* self) {
	GtkInfoBar* _tmp0_;
	GtkInfoBar* _tmp1_;
	GtkInfoBar* _tmp2_;
	GtkStyleContext* _tmp3_ = NULL;
	GtkInfoBar* _tmp4_;
	GtkLabel* _tmp5_;
	GtkLabel* _tmp6_;
	GtkInfoBar* _tmp7_;
	GtkWidget* _tmp8_ = NULL;
	GtkContainer* _tmp9_;
	GtkContainer* content_area;
	GtkLabel* _tmp10_;
	GtkButton* _tmp11_;
	GtkButton* _tmp12_;
	GtkInfoBar* _tmp13_;
	GtkButton* _tmp14_;
	GtkButton* _tmp15_;
	GtkImage* _tmp16_;
	GtkImage* _tmp17_;
	GtkImage* image;
	GtkButton* _tmp18_;
	GtkButton* _tmp19_;
	GtkButton* close_button;
	GtkInfoBar* _tmp20_;
	GtkInfoBar* _tmp21_;
	GtkWidget* _tmp22_ = NULL;
	GtkButtonBox* _tmp23_;
	GtkButtonBox* button_box;
	GtkInfoBar* _tmp24_;
	GtkInfoBar* _tmp25_;
	GtkClutterActor* _tmp26_;
	GtkClutterActor* _tmp27_;
	BoxesApp* _tmp28_;
	ClutterStage* _tmp29_;
	ClutterActor* _tmp30_;
	ClutterActor* _tmp31_;
	ClutterActor* _tmp32_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkInfoBar*) gtk_info_bar_new ();
	_tmp1_ = g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->info_bar);
	self->priv->info_bar = _tmp1_;
	_tmp2_ = self->priv->info_bar;
	_tmp3_ = gtk_widget_get_style_context ((GtkWidget*) _tmp2_);
	gtk_style_context_add_class (_tmp3_, "osd");
	_tmp4_ = self->priv->info_bar;
	g_object_set ((GtkWidget*) _tmp4_, "margin", 5, NULL);
	_tmp5_ = (GtkLabel*) gtk_label_new ("");
	_tmp6_ = g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->message_label);
	self->priv->message_label = _tmp6_;
	_tmp7_ = self->priv->info_bar;
	_tmp8_ = gtk_info_bar_get_content_area (_tmp7_);
	_tmp9_ = _g_object_ref0 (GTK_IS_CONTAINER (_tmp8_) ? ((GtkContainer*) _tmp8_) : NULL);
	content_area = _tmp9_;
	_tmp10_ = self->priv->message_label;
	gtk_container_add (content_area, (GtkWidget*) _tmp10_);
	_tmp11_ = (GtkButton*) gtk_button_new ();
	_tmp12_ = g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->ok_button);
	self->priv->ok_button = _tmp12_;
	_tmp13_ = self->priv->info_bar;
	_tmp14_ = self->priv->ok_button;
	gtk_info_bar_add_action_widget (_tmp13_, (GtkWidget*) _tmp14_, (gint) GTK_RESPONSE_OK);
	_tmp15_ = self->priv->ok_button;
	gtk_button_set_use_stock (_tmp15_, TRUE);
	_tmp16_ = (GtkImage*) gtk_image_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_BUTTON);
	_tmp17_ = g_object_ref_sink (_tmp16_);
	image = _tmp17_;
	_tmp18_ = (GtkButton*) gtk_button_new ();
	_tmp19_ = g_object_ref_sink (_tmp18_);
	close_button = _tmp19_;
	gtk_button_set_image (close_button, (GtkWidget*) image);
	_tmp20_ = self->priv->info_bar;
	gtk_info_bar_add_action_widget (_tmp20_, (GtkWidget*) close_button, (gint) GTK_RESPONSE_CANCEL);
	gtk_button_set_relief (close_button, GTK_RELIEF_NONE);
	gtk_widget_set_halign ((GtkWidget*) close_button, GTK_ALIGN_START);
	_tmp21_ = self->priv->info_bar;
	_tmp22_ = gtk_info_bar_get_action_area (_tmp21_);
	_tmp23_ = _g_object_ref0 (GTK_IS_BUTTON_BOX (_tmp22_) ? ((GtkButtonBox*) _tmp22_) : NULL);
	button_box = _tmp23_;
	gtk_orientable_set_orientation ((GtkOrientable*) button_box, GTK_ORIENTATION_HORIZONTAL);
	gtk_button_box_set_child_non_homogeneous (button_box, (GtkWidget*) close_button, TRUE);
	_tmp24_ = self->priv->info_bar;
	gtk_widget_show_all ((GtkWidget*) _tmp24_);
	_tmp25_ = self->priv->info_bar;
	_tmp26_ = (GtkClutterActor*) gtk_clutter_actor_new_with_contents ((GtkWidget*) _tmp25_);
	_tmp27_ = g_object_ref_sink (_tmp26_);
	boxes_notificationbar_set_actor (self, (ClutterActor*) _tmp27_);
	_g_object_unref0 (_tmp27_);
	_tmp28_ = self->priv->app;
	_tmp29_ = _tmp28_->stage;
	_tmp30_ = self->priv->_actor;
	clutter_container_add ((ClutterContainer*) _tmp29_, _tmp30_, NULL);
	_tmp31_ = self->priv->_actor;
	clutter_actor_hide (_tmp31_);
	_tmp32_ = self->priv->_actor;
	g_object_set (_tmp32_, "scale-y", (gdouble) 0.f, NULL);
	_g_object_unref0 (button_box);
	_g_object_unref0 (close_button);
	_g_object_unref0 (image);
	_g_object_unref0 (content_area);
}


static void boxes_notificationbar_show (BoxesNotificationbar* self) {
	BoxesApp* _tmp0_;
	ClutterStage* _tmp1_;
	ClutterActor* _tmp2_;
	ClutterActor* _tmp3_;
	ClutterActor* _tmp4_;
	ClutterActor* _tmp5_;
	BoxesApp* _tmp6_;
	guint _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->app;
	_tmp1_ = _tmp0_->stage;
	_tmp2_ = self->priv->_actor;
	clutter_actor_set_child_above_sibling ((ClutterActor*) _tmp1_, _tmp2_, NULL);
	_tmp3_ = self->priv->_actor;
	clutter_actor_show (_tmp3_);
	_tmp4_ = self->priv->_actor;
	clutter_actor_queue_redraw (_tmp4_);
	_tmp5_ = self->priv->_actor;
	_tmp6_ = self->priv->app;
	_tmp7_ = _tmp6_->duration;
	clutter_actor_animate (_tmp5_, (gulong) CLUTTER_LINEAR, _tmp7_, "scale-y", 1.f, NULL);
}


static void __lambda83_ (BoxesNotificationbar* self) {
	ClutterActor* _tmp0_;
	_tmp0_ = self->priv->_actor;
	clutter_actor_hide (_tmp0_);
}


static void ___lambda83__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) {
	__lambda83_ (self);
}


static void boxes_notificationbar_hide (BoxesNotificationbar* self) {
	ClutterActor* _tmp0_;
	BoxesApp* _tmp1_;
	guint _tmp2_;
	ClutterAnimation* _tmp3_ = NULL;
	ClutterAnimation* _tmp4_;
	ClutterAnimation* animation;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_actor;
	_tmp1_ = self->priv->app;
	_tmp2_ = _tmp1_->duration;
	_tmp3_ = clutter_actor_animate (_tmp0_, (gulong) CLUTTER_LINEAR, _tmp2_, "scale-y", 0.f, NULL);
	_tmp4_ = _g_object_ref0 (_tmp3_);
	animation = _tmp4_;
	g_signal_connect_object (animation, "completed", (GCallback) ___lambda83__clutter_animation_completed, self, 0);
	_g_object_unref0 (animation);
}


ClutterActor* boxes_notificationbar_get_actor (BoxesNotificationbar* self) {
	ClutterActor* result;
	ClutterActor* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_actor;
	result = _tmp0_;
	return result;
}


static void boxes_notificationbar_set_actor (BoxesNotificationbar* self, ClutterActor* value) {
	ClutterActor* _tmp0_;
	ClutterActor* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_actor);
	self->priv->_actor = _tmp1_;
	g_object_notify ((GObject *) self, "actor");
}


static void boxes_notificationbar_class_init (BoxesNotificationbarClass * klass) {
	boxes_notificationbar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesNotificationbarPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_notificationbar_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_notificationbar_set_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_notificationbar_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_NOTIFICATIONBAR_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_notificationbar_instance_init (BoxesNotificationbar * self) {
	self->priv = BOXES_NOTIFICATIONBAR_GET_PRIVATE (self);
}


static void boxes_notificationbar_finalize (GObject* obj) {
	BoxesNotificationbar * self;
	self = BOXES_NOTIFICATIONBAR (obj);
	_g_object_unref0 (self->priv->_actor);
	_g_object_unref0 (self->priv->app);
	_g_object_unref0 (self->priv->info_bar);
	_g_object_unref0 (self->priv->message_label);
	_g_object_unref0 (self->priv->ok_button);
	G_OBJECT_CLASS (boxes_notificationbar_parent_class)->finalize (obj);
}


GType boxes_notificationbar_get_type (void) {
	static volatile gsize boxes_notificationbar_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_notificationbar_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesNotificationbarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_notificationbar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesNotificationbar), 0, (GInstanceInitFunc) boxes_notificationbar_instance_init, NULL };
		GType boxes_notificationbar_type_id;
		boxes_notificationbar_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesNotificationbar", &g_define_type_info, 0);
		g_once_init_leave (&boxes_notificationbar_type_id__volatile, boxes_notificationbar_type_id);
	}
	return boxes_notificationbar_type_id__volatile;
}


static void _vala_boxes_notificationbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesNotificationbar * self;
	self = BOXES_NOTIFICATIONBAR (object);
	switch (property_id) {
		case BOXES_NOTIFICATIONBAR_ACTOR:
		g_value_set_object (value, boxes_notificationbar_get_actor (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_boxes_notificationbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesNotificationbar * self;
	self = BOXES_NOTIFICATIONBAR (object);
	switch (property_id) {
		case BOXES_NOTIFICATIONBAR_ACTOR:
		boxes_notificationbar_set_actor (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



