/* notificationbar.c generated by valac 0.17.5.2-8558, 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-gtk/clutter-gtk.h>
#include <clutter/clutter.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.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_REVEALER (boxes_revealer_get_type ())
#define BOXES_REVEALER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_REVEALER, BoxesRevealer))
#define BOXES_REVEALER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_REVEALER, BoxesRevealerClass))
#define BOXES_IS_REVEALER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_REVEALER))
#define BOXES_IS_REVEALER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_REVEALER))
#define BOXES_REVEALER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_REVEALER, BoxesRevealerClass))

typedef struct _BoxesRevealer BoxesRevealer;
typedef struct _BoxesRevealerClass BoxesRevealerClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block28Data Block28Data;

#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 _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_SEARCHBAR (boxes_searchbar_get_type ())
#define BOXES_SEARCHBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SEARCHBAR, BoxesSearchbar))
#define BOXES_SEARCHBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SEARCHBAR, BoxesSearchbarClass))
#define BOXES_IS_SEARCHBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SEARCHBAR))
#define BOXES_IS_SEARCHBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SEARCHBAR))
#define BOXES_SEARCHBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SEARCHBAR, BoxesSearchbarClass))

typedef struct _BoxesSearchbar BoxesSearchbar;
typedef struct _BoxesSearchbarClass BoxesSearchbarClass;

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

#define BOXES_TYPE_COLLECTION_FILTER (boxes_collection_filter_get_type ())
#define BOXES_COLLECTION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilter))
#define BOXES_COLLECTION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilterClass))
#define BOXES_IS_COLLECTION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_FILTER))
#define BOXES_IS_COLLECTION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_FILTER))
#define BOXES_COLLECTION_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilterClass))

typedef struct _BoxesCollectionFilter BoxesCollectionFilter;
typedef struct _BoxesCollectionFilterClass BoxesCollectionFilterClass;

#define BOXES_TYPE_COLLECTION_VIEW (boxes_collection_view_get_type ())
#define BOXES_COLLECTION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionView))
#define BOXES_COLLECTION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionViewClass))
#define BOXES_IS_COLLECTION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_VIEW))
#define BOXES_IS_COLLECTION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_VIEW))
#define BOXES_COLLECTION_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionViewClass))

typedef struct _BoxesCollectionView BoxesCollectionView;
typedef struct _BoxesCollectionViewClass BoxesCollectionViewClass;
typedef struct _Block29Data Block29Data;

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

struct _BoxesNotificationbarClass {
	GObjectClass parent_class;
};

struct _BoxesNotificationbarPrivate {
	GtkClutterActor* gtk_actor;
	BoxesRevealer* revealer;
	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 _Block28Data {
	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;
	ClutterBinLayout* stage_bin;
	ClutterActor* overlay_bin_actor;
	ClutterBinLayout* overlay_bin;
	BoxesCollectionItem* current_item;
	BoxesSearchbar* searchbar;
	BoxesTopbar* topbar;
	BoxesNotificationbar* notificationbar;
	BoxesRevealer* sidebar_revealer;
	BoxesRevealer* searchbar_revealer;
	BoxesSidebar* sidebar;
	BoxesSelectionbar* selectionbar;
	guint duration;
	GSettings* settings;
	BoxesWizard* wizard;
	BoxesProperties* properties;
	BoxesDisplayPage* display_page;
	BoxesCollection* collection;
	BoxesCollectionFilter* filter;
	GSimpleAction* action_properties;
	GSimpleAction* action_fullscreen;
	GSimpleAction* action_shutdown;
	BoxesCollectionView* view;
};

struct _BoxesAppClass {
	BoxesUIClass parent_class;
};

struct _Block29Data {
	int _ref_count_;
	BoxesNotificationbar * self;
	gulong active_id;
};


static gpointer boxes_notificationbar_parent_class = NULL;
extern BoxesApp* boxes_app_app;

GType boxes_notificationbar_get_type (void) G_GNUC_CONST;
GType boxes_revealer_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
};
BoxesNotificationbar* boxes_notificationbar_new (void);
BoxesNotificationbar* boxes_notificationbar_construct (GType object_type);
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 Block28Data* block28_data_ref (Block28Data* _data28_);
static void block28_data_unref (void * _userdata_);
static void boxes_notificationbar_add_timeout (BoxesNotificationbar* self);
static void __lambda55_ (Block28Data* _data28_, gint response);
static void boxes_notificationbar_hide (BoxesNotificationbar* self);
static void ___lambda55__gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self);
static void boxes_notificationbar_show (BoxesNotificationbar* self);
GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_app_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_searchbar_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;
GType boxes_collection_filter_get_type (void) G_GNUC_CONST;
GType boxes_collection_view_get_type (void) G_GNUC_CONST;
static Block29Data* block29_data_ref (Block29Data* _data29_);
static void block29_data_unref (void * _userdata_);
static void ___lambda53_ (Block29Data* _data29_);
static void ____lambda53__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static gboolean __lambda54_ (BoxesNotificationbar* self);
static gboolean ___lambda54__gsource_func (gpointer self);
BoxesRevealer* boxes_revealer_new (gboolean horizontal);
BoxesRevealer* boxes_revealer_construct (GType object_type, gboolean horizontal);
void boxes_revealer_unreveal (BoxesRevealer* self);
void boxes_revealer_reveal (BoxesRevealer* self);
ClutterActor* boxes_notificationbar_get_actor (BoxesNotificationbar* self);
static void boxes_notificationbar_finalize (GObject* obj);
static void _vala_boxes_notificationbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


BoxesNotificationbar* boxes_notificationbar_construct (GType object_type) {
	BoxesNotificationbar * self = NULL;
	self = (BoxesNotificationbar*) g_object_new (object_type, NULL);
	boxes_notificationbar_setup_action_notify (self);
	return self;
}


BoxesNotificationbar* boxes_notificationbar_new (void) {
	return boxes_notificationbar_construct (BOXES_TYPE_NOTIFICATIONBAR);
}


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 Block28Data* block28_data_ref (Block28Data* _data28_) {
	g_atomic_int_inc (&_data28_->_ref_count_);
	return _data28_;
}


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


static void __lambda55_ (Block28Data* _data28_, gint response) {
	BoxesNotificationbar * self;
	guint _tmp0_;
	GtkInfoBar* _tmp1_;
	gulong _tmp2_;
	gint _tmp3_;
	self = _data28_->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_ = _data28_->ok_func;
		_tmp4__target = _data28_->ok_func_target;
		if (_tmp4_ != NULL) {
			BoxesNotificationbarOKFunc _tmp5_;
			void* _tmp5__target;
			_tmp5_ = _data28_->ok_func;
			_tmp5__target = _data28_->ok_func_target;
			_tmp5_ (_tmp5__target);
		}
	} else {
		BoxesNotificationbarCancelFunc _tmp6_;
		void* _tmp6__target;
		_tmp6_ = _data28_->cancel_func;
		_tmp6__target = _data28_->cancel_func_target;
		if (_tmp6_ != NULL) {
			BoxesNotificationbarCancelFunc _tmp7_;
			void* _tmp7__target;
			_tmp7_ = _data28_->cancel_func;
			_tmp7__target = _data28_->cancel_func_target;
			_tmp7_ (_tmp7__target);
		}
	}
}


static void ___lambda55__gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self) {
	__lambda55_ (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) {
	Block28Data* _data28_;
	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);
	_data28_ = g_slice_new0 (Block28Data);
	_data28_->_ref_count_ = 1;
	_data28_->self = g_object_ref (self);
	_tmp0_ = ok_func;
	_tmp0__target = ok_func_target;
	(_data28_->ok_func_target_destroy_notify == NULL) ? NULL : (_data28_->ok_func_target_destroy_notify (_data28_->ok_func_target), NULL);
	_data28_->ok_func = NULL;
	_data28_->ok_func_target = NULL;
	_data28_->ok_func_target_destroy_notify = NULL;
	_data28_->ok_func = _tmp0_;
	_data28_->ok_func_target = _tmp0__target;
	_data28_->ok_func_target_destroy_notify = ok_func_target_destroy_notify;
	_tmp1_ = cancel_func;
	_tmp1__target = cancel_func_target;
	(_data28_->cancel_func_target_destroy_notify == NULL) ? NULL : (_data28_->cancel_func_target_destroy_notify (_data28_->cancel_func_target), NULL);
	_data28_->cancel_func = NULL;
	_data28_->cancel_func_target = NULL;
	_data28_->cancel_func_target_destroy_notify = NULL;
	_data28_->cancel_func = _tmp1_;
	_data28_->cancel_func_target = _tmp1__target;
	_data28_->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) ___lambda55__gtk_info_bar_response, block28_data_ref (_data28_), (GClosureNotify) block28_data_unref, 0);
	self->priv->response_id = _tmp18_;
	boxes_notificationbar_show (self);
	block28_data_unref (_data28_);
	_data28_ = NULL;
}


static Block29Data* block29_data_ref (Block29Data* _data29_) {
	g_atomic_int_inc (&_data29_->_ref_count_);
	return _data29_;
}


static void block29_data_unref (void * _userdata_) {
	Block29Data* _data29_;
	_data29_ = (Block29Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data29_->_ref_count_)) {
		BoxesNotificationbar * self;
		self = _data29_->self;
		_g_object_unref0 (self);
		g_slice_free (Block29Data, _data29_);
	}
}


static void ___lambda53_ (Block29Data* _data29_) {
	BoxesNotificationbar * self;
	BoxesApp* _tmp0_;
	GtkApplicationWindow* _tmp1_;
	gulong _tmp2_;
	self = _data29_->self;
	boxes_notificationbar_add_timeout (self);
	_tmp0_ = boxes_app_app;
	_tmp1_ = _tmp0_->window;
	_tmp2_ = _data29_->active_id;
	g_signal_handler_disconnect ((GObject*) _tmp1_, _tmp2_);
}


static void ____lambda53__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	___lambda53_ (self);
}


static gboolean __lambda54_ (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 ___lambda54__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda54_ (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_ = boxes_app_app;
	_tmp1_ = _tmp0_->window;
	g_object_get ((GtkWindow*) _tmp1_, "is-active", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	if (!_tmp3_) {
		Block29Data* _data29_;
		BoxesApp* _tmp4_;
		GtkApplicationWindow* _tmp5_;
		gulong _tmp6_ = 0UL;
		_data29_ = g_slice_new0 (Block29Data);
		_data29_->_ref_count_ = 1;
		_data29_->self = g_object_ref (self);
		_data29_->active_id = (gulong) 0;
		_tmp4_ = boxes_app_app;
		_tmp5_ = _tmp4_->window;
		_tmp6_ = g_signal_connect_data ((GObject*) _tmp5_, "notify::is-active", (GCallback) ____lambda53__g_object_notify, block29_data_ref (_data29_), (GClosureNotify) block29_data_unref, 0);
		_data29_->active_id = _tmp6_;
		block29_data_unref (_data29_);
		_data29_ = NULL;
		return;
	}
	_tmp7_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 6, ___lambda54__gsource_func, g_object_ref (self), g_object_unref);
	self->priv->timeout_id = _tmp7_;
}


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


static void boxes_notificationbar_setup_action_notify (BoxesNotificationbar* self) {
	BoxesRevealer* _tmp0_;
	BoxesRevealer* _tmp1_;
	BoxesRevealer* _tmp2_;
	GtkInfoBar* _tmp3_;
	GtkLabel* _tmp4_;
	GtkInfoBar* _tmp5_;
	GtkWidget* _tmp6_ = NULL;
	GtkContainer* _tmp7_;
	GtkContainer* content_area;
	GtkLabel* _tmp8_;
	GtkButton* _tmp9_;
	GtkInfoBar* _tmp10_;
	GtkButton* _tmp11_;
	GtkButton* _tmp12_;
	GtkImage* _tmp13_;
	GtkImage* image;
	GtkButton* _tmp14_;
	GtkButton* close_button;
	GtkInfoBar* _tmp15_;
	GtkInfoBar* _tmp16_;
	GtkWidget* _tmp17_ = NULL;
	GtkButtonBox* _tmp18_;
	GtkButtonBox* button_box;
	GtkInfoBar* _tmp19_;
	GtkInfoBar* _tmp20_;
	GtkClutterActor* _tmp21_;
	GtkClutterActor* _tmp22_;
	GtkWidget* _tmp23_ = NULL;
	GtkStyleContext* _tmp24_ = NULL;
	GtkClutterActor* _tmp25_;
	BoxesRevealer* _tmp26_;
	GtkClutterActor* _tmp27_;
	g_return_if_fail (self != NULL);
	_tmp0_ = boxes_revealer_new (TRUE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->revealer);
	self->priv->revealer = _tmp0_;
	_tmp1_ = self->priv->revealer;
	boxes_revealer_unreveal (_tmp1_);
	_tmp2_ = self->priv->revealer;
	clutter_actor_set_name ((ClutterActor*) _tmp2_, "notificationbar-revealer");
	_tmp3_ = (GtkInfoBar*) gtk_info_bar_new ();
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->info_bar);
	self->priv->info_bar = _tmp3_;
	_tmp4_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->message_label);
	self->priv->message_label = _tmp4_;
	_tmp5_ = self->priv->info_bar;
	_tmp6_ = gtk_info_bar_get_content_area (_tmp5_);
	_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, GTK_TYPE_CONTAINER) ? ((GtkContainer*) _tmp6_) : NULL);
	content_area = _tmp7_;
	_tmp8_ = self->priv->message_label;
	gtk_container_add (content_area, (GtkWidget*) _tmp8_);
	_tmp9_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->ok_button);
	self->priv->ok_button = _tmp9_;
	_tmp10_ = self->priv->info_bar;
	_tmp11_ = self->priv->ok_button;
	gtk_info_bar_add_action_widget (_tmp10_, (GtkWidget*) _tmp11_, (gint) GTK_RESPONSE_OK);
	_tmp12_ = self->priv->ok_button;
	gtk_button_set_use_stock (_tmp12_, TRUE);
	_tmp13_ = (GtkImage*) gtk_image_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_BUTTON);
	g_object_ref_sink (_tmp13_);
	image = _tmp13_;
	_tmp14_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp14_);
	close_button = _tmp14_;
	gtk_button_set_image (close_button, (GtkWidget*) image);
	_tmp15_ = self->priv->info_bar;
	gtk_info_bar_add_action_widget (_tmp15_, (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);
	_tmp16_ = self->priv->info_bar;
	_tmp17_ = gtk_info_bar_get_action_area (_tmp16_);
	_tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, GTK_TYPE_BUTTON_BOX) ? ((GtkButtonBox*) _tmp17_) : NULL);
	button_box = _tmp18_;
	gtk_orientable_set_orientation ((GtkOrientable*) button_box, GTK_ORIENTATION_HORIZONTAL);
	gtk_button_box_set_child_non_homogeneous (button_box, (GtkWidget*) close_button, TRUE);
	_tmp19_ = self->priv->info_bar;
	gtk_widget_show_all ((GtkWidget*) _tmp19_);
	_tmp20_ = self->priv->info_bar;
	_tmp21_ = (GtkClutterActor*) gtk_clutter_actor_new_with_contents ((GtkWidget*) _tmp20_);
	g_object_ref_sink (_tmp21_);
	_g_object_unref0 (self->priv->gtk_actor);
	self->priv->gtk_actor = _tmp21_;
	_tmp22_ = self->priv->gtk_actor;
	_tmp23_ = gtk_clutter_actor_get_widget (_tmp22_);
	_tmp24_ = gtk_widget_get_style_context (_tmp23_);
	gtk_style_context_add_class (_tmp24_, "notificationbar");
	_tmp25_ = self->priv->gtk_actor;
	clutter_actor_set_name ((ClutterActor*) _tmp25_, "notificationbar");
	_tmp26_ = self->priv->revealer;
	_tmp27_ = self->priv->gtk_actor;
	clutter_container_add ((ClutterContainer*) _tmp26_, (ClutterActor*) _tmp27_, 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) {
	BoxesRevealer* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->revealer;
	boxes_revealer_reveal (_tmp0_);
}


static void boxes_notificationbar_hide (BoxesNotificationbar* self) {
	BoxesRevealer* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->revealer;
	boxes_revealer_unreveal (_tmp0_);
}


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


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)->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 = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbar);
	_g_object_unref0 (self->priv->gtk_actor);
	_g_object_unref0 (self->priv->revealer);
	_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 = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbar);
	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;
	}
}



