/* collection-box.c generated by valac 0.35.5, the Vala compiler
 * generated from collection-box.vala, do not modify */

/* This file is part of GNOME Games. License: GPLv3*/

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <gdk/gdk.h>


#define GAMES_TYPE_COLLECTION_BOX (games_collection_box_get_type ())
#define GAMES_COLLECTION_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_COLLECTION_BOX, GamesCollectionBox))
#define GAMES_COLLECTION_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_COLLECTION_BOX, GamesCollectionBoxClass))
#define GAMES_IS_COLLECTION_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_COLLECTION_BOX))
#define GAMES_IS_COLLECTION_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_COLLECTION_BOX))
#define GAMES_COLLECTION_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_COLLECTION_BOX, GamesCollectionBoxClass))

typedef struct _GamesCollectionBox GamesCollectionBox;
typedef struct _GamesCollectionBoxClass GamesCollectionBoxClass;
typedef struct _GamesCollectionBoxPrivate GamesCollectionBoxPrivate;

#define GAMES_TYPE_SEARCH_BAR (games_search_bar_get_type ())
#define GAMES_SEARCH_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_SEARCH_BAR, GamesSearchBar))
#define GAMES_SEARCH_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_SEARCH_BAR, GamesSearchBarClass))
#define GAMES_IS_SEARCH_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_SEARCH_BAR))
#define GAMES_IS_SEARCH_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_SEARCH_BAR))
#define GAMES_SEARCH_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_SEARCH_BAR, GamesSearchBarClass))

typedef struct _GamesSearchBar GamesSearchBar;
typedef struct _GamesSearchBarClass GamesSearchBarClass;

#define GAMES_TYPE_COLLECTION_ICON_VIEW (games_collection_icon_view_get_type ())
#define GAMES_COLLECTION_ICON_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_COLLECTION_ICON_VIEW, GamesCollectionIconView))
#define GAMES_COLLECTION_ICON_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_COLLECTION_ICON_VIEW, GamesCollectionIconViewClass))
#define GAMES_IS_COLLECTION_ICON_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_COLLECTION_ICON_VIEW))
#define GAMES_IS_COLLECTION_ICON_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_COLLECTION_ICON_VIEW))
#define GAMES_COLLECTION_ICON_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_COLLECTION_ICON_VIEW, GamesCollectionIconViewClass))

typedef struct _GamesCollectionIconView GamesCollectionIconView;
typedef struct _GamesCollectionIconViewClass GamesCollectionIconViewClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GAMES_TYPE_GAME (games_game_get_type ())
#define GAMES_GAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_GAME, GamesGame))
#define GAMES_IS_GAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_GAME))
#define GAMES_GAME_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_GAME, GamesGameIface))

typedef struct _GamesGame GamesGame;
typedef struct _GamesGameIface GamesGameIface;

#define GAMES_TYPE_ICON (games_icon_get_type ())
#define GAMES_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_ICON, GamesIcon))
#define GAMES_IS_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_ICON))
#define GAMES_ICON_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_ICON, GamesIconIface))

typedef struct _GamesIcon GamesIcon;
typedef struct _GamesIconIface GamesIconIface;

#define GAMES_TYPE_COVER (games_cover_get_type ())
#define GAMES_COVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_COVER, GamesCover))
#define GAMES_IS_COVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_COVER))
#define GAMES_COVER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_COVER, GamesCoverIface))

typedef struct _GamesCover GamesCover;
typedef struct _GamesCoverIface GamesCoverIface;

#define GAMES_TYPE_RUNNER (games_runner_get_type ())
#define GAMES_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_RUNNER, GamesRunner))
#define GAMES_IS_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_RUNNER))
#define GAMES_RUNNER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_RUNNER, GamesRunnerIface))

typedef struct _GamesRunner GamesRunner;
typedef struct _GamesRunnerIface GamesRunnerIface;

#define GAMES_TYPE_MEDIA_SET (games_media_set_get_type ())
#define GAMES_MEDIA_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_MEDIA_SET, GamesMediaSet))
#define GAMES_MEDIA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_MEDIA_SET, GamesMediaSetClass))
#define GAMES_IS_MEDIA_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_MEDIA_SET))
#define GAMES_IS_MEDIA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_MEDIA_SET))
#define GAMES_MEDIA_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_MEDIA_SET, GamesMediaSetClass))

typedef struct _GamesMediaSet GamesMediaSet;
typedef struct _GamesMediaSetClass GamesMediaSetClass;
enum  {
	GAMES_COLLECTION_BOX_GAME_ACTIVATED_SIGNAL,
	GAMES_COLLECTION_BOX_LAST_SIGNAL
};
static guint games_collection_box_signals[GAMES_COLLECTION_BOX_LAST_SIGNAL] = {0};

struct _GamesCollectionBox {
	GtkBox parent_instance;
	GamesCollectionBoxPrivate * priv;
};

struct _GamesCollectionBoxClass {
	GtkBoxClass parent_class;
};

struct _GamesCollectionBoxPrivate {
	GListModel* _collection;
	gboolean _search_mode;
	gboolean _loading_notification;
	GamesSearchBar* search_bar;
	GtkRevealer* loading_notification_revealer;
	GamesCollectionIconView* icon_view;
	GBinding* collection_binding;
	GBinding* search_binding;
	GBinding* loading_notification_binding;
};

struct _GamesIconIface {
	GTypeInterface parent_iface;
	GIcon* (*get_icon) (GamesIcon* self);
};

struct _GamesCoverIface {
	GTypeInterface parent_iface;
	GIcon* (*get_cover) (GamesCover* self);
};

struct _GamesRunnerIface {
	GTypeInterface parent_iface;
	gboolean (*check_is_valid) (GamesRunner* self, gchar* * error_message, GError** error);
	GtkWidget* (*get_display) (GamesRunner* self);
	void (*start) (GamesRunner* self, GError** error);
	void (*resume) (GamesRunner* self, GError** error);
	void (*pause) (GamesRunner* self);
	void (*stop) (GamesRunner* self);
	gboolean (*get_can_fullscreen) (GamesRunner* self);
	gboolean (*get_can_quit_safely) (GamesRunner* self);
	gboolean (*get_can_resume) (GamesRunner* self);
	GamesMediaSet* (*get_media_set) (GamesRunner* self);
};

struct _GamesGameIface {
	GTypeInterface parent_iface;
	GamesIcon* (*get_icon) (GamesGame* self);
	GamesCover* (*get_cover) (GamesGame* self);
	GamesRunner* (*get_runner) (GamesGame* self, GError** error);
	const gchar* (*get_name) (GamesGame* self);
};


static gpointer games_collection_box_parent_class = NULL;

GType games_collection_box_get_type (void) G_GNUC_CONST;
GType games_search_bar_get_type (void) G_GNUC_CONST;
GType games_collection_icon_view_get_type (void) G_GNUC_CONST;
#define GAMES_COLLECTION_BOX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GAMES_TYPE_COLLECTION_BOX, GamesCollectionBoxPrivate))
enum  {
	GAMES_COLLECTION_BOX_DUMMY_PROPERTY,
	GAMES_COLLECTION_BOX_COLLECTION,
	GAMES_COLLECTION_BOX_SEARCH_MODE,
	GAMES_COLLECTION_BOX_LOADING_NOTIFICATION
};
GamesCollectionBox* games_collection_box_new (GListStore* collection);
GamesCollectionBox* games_collection_box_construct (GType object_type, GListStore* collection);
static void games_collection_box_on_loading_notification_closed (GamesCollectionBox* self);
static void _games_collection_box_on_loading_notification_closed_gtk_button_clicked (GtkButton* _sender, gpointer self);
GType games_icon_get_type (void) G_GNUC_CONST;
GType games_cover_get_type (void) G_GNUC_CONST;
GType games_media_set_get_type (void) G_GNUC_CONST;
GType games_runner_get_type (void) G_GNUC_CONST;
GType games_game_get_type (void) G_GNUC_CONST;
static void games_collection_box_on_game_activated (GamesCollectionBox* self, GamesGame* game);
static void _games_collection_box_on_game_activated_games_collection_icon_view_game_activated (GamesCollectionIconView* _sender, GamesGame* game, gpointer self);
static void games_collection_box_on_search_text_notify (GamesCollectionBox* self);
const gchar* games_search_bar_get_text (GamesSearchBar* self);
void games_collection_icon_view_set_filtering_text (GamesCollectionIconView* self, const gchar* value);
static void _games_collection_box_on_search_text_notify_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
gboolean games_collection_box_search_bar_handle_event (GamesCollectionBox* self, GdkEvent* event);
GListModel* games_collection_box_get_collection (GamesCollectionBox* self);
void games_collection_box_set_collection (GamesCollectionBox* self, GListModel* value);
gboolean games_collection_box_get_search_mode (GamesCollectionBox* self);
void games_collection_box_set_search_mode (GamesCollectionBox* self, gboolean value);
gboolean games_collection_box_get_loading_notification (GamesCollectionBox* self);
void games_collection_box_set_loading_notification (GamesCollectionBox* self, gboolean value);
static GObject * games_collection_box_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void games_collection_box_finalize (GObject * obj);
static void _vala_games_collection_box_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_games_collection_box_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


GamesCollectionBox* games_collection_box_construct (GType object_type, GListStore* collection) {
	GamesCollectionBox * self = NULL;
	GListStore* _tmp0_;
	g_return_val_if_fail (collection != NULL, NULL);
	_tmp0_ = collection;
	self = (GamesCollectionBox*) g_object_new (object_type, "collection", _tmp0_, NULL);
	return self;
}


GamesCollectionBox* games_collection_box_new (GListStore* collection) {
	return games_collection_box_construct (GAMES_TYPE_COLLECTION_BOX, collection);
}


static void games_collection_box_on_loading_notification_closed (GamesCollectionBox* self) {
	GtkRevealer* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->loading_notification_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
}


static void _games_collection_box_on_loading_notification_closed_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	games_collection_box_on_loading_notification_closed ((GamesCollectionBox*) self);
}


static void games_collection_box_on_game_activated (GamesCollectionBox* self, GamesGame* game) {
	GamesGame* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (game != NULL);
	_tmp0_ = game;
	g_signal_emit (self, games_collection_box_signals[GAMES_COLLECTION_BOX_GAME_ACTIVATED_SIGNAL], 0, _tmp0_);
}


static void _games_collection_box_on_game_activated_games_collection_icon_view_game_activated (GamesCollectionIconView* _sender, GamesGame* game, gpointer self) {
	games_collection_box_on_game_activated ((GamesCollectionBox*) self, game);
}


static void games_collection_box_on_search_text_notify (GamesCollectionBox* self) {
	GamesCollectionIconView* _tmp0_;
	GamesSearchBar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->icon_view;
	_tmp1_ = self->priv->search_bar;
	_tmp2_ = games_search_bar_get_text (_tmp1_);
	_tmp3_ = _tmp2_;
	games_collection_icon_view_set_filtering_text (_tmp0_, _tmp3_);
}


static void _games_collection_box_on_search_text_notify_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	games_collection_box_on_search_text_notify ((GamesCollectionBox*) self);
}


gboolean games_collection_box_search_bar_handle_event (GamesCollectionBox* self, GdkEvent* event) {
	gboolean result = FALSE;
	GamesSearchBar* _tmp0_;
	GdkEvent* _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = self->priv->search_bar;
	_tmp1_ = event;
	_tmp2_ = gtk_search_bar_handle_event ((GtkSearchBar*) _tmp0_, _tmp1_);
	result = _tmp2_;
	return result;
}


GListModel* games_collection_box_get_collection (GamesCollectionBox* self) {
	GListModel* result;
	GListModel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_collection;
	result = _tmp0_;
	return result;
}


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


void games_collection_box_set_collection (GamesCollectionBox* self, GListModel* value) {
	g_return_if_fail (self != NULL);
	if (games_collection_box_get_collection (self) != value) {
		GListModel* _tmp0_;
		GListModel* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_g_object_unref0 (self->priv->_collection);
		self->priv->_collection = _tmp1_;
		g_object_notify ((GObject *) self, "collection");
	}
}


gboolean games_collection_box_get_search_mode (GamesCollectionBox* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_search_mode;
	result = _tmp0_;
	return result;
}


void games_collection_box_set_search_mode (GamesCollectionBox* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (games_collection_box_get_search_mode (self) != value) {
		gboolean _tmp0_;
		_tmp0_ = value;
		self->priv->_search_mode = _tmp0_;
		g_object_notify ((GObject *) self, "search-mode");
	}
}


gboolean games_collection_box_get_loading_notification (GamesCollectionBox* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_loading_notification;
	result = _tmp0_;
	return result;
}


void games_collection_box_set_loading_notification (GamesCollectionBox* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (games_collection_box_get_loading_notification (self) != value) {
		gboolean _tmp0_;
		_tmp0_ = value;
		self->priv->_loading_notification = _tmp0_;
		g_object_notify ((GObject *) self, "loading-notification");
	}
}


static GObject * games_collection_box_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	GamesCollectionBox * self;
	GamesCollectionIconView* _tmp0_;
	GBinding* _tmp1_;
	GBinding* _tmp2_;
	GamesSearchBar* _tmp3_;
	GBinding* _tmp4_;
	GBinding* _tmp5_;
	GtkRevealer* _tmp6_;
	GBinding* _tmp7_;
	GBinding* _tmp8_;
	parent_class = G_OBJECT_CLASS (games_collection_box_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GAMES_TYPE_COLLECTION_BOX, GamesCollectionBox);
	_tmp0_ = self->priv->icon_view;
	_tmp1_ = g_object_bind_property_with_closures ((GObject*) self, "collection", (GObject*) _tmp0_, "model", G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)));
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (self->priv->collection_binding);
	self->priv->collection_binding = _tmp2_;
	_tmp3_ = self->priv->search_bar;
	_tmp4_ = g_object_bind_property_with_closures ((GObject*) self, "search-mode", (GObject*) _tmp3_, "search-mode-enabled", G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)));
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_g_object_unref0 (self->priv->search_binding);
	self->priv->search_binding = _tmp5_;
	_tmp6_ = self->priv->loading_notification_revealer;
	_tmp7_ = g_object_bind_property_with_closures ((GObject*) self, "loading-notification", (GObject*) _tmp6_, "reveal-child", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)));
	_tmp8_ = _g_object_ref0 (_tmp7_);
	_g_object_unref0 (self->priv->loading_notification_binding);
	self->priv->loading_notification_binding = _tmp8_;
	return obj;
}


static void games_collection_box_class_init (GamesCollectionBoxClass * klass) {
	gint GamesCollectionBox_private_offset;
	games_collection_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GamesCollectionBoxPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_games_collection_box_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_games_collection_box_set_property;
	G_OBJECT_CLASS (klass)->constructor = games_collection_box_constructor;
	G_OBJECT_CLASS (klass)->finalize = games_collection_box_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_COLLECTION_BOX_COLLECTION, g_param_spec_object ("collection", "collection", "collection", g_list_model_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_COLLECTION_BOX_SEARCH_MODE, g_param_spec_boolean ("search-mode", "search-mode", "search-mode", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_COLLECTION_BOX_LOADING_NOTIFICATION, g_param_spec_boolean ("loading-notification", "loading-notification", "loading-notification", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	GamesCollectionBox_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Games/ui/collection-box.ui");
	games_collection_box_signals[GAMES_COLLECTION_BOX_GAME_ACTIVATED_SIGNAL] = g_signal_new ("game_activated", GAMES_TYPE_COLLECTION_BOX, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GAMES_TYPE_GAME);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "search_bar", FALSE, GamesCollectionBox_private_offset + G_STRUCT_OFFSET (GamesCollectionBoxPrivate, search_bar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "loading_notification_revealer", FALSE, GamesCollectionBox_private_offset + G_STRUCT_OFFSET (GamesCollectionBoxPrivate, loading_notification_revealer));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "icon_view", FALSE, GamesCollectionBox_private_offset + G_STRUCT_OFFSET (GamesCollectionBoxPrivate, icon_view));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_loading_notification_closed", G_CALLBACK(_games_collection_box_on_loading_notification_closed_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_game_activated", G_CALLBACK(_games_collection_box_on_game_activated_games_collection_icon_view_game_activated));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_search_text_notify", G_CALLBACK(_games_collection_box_on_search_text_notify_g_object_notify));
}


static void games_collection_box_instance_init (GamesCollectionBox * self) {
	self->priv = GAMES_COLLECTION_BOX_GET_PRIVATE (self);
	g_type_ensure (GAMES_TYPE_SEARCH_BAR);
	g_type_ensure (GAMES_TYPE_COLLECTION_ICON_VIEW);
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void games_collection_box_finalize (GObject * obj) {
	GamesCollectionBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GAMES_TYPE_COLLECTION_BOX, GamesCollectionBox);
	_g_object_unref0 (self->priv->_collection);
	_g_object_unref0 (self->priv->search_bar);
	_g_object_unref0 (self->priv->loading_notification_revealer);
	_g_object_unref0 (self->priv->icon_view);
	_g_object_unref0 (self->priv->collection_binding);
	_g_object_unref0 (self->priv->search_binding);
	_g_object_unref0 (self->priv->loading_notification_binding);
	G_OBJECT_CLASS (games_collection_box_parent_class)->finalize (obj);
}


GType games_collection_box_get_type (void) {
	static volatile gsize games_collection_box_type_id__volatile = 0;
	if (g_once_init_enter (&games_collection_box_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GamesCollectionBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) games_collection_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GamesCollectionBox), 0, (GInstanceInitFunc) games_collection_box_instance_init, NULL };
		GType games_collection_box_type_id;
		games_collection_box_type_id = g_type_register_static (gtk_box_get_type (), "GamesCollectionBox", &g_define_type_info, 0);
		g_once_init_leave (&games_collection_box_type_id__volatile, games_collection_box_type_id);
	}
	return games_collection_box_type_id__volatile;
}


static void _vala_games_collection_box_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GamesCollectionBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GAMES_TYPE_COLLECTION_BOX, GamesCollectionBox);
	switch (property_id) {
		case GAMES_COLLECTION_BOX_COLLECTION:
		g_value_set_object (value, games_collection_box_get_collection (self));
		break;
		case GAMES_COLLECTION_BOX_SEARCH_MODE:
		g_value_set_boolean (value, games_collection_box_get_search_mode (self));
		break;
		case GAMES_COLLECTION_BOX_LOADING_NOTIFICATION:
		g_value_set_boolean (value, games_collection_box_get_loading_notification (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_games_collection_box_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GamesCollectionBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GAMES_TYPE_COLLECTION_BOX, GamesCollectionBox);
	switch (property_id) {
		case GAMES_COLLECTION_BOX_COLLECTION:
		games_collection_box_set_collection (self, g_value_get_object (value));
		break;
		case GAMES_COLLECTION_BOX_SEARCH_MODE:
		games_collection_box_set_search_mode (self, g_value_get_boolean (value));
		break;
		case GAMES_COLLECTION_BOX_LOADING_NOTIFICATION:
		games_collection_box_set_loading_notification (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



