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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <adwaita.h>
#include <gee.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define PROTON_PLUS_WIDGETS_TYPE_RUNNERS_BOX (proton_plus_widgets_runners_box_get_type ())
#define PROTON_PLUS_WIDGETS_RUNNERS_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_RUNNERS_BOX, ProtonPlusWidgetsRunnersBox))
#define PROTON_PLUS_WIDGETS_RUNNERS_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_RUNNERS_BOX, ProtonPlusWidgetsRunnersBoxClass))
#define PROTON_PLUS_WIDGETS_IS_RUNNERS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_RUNNERS_BOX))
#define PROTON_PLUS_WIDGETS_IS_RUNNERS_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_RUNNERS_BOX))
#define PROTON_PLUS_WIDGETS_RUNNERS_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_RUNNERS_BOX, ProtonPlusWidgetsRunnersBoxClass))

typedef struct _ProtonPlusWidgetsRunnersBox ProtonPlusWidgetsRunnersBox;
typedef struct _ProtonPlusWidgetsRunnersBoxClass ProtonPlusWidgetsRunnersBoxClass;
typedef struct _ProtonPlusWidgetsRunnersBoxPrivate ProtonPlusWidgetsRunnersBoxPrivate;

#define PROTON_PLUS_MODELS_TYPE_LAUNCHER (proton_plus_models_launcher_get_type ())
#define PROTON_PLUS_MODELS_LAUNCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncher))
#define PROTON_PLUS_MODELS_LAUNCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncherClass))
#define PROTON_PLUS_MODELS_IS_LAUNCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_LAUNCHER))
#define PROTON_PLUS_MODELS_IS_LAUNCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_LAUNCHER))
#define PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncherClass))

typedef struct _ProtonPlusModelsLauncher ProtonPlusModelsLauncher;
typedef struct _ProtonPlusModelsLauncherClass ProtonPlusModelsLauncherClass;

#define PROTON_PLUS_WIDGETS_TYPE_FILTERS_BOX (proton_plus_widgets_filters_box_get_type ())
#define PROTON_PLUS_WIDGETS_FILTERS_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_FILTERS_BOX, ProtonPlusWidgetsFiltersBox))
#define PROTON_PLUS_WIDGETS_FILTERS_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_FILTERS_BOX, ProtonPlusWidgetsFiltersBoxClass))
#define PROTON_PLUS_WIDGETS_IS_FILTERS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_FILTERS_BOX))
#define PROTON_PLUS_WIDGETS_IS_FILTERS_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_FILTERS_BOX))
#define PROTON_PLUS_WIDGETS_FILTERS_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_FILTERS_BOX, ProtonPlusWidgetsFiltersBoxClass))

typedef struct _ProtonPlusWidgetsFiltersBox ProtonPlusWidgetsFiltersBox;
typedef struct _ProtonPlusWidgetsFiltersBoxClass ProtonPlusWidgetsFiltersBoxClass;

#define PROTON_PLUS_WIDGETS_TYPE_RUNNER_GROUP (proton_plus_widgets_runner_group_get_type ())
#define PROTON_PLUS_WIDGETS_RUNNER_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_RUNNER_GROUP, ProtonPlusWidgetsRunnerGroup))
#define PROTON_PLUS_WIDGETS_RUNNER_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_RUNNER_GROUP, ProtonPlusWidgetsRunnerGroupClass))
#define PROTON_PLUS_WIDGETS_IS_RUNNER_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_RUNNER_GROUP))
#define PROTON_PLUS_WIDGETS_IS_RUNNER_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_RUNNER_GROUP))
#define PROTON_PLUS_WIDGETS_RUNNER_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_RUNNER_GROUP, ProtonPlusWidgetsRunnerGroupClass))

typedef struct _ProtonPlusWidgetsRunnerGroup ProtonPlusWidgetsRunnerGroup;
typedef struct _ProtonPlusWidgetsRunnerGroupClass ProtonPlusWidgetsRunnerGroupClass;
enum  {
	PROTON_PLUS_WIDGETS_RUNNERS_BOX_0_PROPERTY,
	PROTON_PLUS_WIDGETS_RUNNERS_BOX_INSTALLED_ONLY_PROPERTY,
	PROTON_PLUS_WIDGETS_RUNNERS_BOX_LAUNCHER_PROPERTY,
	PROTON_PLUS_WIDGETS_RUNNERS_BOX_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_runners_box_properties[PROTON_PLUS_WIDGETS_RUNNERS_BOX_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _ProtonPlusModelsLauncherPrivate ProtonPlusModelsLauncherPrivate;

#define PROTON_PLUS_MODELS_TYPE_GAME (proton_plus_models_game_get_type ())
#define PROTON_PLUS_MODELS_GAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_GAME, ProtonPlusModelsGame))
#define PROTON_PLUS_MODELS_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_GAME, ProtonPlusModelsGameClass))
#define PROTON_PLUS_MODELS_IS_GAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_GAME))
#define PROTON_PLUS_MODELS_IS_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_GAME))
#define PROTON_PLUS_MODELS_GAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_GAME, ProtonPlusModelsGameClass))

typedef struct _ProtonPlusModelsGame ProtonPlusModelsGame;
typedef struct _ProtonPlusModelsGameClass ProtonPlusModelsGameClass;

#define PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER (proton_plus_models_simple_runner_get_type ())
#define PROTON_PLUS_MODELS_SIMPLE_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER, ProtonPlusModelsSimpleRunner))
#define PROTON_PLUS_MODELS_SIMPLE_RUNNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER, ProtonPlusModelsSimpleRunnerClass))
#define PROTON_PLUS_MODELS_IS_SIMPLE_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER))
#define PROTON_PLUS_MODELS_IS_SIMPLE_RUNNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER))
#define PROTON_PLUS_MODELS_SIMPLE_RUNNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER, ProtonPlusModelsSimpleRunnerClass))

typedef struct _ProtonPlusModelsSimpleRunner ProtonPlusModelsSimpleRunner;
typedef struct _ProtonPlusModelsSimpleRunnerClass ProtonPlusModelsSimpleRunnerClass;

#define PROTON_PLUS_MODELS_TYPE_GROUP (proton_plus_models_group_get_type ())
#define PROTON_PLUS_MODELS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroup))
#define PROTON_PLUS_MODELS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroupClass))
#define PROTON_PLUS_MODELS_IS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_GROUP))
#define PROTON_PLUS_MODELS_IS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_GROUP))
#define PROTON_PLUS_MODELS_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroupClass))

typedef struct _ProtonPlusModelsGroup ProtonPlusModelsGroup;
typedef struct _ProtonPlusModelsGroupClass ProtonPlusModelsGroupClass;
typedef enum  {
	PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM,
	PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK,
	PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SNAP
} ProtonPlusModelsLauncherInstallationTypes;

#define PROTON_PLUS_MODELS_LAUNCHER_TYPE_INSTALLATION_TYPES (proton_plus_models_launcher_installation_types_get_type ())

struct _ProtonPlusWidgetsRunnersBox {
	GtkBox parent_instance;
	ProtonPlusWidgetsRunnersBoxPrivate * priv;
};

struct _ProtonPlusWidgetsRunnersBoxClass {
	GtkBoxClass parent_class;
};

struct _ProtonPlusWidgetsRunnersBoxPrivate {
	gboolean _installed_only;
	ProtonPlusModelsLauncher* _launcher;
	ProtonPlusWidgetsFiltersBox* filters_box;
	GtkBox* content;
	AdwClamp* clamp;
	GtkScrolledWindow* scrolled_window;
	GeeArrayList* runner_groups;
	GtkLabel* empty_label;
};

struct _ProtonPlusModelsLauncher {
	GObject parent_instance;
	ProtonPlusModelsLauncherPrivate * priv;
	gchar* title;
	gchar* icon_path;
	gchar* directory;
	gboolean installed;
	gboolean has_library_support;
	GList* games;
	GeeArrayList* compatibility_tools;
	ProtonPlusModelsGroup** groups;
	gint groups_length1;
	ProtonPlusModelsLauncherInstallationTypes installation_type;
};

struct _ProtonPlusModelsLauncherClass {
	GObjectClass parent_class;
	void (*load_game_library) (ProtonPlusModelsLauncher* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*load_game_library_finish) (ProtonPlusModelsLauncher* self, GAsyncResult* _res_);
	gint (*get_compatibility_tool_usage_count) (ProtonPlusModelsLauncher* self, const gchar* compatibility_tool_name);
};

static gint ProtonPlusWidgetsRunnersBox_private_offset;
static gpointer proton_plus_widgets_runners_box_parent_class = NULL;

VALA_EXTERN GType proton_plus_widgets_runners_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsRunnersBox, g_object_unref)
VALA_EXTERN GType proton_plus_models_launcher_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsLauncher, g_object_unref)
VALA_EXTERN GType proton_plus_widgets_filters_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsFiltersBox, g_object_unref)
VALA_EXTERN GType proton_plus_widgets_runner_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsRunnerGroup, g_object_unref)
VALA_EXTERN ProtonPlusWidgetsRunnersBox* proton_plus_widgets_runners_box_new (void);
VALA_EXTERN ProtonPlusWidgetsRunnersBox* proton_plus_widgets_runners_box_construct (GType object_type);
VALA_EXTERN ProtonPlusWidgetsFiltersBox* proton_plus_widgets_filters_box_new (void);
VALA_EXTERN ProtonPlusWidgetsFiltersBox* proton_plus_widgets_filters_box_construct (GType object_type);
static void proton_plus_widgets_runners_box_update_launcher (ProtonPlusWidgetsRunnersBox* self);
VALA_EXTERN GType proton_plus_models_game_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGame, g_object_unref)
VALA_EXTERN GType proton_plus_models_simple_runner_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsSimpleRunner, g_object_unref)
VALA_EXTERN GType proton_plus_models_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGroup, g_object_unref)
VALA_EXTERN GType proton_plus_models_launcher_installation_types_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gboolean proton_plus_widgets_runners_box_get_installed_only (ProtonPlusWidgetsRunnersBox* self);
VALA_EXTERN ProtonPlusWidgetsRunnerGroup* proton_plus_widgets_runner_group_new (ProtonPlusModelsGroup* group,
                                                                    gboolean installed_only);
VALA_EXTERN ProtonPlusWidgetsRunnerGroup* proton_plus_widgets_runner_group_construct (GType object_type,
                                                                          ProtonPlusModelsGroup* group,
                                                                          gboolean installed_only);
VALA_EXTERN void proton_plus_widgets_filters_box_apply_filters (ProtonPlusWidgetsFiltersBox* self);
VALA_EXTERN void proton_plus_widgets_runners_box_set_selected_launcher (ProtonPlusWidgetsRunnersBox* self,
                                                            ProtonPlusModelsLauncher* launcher);
VALA_EXTERN void proton_plus_widgets_runners_box_set_launcher (ProtonPlusWidgetsRunnersBox* self,
                                                   ProtonPlusModelsLauncher* value);
VALA_EXTERN void proton_plus_widgets_runners_box_set_installed_only (ProtonPlusWidgetsRunnersBox* self,
                                                         gboolean value);
VALA_EXTERN void proton_plus_widgets_runner_group_load (ProtonPlusWidgetsRunnerGroup* self,
                                            gboolean installed_only);
VALA_EXTERN ProtonPlusModelsLauncher* proton_plus_widgets_runners_box_get_launcher (ProtonPlusWidgetsRunnersBox* self);
static void proton_plus_widgets_runners_box_finalize (GObject * obj);
static GType proton_plus_widgets_runners_box_get_type_once (void);
static void _vala_proton_plus_widgets_runners_box_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec);
static void _vala_proton_plus_widgets_runners_box_set_property (GObject * object,
                                                         guint property_id,
                                                         const GValue * value,
                                                         GParamSpec * pspec);

static inline gpointer
proton_plus_widgets_runners_box_get_instance_private (ProtonPlusWidgetsRunnersBox* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsRunnersBox_private_offset);
}

ProtonPlusWidgetsRunnersBox*
proton_plus_widgets_runners_box_construct (GType object_type)
{
	ProtonPlusWidgetsRunnersBox * self = NULL;
	ProtonPlusWidgetsFiltersBox* _tmp0_;
	ProtonPlusWidgetsFiltersBox* _tmp1_;
	GtkBox* _tmp2_;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	GtkLabel* _tmp5_;
	GtkLabel* _tmp6_;
	AdwClamp* _tmp7_;
	AdwClamp* _tmp8_;
	AdwClamp* _tmp9_;
	GtkBox* _tmp10_;
	GtkScrolledWindow* _tmp11_;
	GtkScrolledWindow* _tmp12_;
	AdwClamp* _tmp13_;
	GtkScrolledWindow* _tmp14_;
	GtkScrolledWindow* _tmp15_;
	ProtonPlusWidgetsFiltersBox* _tmp16_;
	GtkScrolledWindow* _tmp17_;
	GtkLabel* _tmp18_;
	self = (ProtonPlusWidgetsRunnersBox*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, "spacing", 15, NULL);
	gtk_widget_set_vexpand ((GtkWidget*) self, TRUE);
	gtk_widget_set_margin_top ((GtkWidget*) self, 7);
	gtk_widget_set_margin_start ((GtkWidget*) self, 15);
	gtk_widget_set_margin_end ((GtkWidget*) self, 15);
	gtk_widget_set_margin_bottom ((GtkWidget*) self, 15);
	_tmp0_ = proton_plus_widgets_filters_box_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->filters_box);
	self->priv->filters_box = _tmp0_;
	_tmp1_ = self->priv->filters_box;
	g_object_bind_property_with_closures ((GObject*) _tmp1_, "installed-only", (GObject*) self, "installed-only", G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 15);
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->content);
	self->priv->content = _tmp2_;
	_tmp3_ = (GtkLabel*) gtk_label_new (_ ("No runners found."));
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->empty_label);
	self->priv->empty_label = _tmp3_;
	_tmp4_ = self->priv->empty_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp4_, "title-2");
	_tmp5_ = self->priv->empty_label;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp5_, TRUE);
	_tmp6_ = self->priv->empty_label;
	gtk_widget_hide ((GtkWidget*) _tmp6_);
	_tmp7_ = (AdwClamp*) adw_clamp_new ();
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->clamp);
	self->priv->clamp = _tmp7_;
	_tmp8_ = self->priv->clamp;
	adw_clamp_set_maximum_size (_tmp8_, 975);
	_tmp9_ = self->priv->clamp;
	_tmp10_ = self->priv->content;
	adw_clamp_set_child (_tmp9_, (GtkWidget*) _tmp10_);
	_tmp11_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->scrolled_window);
	self->priv->scrolled_window = _tmp11_;
	_tmp12_ = self->priv->scrolled_window;
	_tmp13_ = self->priv->clamp;
	gtk_scrolled_window_set_child (_tmp12_, (GtkWidget*) _tmp13_);
	_tmp14_ = self->priv->scrolled_window;
	gtk_scrolled_window_set_policy (_tmp14_, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
	_tmp15_ = self->priv->scrolled_window;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp15_, TRUE);
	_tmp16_ = self->priv->filters_box;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp16_);
	_tmp17_ = self->priv->scrolled_window;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp17_);
	_tmp18_ = self->priv->empty_label;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp18_);
	return self;
}

ProtonPlusWidgetsRunnersBox*
proton_plus_widgets_runners_box_new (void)
{
	return proton_plus_widgets_runners_box_construct (PROTON_PLUS_WIDGETS_TYPE_RUNNERS_BOX);
}

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

static void
proton_plus_widgets_runners_box_update_launcher (ProtonPlusWidgetsRunnersBox* self)
{
	GeeArrayList* _tmp6_;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	ProtonPlusModelsLauncher* _tmp9_;
	GtkScrolledWindow* _tmp16_;
	GtkLabel* _tmp17_;
	ProtonPlusModelsLauncher* _tmp18_;
	ProtonPlusModelsGroup** _tmp19_;
	gint _tmp19__length1;
	ProtonPlusWidgetsFiltersBox* _tmp29_;
	g_return_if_fail (self != NULL);
	while (TRUE) {
		GtkWidget* child = NULL;
		GtkBox* _tmp0_;
		GtkWidget* _tmp1_;
		GtkWidget* _tmp2_;
		GtkWidget* _tmp3_;
		GtkBox* _tmp4_;
		GtkWidget* _tmp5_;
		_tmp0_ = self->priv->content;
		_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
		_tmp2_ = _g_object_ref0 (_tmp1_);
		child = _tmp2_;
		_tmp3_ = child;
		if (_tmp3_ == NULL) {
			_g_object_unref0 (child);
			break;
		}
		_tmp4_ = self->priv->content;
		_tmp5_ = child;
		gtk_box_remove (_tmp4_, _tmp5_);
		_g_object_unref0 (child);
	}
	_tmp6_ = self->priv->runner_groups;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp6_);
	_tmp9_ = self->priv->_launcher;
	if (_tmp9_ == NULL) {
		_tmp8_ = TRUE;
	} else {
		ProtonPlusModelsLauncher* _tmp10_;
		ProtonPlusModelsGroup** _tmp11_;
		gint _tmp11__length1;
		_tmp10_ = self->priv->_launcher;
		_tmp11_ = _tmp10_->groups;
		_tmp11__length1 = _tmp10_->groups_length1;
		_tmp8_ = _tmp11_ == NULL;
	}
	if (_tmp8_) {
		_tmp7_ = TRUE;
	} else {
		ProtonPlusModelsLauncher* _tmp12_;
		ProtonPlusModelsGroup** _tmp13_;
		gint _tmp13__length1;
		_tmp12_ = self->priv->_launcher;
		_tmp13_ = _tmp12_->groups;
		_tmp13__length1 = _tmp12_->groups_length1;
		_tmp7_ = _tmp13__length1 == 0;
	}
	if (_tmp7_) {
		GtkScrolledWindow* _tmp14_;
		GtkLabel* _tmp15_;
		_tmp14_ = self->priv->scrolled_window;
		gtk_widget_hide ((GtkWidget*) _tmp14_);
		_tmp15_ = self->priv->empty_label;
		gtk_widget_show ((GtkWidget*) _tmp15_);
		return;
	}
	_tmp16_ = self->priv->scrolled_window;
	gtk_widget_show ((GtkWidget*) _tmp16_);
	_tmp17_ = self->priv->empty_label;
	gtk_widget_hide ((GtkWidget*) _tmp17_);
	_tmp18_ = self->priv->_launcher;
	_tmp19_ = _tmp18_->groups;
	_tmp19__length1 = _tmp18_->groups_length1;
	{
		ProtonPlusModelsGroup** group_collection = NULL;
		gint group_collection_length1 = 0;
		gint _group_collection_size_ = 0;
		gint group_it = 0;
		group_collection = _tmp19_;
		group_collection_length1 = _tmp19__length1;
		for (group_it = 0; group_it < group_collection_length1; group_it = group_it + 1) {
			ProtonPlusModelsGroup* _tmp20_;
			ProtonPlusModelsGroup* group = NULL;
			_tmp20_ = _g_object_ref0 (group_collection[group_it]);
			group = _tmp20_;
			{
				ProtonPlusWidgetsRunnerGroup* runner_group = NULL;
				ProtonPlusModelsGroup* _tmp21_;
				gboolean _tmp22_;
				gboolean _tmp23_;
				ProtonPlusWidgetsRunnerGroup* _tmp24_;
				GeeArrayList* _tmp25_;
				ProtonPlusWidgetsRunnerGroup* _tmp26_;
				GtkBox* _tmp27_;
				ProtonPlusWidgetsRunnerGroup* _tmp28_;
				_tmp21_ = group;
				_tmp22_ = proton_plus_widgets_runners_box_get_installed_only (self);
				_tmp23_ = _tmp22_;
				_tmp24_ = proton_plus_widgets_runner_group_new (_tmp21_, _tmp23_);
				g_object_ref_sink (_tmp24_);
				runner_group = _tmp24_;
				_tmp25_ = self->priv->runner_groups;
				_tmp26_ = runner_group;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp25_, _tmp26_);
				_tmp27_ = self->priv->content;
				_tmp28_ = runner_group;
				gtk_box_append (_tmp27_, (GtkWidget*) _tmp28_);
				_g_object_unref0 (runner_group);
				_g_object_unref0 (group);
			}
		}
	}
	_tmp29_ = self->priv->filters_box;
	proton_plus_widgets_filters_box_apply_filters (_tmp29_);
}

void
proton_plus_widgets_runners_box_set_selected_launcher (ProtonPlusWidgetsRunnersBox* self,
                                                       ProtonPlusModelsLauncher* launcher)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (launcher != NULL);
	proton_plus_widgets_runners_box_set_launcher (self, launcher);
}

gboolean
proton_plus_widgets_runners_box_get_installed_only (ProtonPlusWidgetsRunnersBox* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_installed_only;
	return result;
}

void
proton_plus_widgets_runners_box_set_installed_only (ProtonPlusWidgetsRunnersBox* self,
                                                    gboolean value)
{
	g_return_if_fail (self != NULL);
	if (self->priv->_installed_only == value) {
		return;
	}
	self->priv->_installed_only = value;
	{
		GeeArrayList* _runner_group_list = NULL;
		GeeArrayList* _tmp0_;
		gint _runner_group_size = 0;
		GeeArrayList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _runner_group_index = 0;
		_tmp0_ = self->priv->runner_groups;
		_runner_group_list = _tmp0_;
		_tmp1_ = _runner_group_list;
		_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_runner_group_size = _tmp3_;
		_runner_group_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			ProtonPlusWidgetsRunnerGroup* runner_group = NULL;
			GeeArrayList* _tmp6_;
			gpointer _tmp7_;
			ProtonPlusWidgetsRunnerGroup* _tmp8_;
			_runner_group_index = _runner_group_index + 1;
			_tmp4_ = _runner_group_index;
			_tmp5_ = _runner_group_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _runner_group_list;
			_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _runner_group_index);
			runner_group = (ProtonPlusWidgetsRunnerGroup*) _tmp7_;
			_tmp8_ = runner_group;
			proton_plus_widgets_runner_group_load (_tmp8_, value);
			_g_object_unref0 (runner_group);
		}
	}
	g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_runners_box_properties[PROTON_PLUS_WIDGETS_RUNNERS_BOX_INSTALLED_ONLY_PROPERTY]);
}

ProtonPlusModelsLauncher*
proton_plus_widgets_runners_box_get_launcher (ProtonPlusWidgetsRunnersBox* self)
{
	ProtonPlusModelsLauncher* result;
	ProtonPlusModelsLauncher* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_launcher;
	result = _tmp0_;
	return result;
}

void
proton_plus_widgets_runners_box_set_launcher (ProtonPlusWidgetsRunnersBox* self,
                                              ProtonPlusModelsLauncher* value)
{
	ProtonPlusModelsLauncher* _tmp0_;
	ProtonPlusModelsLauncher* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_launcher;
	if (_tmp0_ == value) {
		return;
	}
	_tmp1_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_launcher);
	self->priv->_launcher = _tmp1_;
	proton_plus_widgets_runners_box_update_launcher (self);
	g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_runners_box_properties[PROTON_PLUS_WIDGETS_RUNNERS_BOX_LAUNCHER_PROPERTY]);
}

static void
proton_plus_widgets_runners_box_class_init (ProtonPlusWidgetsRunnersBoxClass * klass,
                                            gpointer klass_data)
{
	proton_plus_widgets_runners_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsRunnersBox_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_runners_box_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_runners_box_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_runners_box_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_RUNNERS_BOX_INSTALLED_ONLY_PROPERTY, proton_plus_widgets_runners_box_properties[PROTON_PLUS_WIDGETS_RUNNERS_BOX_INSTALLED_ONLY_PROPERTY] = g_param_spec_boolean ("installed-only", "installed-only", "installed-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_RUNNERS_BOX_LAUNCHER_PROPERTY, proton_plus_widgets_runners_box_properties[PROTON_PLUS_WIDGETS_RUNNERS_BOX_LAUNCHER_PROPERTY] = g_param_spec_object ("launcher", "launcher", "launcher", PROTON_PLUS_MODELS_TYPE_LAUNCHER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
proton_plus_widgets_runners_box_instance_init (ProtonPlusWidgetsRunnersBox * self,
                                               gpointer klass)
{
	GeeArrayList* _tmp0_;
	self->priv = proton_plus_widgets_runners_box_get_instance_private (self);
	_tmp0_ = gee_array_list_new (PROTON_PLUS_WIDGETS_TYPE_RUNNER_GROUP, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	self->priv->runner_groups = _tmp0_;
}

static void
proton_plus_widgets_runners_box_finalize (GObject * obj)
{
	ProtonPlusWidgetsRunnersBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TYPE_RUNNERS_BOX, ProtonPlusWidgetsRunnersBox);
	_g_object_unref0 (self->priv->_launcher);
	_g_object_unref0 (self->priv->filters_box);
	_g_object_unref0 (self->priv->content);
	_g_object_unref0 (self->priv->clamp);
	_g_object_unref0 (self->priv->scrolled_window);
	_g_object_unref0 (self->priv->runner_groups);
	_g_object_unref0 (self->priv->empty_label);
	G_OBJECT_CLASS (proton_plus_widgets_runners_box_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_runners_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsRunnersBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_runners_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsRunnersBox), 0, (GInstanceInitFunc) proton_plus_widgets_runners_box_instance_init, NULL };
	GType proton_plus_widgets_runners_box_type_id;
	proton_plus_widgets_runners_box_type_id = g_type_register_static (gtk_box_get_type (), "ProtonPlusWidgetsRunnersBox", &g_define_type_info, 0);
	ProtonPlusWidgetsRunnersBox_private_offset = g_type_add_instance_private (proton_plus_widgets_runners_box_type_id, sizeof (ProtonPlusWidgetsRunnersBoxPrivate));
	return proton_plus_widgets_runners_box_type_id;
}

GType
proton_plus_widgets_runners_box_get_type (void)
{
	static volatile gsize proton_plus_widgets_runners_box_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_runners_box_type_id__once)) {
		GType proton_plus_widgets_runners_box_type_id;
		proton_plus_widgets_runners_box_type_id = proton_plus_widgets_runners_box_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_runners_box_type_id__once, proton_plus_widgets_runners_box_type_id);
	}
	return proton_plus_widgets_runners_box_type_id__once;
}

static void
_vala_proton_plus_widgets_runners_box_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec)
{
	ProtonPlusWidgetsRunnersBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TYPE_RUNNERS_BOX, ProtonPlusWidgetsRunnersBox);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_RUNNERS_BOX_INSTALLED_ONLY_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_runners_box_get_installed_only (self));
		break;
		case PROTON_PLUS_WIDGETS_RUNNERS_BOX_LAUNCHER_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_runners_box_get_launcher (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_runners_box_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec)
{
	ProtonPlusWidgetsRunnersBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TYPE_RUNNERS_BOX, ProtonPlusWidgetsRunnersBox);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_RUNNERS_BOX_INSTALLED_ONLY_PROPERTY:
		proton_plus_widgets_runners_box_set_installed_only (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_RUNNERS_BOX_LAUNCHER_PROPERTY:
		proton_plus_widgets_runners_box_set_launcher (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

