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

#include "protonplus_core.h"
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <pango/pango.h>
#include <float.h>
#include <math.h>
#include <glib/gi18n-lib.h>
#include <gee.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
#include <adwaita.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

enum  {
	PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_GAME_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_SELECTED_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_game_row_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block27Data Block27Data;
#define _pango_attr_list_unref0(var) ((var == NULL) ? NULL : (var = (pango_attr_list_unref (var), NULL)))
typedef struct _Block28Data Block28Data;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
enum  {
	PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_MASS_EDIT_REQUESTED_SIGNAL,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_NUM_SIGNALS
};
static guint proton_plus_widgets_games_game_row_signals[PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_NUM_SIGNALS] = {0};

struct _ProtonPlusWidgetsGamesGameRowPrivate {
	GtkGestureClick* title_gesture;
	GtkGestureClick* prefix_gesture;
	GtkCheckButton* select_check_button;
	GtkLabel* title_label;
	GtkLabel* prefix_label;
	GtkLabel* tool_label;
	GtkButton* tool_button;
	GtkButton* launch_button;
	GtkButton* run_custom_executable_button;
	ProtonPlusWidgetsGamesExtraButton* extra_button;
	GtkBox* other_box;
	GtkBox* content_box;
	GtkWidget* controller_up_target;
	GtkWidget* controller_down_target;
	gchar* normalized_name;
	ProtonPlusModelsGame* _game;
	gboolean _selected;
};

struct _Block27Data {
	int _ref_count_;
	ProtonPlusWidgetsGamesGameRow* self;
	GtkLabel* label;
};

struct _Block28Data {
	int _ref_count_;
	ProtonPlusWidgetsGamesGameRow* self;
	GtkFileDialog* file_dialog;
};

static gint ProtonPlusWidgetsGamesGameRow_private_offset;
static gpointer proton_plus_widgets_games_game_row_parent_class = NULL;
static ProtonPlusUtilsControllerDirectionalFocusIface * proton_plus_widgets_games_game_row_proton_plus_utils_controller_directional_focus_parent_iface = NULL;
static ProtonPlusUtilsControllerActivationRedirectIface * proton_plus_widgets_games_game_row_proton_plus_utils_controller_activation_redirect_parent_iface = NULL;

static void __lambda91_ (ProtonPlusWidgetsGamesGameRow* self,
                  GtkGestureClick* gesture,
                  gint n_press,
                  gdouble x,
                  gdouble y);
static void proton_plus_widgets_games_game_row_open_install_directory_button_clicked (ProtonPlusWidgetsGamesGameRow* self);
static void ___lambda91__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                             gint n_press,
                                             gdouble x,
                                             gdouble y,
                                             gpointer self);
static void __lambda92_ (ProtonPlusWidgetsGamesGameRow* self,
                  GtkGestureClick* gesture,
                  gint n_press,
                  gdouble x,
                  gdouble y);
static void proton_plus_widgets_games_game_row_open_prefix_directory_button_clicked (ProtonPlusWidgetsGamesGameRow* self);
static void ___lambda92__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                             gint n_press,
                                             gdouble x,
                                             gdouble y,
                                             gpointer self);
static void proton_plus_widgets_games_game_row_load_steam (ProtonPlusWidgetsGamesGameRow* self,
                                                    ProtonPlusModelsGamesSteam* game);
static gboolean proton_plus_widgets_games_game_row_real_focus (GtkWidget* base,
                                                        GtkDirectionType direction);
static gboolean proton_plus_widgets_games_game_row_focus_adjacent_game (ProtonPlusWidgetsGamesGameRow* self,
                                                                 GtkDirectionType direction);
static gboolean proton_plus_widgets_games_game_row_real_controller_focus_direction (ProtonPlusUtilsControllerDirectionalFocus* base,
                                                                             GObject* focused_object,
                                                                             ProtonPlusUtilsControllerNavigationDirection direction);
static ProtonPlusWidgetsGamesGameRow* proton_plus_widgets_games_game_row_find_adjacent_game (ProtonPlusWidgetsGamesGameRow* self,
                                                                                      GtkDirectionType direction);
static gboolean proton_plus_widgets_games_game_row_focus_controller_target (ProtonPlusWidgetsGamesGameRow* self,
                                                                     GtkWidget* target);
static gboolean proton_plus_widgets_games_game_row_focus_horizontal (ProtonPlusWidgetsGamesGameRow* self,
                                                              GtkWidget* focused,
                                                              ProtonPlusUtilsControllerNavigationDirection direction);
static GObject* proton_plus_widgets_games_game_row_real_get_controller_activation_target (ProtonPlusUtilsControllerActivationRedirect* base,
                                                                                   GObject* focused_object);
static GtkWidget* proton_plus_widgets_games_game_row_find_action_ancestor (ProtonPlusWidgetsGamesGameRow* self,
                                                                    GtkWidget* focused);
static gboolean proton_plus_widgets_games_game_row_focus_first_action (ProtonPlusWidgetsGamesGameRow* self);
static gboolean proton_plus_widgets_games_game_row_focus_action_sibling (ProtonPlusWidgetsGamesGameRow* self,
                                                                  GtkWidget* action,
                                                                  gboolean forward);
static GtkWidget* proton_plus_widgets_games_game_row_find_focusable_action (ProtonPlusWidgetsGamesGameRow* self,
                                                                     GtkWidget* current,
                                                                     gboolean forward);
static void proton_plus_widgets_games_game_row_add_hover_underline (ProtonPlusWidgetsGamesGameRow* self,
                                                             GtkLabel* label);
static Block27Data* block27_data_ref (Block27Data* _data27_);
static void block27_data_unref (void * _userdata_);
static void __lambda96_ (Block27Data* _data27_,
                  gdouble x,
                  gdouble y);
static void ___lambda96__gtk_event_controller_motion_enter (GtkEventControllerMotion* _sender,
                                                     gdouble x,
                                                     gdouble y,
                                                     gpointer self);
static void __lambda97_ (Block27Data* _data27_);
static void ___lambda97__gtk_event_controller_motion_leave (GtkEventControllerMotion* _sender,
                                                     gpointer self);
static void __lambda93_ (ProtonPlusWidgetsGamesGameRow* self);
static void ___lambda93__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void proton_plus_widgets_games_game_row_run_custom_executable_button_clicked (ProtonPlusWidgetsGamesGameRow* self);
static void _proton_plus_widgets_games_game_row_run_custom_executable_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                                  gpointer self);
static void proton_plus_widgets_games_game_row_launch_button_clicked (ProtonPlusWidgetsGamesGameRow* self);
static void _proton_plus_widgets_games_game_row_launch_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                   gpointer self);
static Block28Data* block28_data_ref (Block28Data* _data28_);
static void block28_data_unref (void * _userdata_);
static void __lambda94_ (Block28Data* _data28_,
                  GObject* obj,
                  GAsyncResult* res);
static void proton_plus_widgets_games_game_row_run_custom_executable (ProtonPlusWidgetsGamesGameRow* self,
                                                               const gchar* exe_path);
static void ___lambda94__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void proton_plus_widgets_games_game_row_present_error_dialog (ProtonPlusWidgetsGamesGameRow* self,
                                                              AdwAlertDialog* dialog);
static void __lambda95_ (ProtonPlusWidgetsGamesGameRow* self,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda95__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void proton_plus_widgets_games_game_row_finalize (GObject * obj);
static GType proton_plus_widgets_games_game_row_get_type_once (void);
static void _vala_proton_plus_widgets_games_game_row_get_property (GObject * object,
                                                            guint property_id,
                                                            GValue * value,
                                                            GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_game_row_set_property (GObject * object,
                                                            guint property_id,
                                                            const GValue * value,
                                                            GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
proton_plus_widgets_games_game_row_get_instance_private (ProtonPlusWidgetsGamesGameRow* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesGameRow_private_offset);
}

static void
__lambda91_ (ProtonPlusWidgetsGamesGameRow* self,
             GtkGestureClick* gesture,
             gint n_press,
             gdouble x,
             gdouble y)
{
	g_return_if_fail (gesture != NULL);
	if (n_press == 1) {
		proton_plus_widgets_games_game_row_open_install_directory_button_clicked (self);
	}
}

static void
___lambda91__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                        gint n_press,
                                        gdouble x,
                                        gdouble y,
                                        gpointer self)
{
	__lambda91_ ((ProtonPlusWidgetsGamesGameRow*) self, _sender, n_press, x, y);
}

static void
__lambda92_ (ProtonPlusWidgetsGamesGameRow* self,
             GtkGestureClick* gesture,
             gint n_press,
             gdouble x,
             gdouble y)
{
	g_return_if_fail (gesture != NULL);
	if (n_press == 1) {
		proton_plus_widgets_games_game_row_open_prefix_directory_button_clicked (self);
	}
}

static void
___lambda92__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                        gint n_press,
                                        gdouble x,
                                        gdouble y,
                                        gpointer self)
{
	__lambda92_ ((ProtonPlusWidgetsGamesGameRow*) self, _sender, n_press, x, y);
}

ProtonPlusWidgetsGamesGameRow*
proton_plus_widgets_games_game_row_construct (GType object_type,
                                              ProtonPlusModelsGame* game,
                                              gboolean reserve_filter_column,
                                              GtkSizeGroup* prefix_column_size_group,
                                              GtkSizeGroup* tool_column_size_group,
                                              GtkSizeGroup* actions_column_size_group,
                                              GtkSizeGroup* filter_column_size_group,
                                              GtkWidget* controller_up_target,
                                              GtkWidget* controller_down_target)
{
	ProtonPlusWidgetsGamesGameRow * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GtkCheckButton* _tmp3_;
	GtkCheckButton* _tmp4_;
	GtkCheckButton* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GtkLabel* _tmp8_;
	GtkLabel* _tmp9_;
	GtkLabel* _tmp10_;
	const gchar* _tmp11_;
	GtkLabel* _tmp12_;
	GtkLabel* _tmp13_;
	GtkLabel* _tmp14_;
	GtkGestureClick* _tmp15_;
	GtkGestureClick* _tmp16_;
	guint _tmp17_;
	guint _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	GtkLabel* _tmp21_;
	GtkLabel* _tmp22_;
	GtkLabel* _tmp23_;
	GtkLabel* _tmp24_;
	GtkLabel* _tmp25_;
	GtkGestureClick* _tmp27_;
	GtkGestureClick* _tmp28_;
	GtkLabel* _tmp29_;
	GtkLabel* _tmp30_;
	GtkLabel* _tmp31_;
	GtkLabel* _tmp32_;
	GtkLabel* _tmp33_;
	ProtonPlusWidgetsGamesExtraButton* _tmp35_;
	GtkBox* _tmp36_;
	GtkBox* _tmp37_;
	GtkBox* _tmp39_;
	ProtonPlusWidgetsGamesExtraButton* _tmp40_;
	GtkBox* _tmp41_;
	GtkBox* _tmp42_;
	GtkBox* _tmp43_;
	GtkBox* _tmp44_;
	GtkBox* _tmp45_;
	GtkBox* _tmp46_;
	GtkBox* _tmp47_;
	GtkBox* _tmp48_;
	GtkCheckButton* _tmp49_;
	GtkBox* _tmp50_;
	GtkLabel* _tmp51_;
	GtkBox* _tmp59_;
	GtkLabel* _tmp60_;
	GtkBox* _tmp61_;
	GtkLabel* _tmp62_;
	GtkBox* _tmp63_;
	GtkBox* _tmp64_;
	GtkBox* _tmp65_;
	g_return_val_if_fail (game != NULL, NULL);
	self = (ProtonPlusWidgetsGamesGameRow*) g_object_new (object_type, NULL);
	proton_plus_widgets_games_game_row_set_game (self, game);
	self->priv->controller_up_target = controller_up_target;
	self->priv->controller_down_target = controller_down_target;
	_tmp0_ = proton_plus_models_game_get_name (game);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_utf8_strdown (_tmp1_, (gssize) -1);
	_g_free0 (self->priv->normalized_name);
	self->priv->normalized_name = _tmp2_;
	_tmp3_ = (GtkCheckButton*) gtk_check_button_new ();
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->select_check_button);
	self->priv->select_check_button = _tmp3_;
	_tmp4_ = self->priv->select_check_button;
	gtk_widget_set_size_request ((GtkWidget*) _tmp4_, 30, 0);
	_tmp5_ = self->priv->select_check_button;
	g_object_bind_property_with_closures ((GObject*) _tmp5_, "active", (GObject*) self, "selected", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp6_ = proton_plus_models_game_get_name (game);
	_tmp7_ = _tmp6_;
	_tmp8_ = (GtkLabel*) gtk_label_new (_tmp7_);
	g_object_ref_sink (_tmp8_);
	_g_object_unref0 (self->priv->title_label);
	self->priv->title_label = _tmp8_;
	_tmp9_ = self->priv->title_label;
	_tmp10_ = self->priv->title_label;
	_tmp11_ = gtk_label_get_label (_tmp10_);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp9_, _tmp11_);
	_tmp12_ = self->priv->title_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp12_, GTK_ALIGN_START);
	_tmp13_ = self->priv->title_label;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp13_, TRUE);
	_tmp14_ = self->priv->title_label;
	gtk_label_set_ellipsize (_tmp14_, PANGO_ELLIPSIZE_END);
	_tmp15_ = (GtkGestureClick*) gtk_gesture_click_new ();
	_g_object_unref0 (self->priv->title_gesture);
	self->priv->title_gesture = _tmp15_;
	_tmp16_ = self->priv->title_gesture;
	g_signal_connect_object (_tmp16_, "pressed", (GCallback) ___lambda91__gtk_gesture_click_pressed, self, 0);
	_tmp17_ = proton_plus_models_game_get_prefix (game);
	_tmp18_ = _tmp17_;
	_tmp19_ = g_strdup_printf ("%u", _tmp18_);
	_tmp20_ = _tmp19_;
	_tmp21_ = (GtkLabel*) gtk_label_new (_tmp20_);
	g_object_ref_sink (_tmp21_);
	_g_object_unref0 (self->priv->prefix_label);
	self->priv->prefix_label = _tmp21_;
	_g_free0 (_tmp20_);
	_tmp22_ = self->priv->prefix_label;
	gtk_label_set_xalign (_tmp22_, (gfloat) 0);
	_tmp23_ = self->priv->prefix_label;
	gtk_label_set_max_width_chars (_tmp23_, 10);
	_tmp24_ = self->priv->prefix_label;
	gtk_label_set_ellipsize (_tmp24_, PANGO_ELLIPSIZE_END);
	_tmp25_ = self->priv->prefix_label;
	gtk_widget_set_size_request ((GtkWidget*) _tmp25_, 110, 0);
	if (prefix_column_size_group != NULL) {
		GtkLabel* _tmp26_;
		_tmp26_ = self->priv->prefix_label;
		gtk_size_group_add_widget (prefix_column_size_group, (GtkWidget*) _tmp26_);
	}
	_tmp27_ = (GtkGestureClick*) gtk_gesture_click_new ();
	_g_object_unref0 (self->priv->prefix_gesture);
	self->priv->prefix_gesture = _tmp27_;
	_tmp28_ = self->priv->prefix_gesture;
	g_signal_connect_object (_tmp28_, "pressed", (GCallback) ___lambda92__gtk_gesture_click_pressed, self, 0);
	_tmp29_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp29_);
	_g_object_unref0 (self->priv->tool_label);
	self->priv->tool_label = _tmp29_;
	_tmp30_ = self->priv->tool_label;
	gtk_label_set_xalign (_tmp30_, 0.0f);
	_tmp31_ = self->priv->tool_label;
	gtk_label_set_max_width_chars (_tmp31_, 30);
	_tmp32_ = self->priv->tool_label;
	gtk_label_set_ellipsize (_tmp32_, PANGO_ELLIPSIZE_END);
	_tmp33_ = self->priv->tool_label;
	gtk_widget_set_size_request ((GtkWidget*) _tmp33_, 254, 0);
	if (tool_column_size_group != NULL) {
		GtkLabel* _tmp34_;
		_tmp34_ = self->priv->tool_label;
		gtk_size_group_add_widget (tool_column_size_group, (GtkWidget*) _tmp34_);
	}
	proton_plus_widgets_games_game_row_refresh_tool_label (self);
	_tmp35_ = proton_plus_widgets_games_extra_button_new (game);
	g_object_ref_sink (_tmp35_);
	_g_object_unref0 (self->priv->extra_button);
	self->priv->extra_button = _tmp35_;
	_tmp36_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
	g_object_ref_sink (_tmp36_);
	_g_object_unref0 (self->priv->other_box);
	self->priv->other_box = _tmp36_;
	_tmp37_ = self->priv->other_box;
	gtk_widget_set_size_request ((GtkWidget*) _tmp37_, 122, 0);
	if (actions_column_size_group != NULL) {
		GtkBox* _tmp38_;
		_tmp38_ = self->priv->other_box;
		gtk_size_group_add_widget (actions_column_size_group, (GtkWidget*) _tmp38_);
	}
	_tmp39_ = self->priv->other_box;
	_tmp40_ = self->priv->extra_button;
	gtk_box_append (_tmp39_, (GtkWidget*) _tmp40_);
	_tmp41_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
	g_object_ref_sink (_tmp41_);
	_g_object_unref0 (self->priv->content_box);
	self->priv->content_box = _tmp41_;
	_tmp42_ = self->priv->content_box;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp42_, TRUE);
	_tmp43_ = self->priv->content_box;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp43_, 12);
	_tmp44_ = self->priv->content_box;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp44_, 12);
	_tmp45_ = self->priv->content_box;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp45_, 12);
	_tmp46_ = self->priv->content_box;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp46_, 12);
	_tmp47_ = self->priv->content_box;
	gtk_widget_set_valign ((GtkWidget*) _tmp47_, GTK_ALIGN_CENTER);
	_tmp48_ = self->priv->content_box;
	_tmp49_ = self->priv->select_check_button;
	gtk_box_append (_tmp48_, (GtkWidget*) _tmp49_);
	_tmp50_ = self->priv->content_box;
	_tmp51_ = self->priv->title_label;
	gtk_box_append (_tmp50_, (GtkWidget*) _tmp51_);
	if (reserve_filter_column) {
		GtkMenuButton* filter_column_spacer = NULL;
		gchar* _tmp52_;
		gchar* _tmp53_;
		gchar** _tmp54_;
		GtkMenuButton* _tmp55_ = NULL;
		GtkBox* _tmp57_;
		GtkMenuButton* _tmp58_;
		_tmp52_ = g_strdup ("filter-2-symbolic");
		_tmp53_ = g_strdup ("flat");
		_tmp54_ = g_new0 (gchar*, 1 + 1);
		_tmp54_[0] = _tmp53_;
		_tmp55_ = (GtkMenuButton*) gtk_menu_button_new ();
		gtk_menu_button_set_icon_name (_tmp55_, _tmp52_);
		_g_free0 (_tmp52_);
		gtk_widget_set_sensitive ((GtkWidget*) _tmp55_, FALSE);
		gtk_widget_set_focusable ((GtkWidget*) _tmp55_, FALSE);
		gtk_widget_set_opacity ((GtkWidget*) _tmp55_, 0.0);
		gtk_widget_set_css_classes ((GtkWidget*) _tmp55_, _tmp54_);
		_tmp54_ = (_vala_array_free (_tmp54_, 1, (GDestroyNotify) g_free), NULL);
		g_object_ref_sink (_tmp55_);
		filter_column_spacer = _tmp55_;
		if (filter_column_size_group != NULL) {
			GtkMenuButton* _tmp56_;
			_tmp56_ = filter_column_spacer;
			gtk_size_group_add_widget (filter_column_size_group, (GtkWidget*) _tmp56_);
		}
		_tmp57_ = self->priv->content_box;
		_tmp58_ = filter_column_spacer;
		gtk_box_append (_tmp57_, (GtkWidget*) _tmp58_);
		_g_object_unref0 (filter_column_spacer);
	}
	_tmp59_ = self->priv->content_box;
	_tmp60_ = self->priv->prefix_label;
	gtk_box_append (_tmp59_, (GtkWidget*) _tmp60_);
	_tmp61_ = self->priv->content_box;
	_tmp62_ = self->priv->tool_label;
	gtk_box_append (_tmp61_, (GtkWidget*) _tmp62_);
	_tmp63_ = self->priv->content_box;
	_tmp64_ = self->priv->other_box;
	gtk_box_append (_tmp63_, (GtkWidget*) _tmp64_);
	if (PROTON_PLUS_MODELS_GAMES_IS_STEAM (game)) {
		proton_plus_widgets_games_game_row_load_steam (self, G_TYPE_CHECK_INSTANCE_CAST (game, PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteam));
	}
	_tmp65_ = self->priv->content_box;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp65_);
	gtk_list_box_row_set_selectable ((GtkListBoxRow*) self, FALSE);
	return self;
}

ProtonPlusWidgetsGamesGameRow*
proton_plus_widgets_games_game_row_new (ProtonPlusModelsGame* game,
                                        gboolean reserve_filter_column,
                                        GtkSizeGroup* prefix_column_size_group,
                                        GtkSizeGroup* tool_column_size_group,
                                        GtkSizeGroup* actions_column_size_group,
                                        GtkSizeGroup* filter_column_size_group,
                                        GtkWidget* controller_up_target,
                                        GtkWidget* controller_down_target)
{
	return proton_plus_widgets_games_game_row_construct (PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ROW, game, reserve_filter_column, prefix_column_size_group, tool_column_size_group, actions_column_size_group, filter_column_size_group, controller_up_target, controller_down_target);
}

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

static gboolean
proton_plus_widgets_games_game_row_real_focus (GtkWidget* base,
                                               GtkDirectionType direction)
{
	ProtonPlusWidgetsGamesGameRow * self;
	GtkRoot* root = NULL;
	GtkRoot* _tmp0_;
	GtkRoot* _tmp1_;
	GtkRoot* _tmp2_ = NULL;
	GtkRoot* _tmp3_;
	GtkWidget* _tmp4_ = NULL;
	GtkWidget* focused = NULL;
	GtkWidget* _tmp6_;
	gboolean _tmp7_ = FALSE;
	GtkWidget* _tmp8_;
	gboolean _tmp13_ = FALSE;
	gboolean result;
	self = (ProtonPlusWidgetsGamesGameRow*) base;
	_tmp0_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	root = _tmp1_;
	_tmp3_ = root;
	_tmp2_ = _tmp3_;
	_tmp4_ = NULL;
	if (_tmp2_ != NULL) {
		GtkWidget* _tmp5_;
		_tmp5_ = gtk_root_get_focus (_tmp2_);
		_tmp4_ = _tmp5_;
	}
	_tmp6_ = _g_object_ref0 (_tmp4_);
	focused = _tmp6_;
	_tmp8_ = focused;
	if (_tmp8_ == NULL) {
		_tmp7_ = TRUE;
	} else {
		gboolean _tmp9_ = FALSE;
		GtkWidget* _tmp10_;
		_tmp10_ = focused;
		if (_tmp10_ != G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget)) {
			GtkWidget* _tmp11_;
			_tmp11_ = focused;
			_tmp9_ = !gtk_widget_is_ancestor (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget), (GtkWidget*) self);
		} else {
			_tmp9_ = FALSE;
		}
		_tmp7_ = _tmp9_;
	}
	if (_tmp7_) {
		gboolean _tmp12_ = FALSE;
		if (direction == GTK_DIR_UP) {
			_tmp12_ = TRUE;
		} else {
			_tmp12_ = direction == GTK_DIR_DOWN;
		}
		if (_tmp12_) {
			result = gtk_widget_grab_focus ((GtkWidget*) self);
			_g_object_unref0 (focused);
			_g_object_unref0 (root);
			return result;
		}
		result = GTK_WIDGET_CLASS (proton_plus_widgets_games_game_row_parent_class)->focus ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), direction);
		_g_object_unref0 (focused);
		_g_object_unref0 (root);
		return result;
	}
	if (direction == GTK_DIR_UP) {
		_tmp13_ = TRUE;
	} else {
		_tmp13_ = direction == GTK_DIR_DOWN;
	}
	if (_tmp13_) {
		result = proton_plus_widgets_games_game_row_focus_adjacent_game (self, direction);
		_g_object_unref0 (focused);
		_g_object_unref0 (root);
		return result;
	}
	result = GTK_WIDGET_CLASS (proton_plus_widgets_games_game_row_parent_class)->focus ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), direction);
	_g_object_unref0 (focused);
	_g_object_unref0 (root);
	return result;
}

static gboolean
proton_plus_widgets_games_game_row_real_controller_focus_direction (ProtonPlusUtilsControllerDirectionalFocus* base,
                                                                    GObject* focused_object,
                                                                    ProtonPlusUtilsControllerNavigationDirection direction)
{
	ProtonPlusWidgetsGamesGameRow * self;
	GtkWidget* focused = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean result;
	self = (ProtonPlusWidgetsGamesGameRow*) base;
	g_return_val_if_fail (focused_object != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (focused_object, gtk_widget_get_type ()) ? ((GtkWidget*) focused_object) : NULL);
	focused = _tmp0_;
	_tmp1_ = focused;
	if (_tmp1_ == NULL) {
		result = FALSE;
		_g_object_unref0 (focused);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
		ProtonPlusWidgetsGamesGameRow* _tmp3_;
		ProtonPlusWidgetsGamesGameRow* _tmp4_;
		_tmp3_ = proton_plus_widgets_games_game_row_find_adjacent_game (self, GTK_DIR_UP);
		_tmp4_ = _tmp3_;
		_tmp2_ = _tmp4_ == NULL;
		_g_object_unref0 (_tmp4_);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GtkWidget* _tmp5_;
		_tmp5_ = self->priv->controller_up_target;
		result = proton_plus_widgets_games_game_row_focus_controller_target (self, _tmp5_);
		_g_object_unref0 (focused);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN) {
		ProtonPlusWidgetsGamesGameRow* _tmp7_;
		ProtonPlusWidgetsGamesGameRow* _tmp8_;
		_tmp7_ = proton_plus_widgets_games_game_row_find_adjacent_game (self, GTK_DIR_DOWN);
		_tmp8_ = _tmp7_;
		_tmp6_ = _tmp8_ == NULL;
		_g_object_unref0 (_tmp8_);
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		GtkWidget* _tmp9_;
		_tmp9_ = self->priv->controller_down_target;
		result = proton_plus_widgets_games_game_row_focus_controller_target (self, _tmp9_);
		_g_object_unref0 (focused);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_LEFT) {
		_tmp10_ = TRUE;
	} else {
		_tmp10_ = direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_RIGHT;
	}
	if (_tmp10_) {
		GtkWidget* _tmp11_;
		_tmp11_ = focused;
		result = proton_plus_widgets_games_game_row_focus_horizontal (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget), direction);
		_g_object_unref0 (focused);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (focused);
	return result;
}

static GObject*
proton_plus_widgets_games_game_row_real_get_controller_activation_target (ProtonPlusUtilsControllerActivationRedirect* base,
                                                                          GObject* focused_object)
{
	ProtonPlusWidgetsGamesGameRow * self;
	GtkWidget* focused = NULL;
	GtkWidget* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkWidget* _tmp2_;
	GtkCheckButton* _tmp6_;
	GObject* _tmp7_;
	GObject* result;
	self = (ProtonPlusWidgetsGamesGameRow*) base;
	g_return_val_if_fail (focused_object != NULL, NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (focused_object, gtk_widget_get_type ()) ? ((GtkWidget*) focused_object) : NULL);
	focused = _tmp0_;
	_tmp2_ = focused;
	if (_tmp2_ == NULL) {
		_tmp1_ = TRUE;
	} else {
		GtkWidget* _tmp3_;
		GtkWidget* _tmp4_;
		GtkWidget* _tmp5_;
		_tmp3_ = focused;
		_tmp4_ = proton_plus_widgets_games_game_row_find_action_ancestor (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget));
		_tmp5_ = _tmp4_;
		_tmp1_ = _tmp5_ != NULL;
		_g_object_unref0 (_tmp5_);
	}
	if (_tmp1_) {
		result = NULL;
		_g_object_unref0 (focused);
		return result;
	}
	_tmp6_ = self->priv->select_check_button;
	_tmp7_ = _g_object_ref0 ((GObject*) _tmp6_);
	result = _tmp7_;
	_g_object_unref0 (focused);
	return result;
}

static gboolean
proton_plus_widgets_games_game_row_focus_horizontal (ProtonPlusWidgetsGamesGameRow* self,
                                                     GtkWidget* focused,
                                                     ProtonPlusUtilsControllerNavigationDirection direction)
{
	GtkWidget* action = NULL;
	GtkWidget* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (focused != NULL, FALSE);
	_tmp0_ = proton_plus_widgets_games_game_row_find_action_ancestor (self, focused);
	action = _tmp0_;
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_RIGHT) {
		GtkWidget* _tmp1_;
		GtkWidget* _tmp2_;
		_tmp1_ = action;
		if (_tmp1_ == NULL) {
			result = proton_plus_widgets_games_game_row_focus_first_action (self);
			_g_object_unref0 (action);
			return result;
		}
		_tmp2_ = action;
		result = proton_plus_widgets_games_game_row_focus_action_sibling (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), TRUE);
		_g_object_unref0 (action);
		return result;
	} else {
		GtkWidget* _tmp3_;
		GtkWidget* previous = NULL;
		GtkWidget* _tmp5_;
		GtkWidget* _tmp6_;
		gboolean _tmp7_ = FALSE;
		GtkWidget* _tmp8_;
		_tmp3_ = action;
		if (_tmp3_ == NULL) {
			GtkCheckButton* _tmp4_;
			_tmp4_ = self->priv->select_check_button;
			result = gtk_widget_grab_focus ((GtkWidget*) _tmp4_);
			_g_object_unref0 (action);
			return result;
		}
		_tmp5_ = action;
		_tmp6_ = proton_plus_widgets_games_game_row_find_focusable_action (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget), FALSE);
		previous = _tmp6_;
		_tmp8_ = previous;
		if (_tmp8_ != NULL) {
			GtkWidget* _tmp9_;
			_tmp9_ = previous;
			_tmp7_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget));
		} else {
			_tmp7_ = gtk_widget_grab_focus ((GtkWidget*) self);
		}
		result = _tmp7_;
		_g_object_unref0 (previous);
		_g_object_unref0 (action);
		return result;
	}
}

static gboolean
proton_plus_widgets_games_game_row_focus_adjacent_game (ProtonPlusWidgetsGamesGameRow* self,
                                                        GtkDirectionType direction)
{
	ProtonPlusWidgetsGamesGameRow* adjacent = NULL;
	ProtonPlusWidgetsGamesGameRow* _tmp0_;
	ProtonPlusWidgetsGamesGameRow* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = proton_plus_widgets_games_game_row_find_adjacent_game (self, direction);
	adjacent = _tmp0_;
	_tmp1_ = adjacent;
	if (_tmp1_ != NULL) {
		ProtonPlusWidgetsGamesGameRow* _tmp2_;
		_tmp2_ = adjacent;
		result = gtk_widget_grab_focus ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ROW, ProtonPlusWidgetsGamesGameRow));
		_g_object_unref0 (adjacent);
		return result;
	}
	if (direction == GTK_DIR_UP) {
		GtkWidget* _tmp3_;
		_tmp3_ = self->priv->controller_up_target;
		result = proton_plus_widgets_games_game_row_focus_controller_target (self, _tmp3_);
		_g_object_unref0 (adjacent);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (adjacent);
	return result;
}

static ProtonPlusWidgetsGamesGameRow*
proton_plus_widgets_games_game_row_find_adjacent_game (ProtonPlusWidgetsGamesGameRow* self,
                                                       GtkDirectionType direction)
{
	GtkWidget* _tmp0_ = NULL;
	GtkWidget* sibling = NULL;
	GtkWidget* _tmp3_;
	ProtonPlusWidgetsGamesGameRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (direction == GTK_DIR_UP) {
		GtkWidget* _tmp1_;
		_tmp1_ = gtk_widget_get_prev_sibling ((GtkWidget*) self);
		_tmp0_ = _tmp1_;
	} else {
		GtkWidget* _tmp2_;
		_tmp2_ = gtk_widget_get_next_sibling ((GtkWidget*) self);
		_tmp0_ = _tmp2_;
	}
	_tmp3_ = _g_object_ref0 (_tmp0_);
	sibling = _tmp3_;
	while (TRUE) {
		GtkWidget* _tmp4_;
		gboolean _tmp5_ = FALSE;
		gboolean _tmp6_ = FALSE;
		gboolean _tmp7_ = FALSE;
		gboolean _tmp8_ = FALSE;
		gboolean _tmp9_ = FALSE;
		GtkWidget* _tmp10_;
		GtkWidget* _tmp18_ = NULL;
		GtkWidget* _tmp23_;
		_tmp4_ = sibling;
		if (!(_tmp4_ != NULL)) {
			break;
		}
		_tmp10_ = sibling;
		if (PROTON_PLUS_WIDGETS_GAMES_IS_GAME_ROW (_tmp10_)) {
			GtkWidget* _tmp11_;
			_tmp11_ = sibling;
			_tmp9_ = gtk_widget_get_mapped (_tmp11_);
		} else {
			_tmp9_ = FALSE;
		}
		if (_tmp9_) {
			GtkWidget* _tmp12_;
			_tmp12_ = sibling;
			_tmp8_ = gtk_widget_is_visible (_tmp12_);
		} else {
			_tmp8_ = FALSE;
		}
		if (_tmp8_) {
			GtkWidget* _tmp13_;
			_tmp13_ = sibling;
			_tmp7_ = gtk_widget_get_child_visible (_tmp13_);
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			GtkWidget* _tmp14_;
			_tmp14_ = sibling;
			_tmp6_ = gtk_widget_is_sensitive (_tmp14_);
		} else {
			_tmp6_ = FALSE;
		}
		if (_tmp6_) {
			GtkWidget* _tmp15_;
			_tmp15_ = sibling;
			_tmp5_ = gtk_widget_get_focusable (_tmp15_);
		} else {
			_tmp5_ = FALSE;
		}
		if (_tmp5_) {
			GtkWidget* _tmp16_;
			ProtonPlusWidgetsGamesGameRow* _tmp17_;
			_tmp16_ = sibling;
			_tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ROW, ProtonPlusWidgetsGamesGameRow));
			result = _tmp17_;
			_g_object_unref0 (sibling);
			return result;
		}
		if (direction == GTK_DIR_UP) {
			GtkWidget* _tmp19_;
			GtkWidget* _tmp20_;
			_tmp19_ = sibling;
			_tmp20_ = gtk_widget_get_prev_sibling (_tmp19_);
			_tmp18_ = _tmp20_;
		} else {
			GtkWidget* _tmp21_;
			GtkWidget* _tmp22_;
			_tmp21_ = sibling;
			_tmp22_ = gtk_widget_get_next_sibling (_tmp21_);
			_tmp18_ = _tmp22_;
		}
		_tmp23_ = _g_object_ref0 (_tmp18_);
		_g_object_unref0 (sibling);
		sibling = _tmp23_;
	}
	result = NULL;
	_g_object_unref0 (sibling);
	return result;
}

static gboolean
proton_plus_widgets_games_game_row_focus_controller_target (ProtonPlusWidgetsGamesGameRow* self,
                                                            GtkWidget* target)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (target != NULL) {
		_tmp3_ = gtk_widget_get_mapped (G_TYPE_CHECK_INSTANCE_CAST (target, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		_tmp2_ = gtk_widget_is_visible (G_TYPE_CHECK_INSTANCE_CAST (target, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		_tmp1_ = gtk_widget_is_sensitive (G_TYPE_CHECK_INSTANCE_CAST (target, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (target, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gboolean
proton_plus_widgets_games_game_row_focus_first_action (ProtonPlusWidgetsGamesGameRow* self)
{
	GtkWidget* child = NULL;
	GtkWidget* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkWidget* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = proton_plus_widgets_games_game_row_find_focusable_action (self, NULL, TRUE);
	child = _tmp0_;
	_tmp2_ = child;
	if (_tmp2_ != NULL) {
		GtkWidget* _tmp3_;
		_tmp3_ = child;
		_tmp1_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp1_ = FALSE;
	}
	result = _tmp1_;
	_g_object_unref0 (child);
	return result;
}

static gboolean
proton_plus_widgets_games_game_row_focus_action_sibling (ProtonPlusWidgetsGamesGameRow* self,
                                                         GtkWidget* action,
                                                         gboolean forward)
{
	GtkWidget* sibling = NULL;
	GtkWidget* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkWidget* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (action != NULL, FALSE);
	_tmp0_ = proton_plus_widgets_games_game_row_find_focusable_action (self, action, forward);
	sibling = _tmp0_;
	_tmp2_ = sibling;
	if (_tmp2_ != NULL) {
		GtkWidget* _tmp3_;
		_tmp3_ = sibling;
		_tmp1_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp1_ = gtk_widget_grab_focus (action);
	}
	result = _tmp1_;
	_g_object_unref0 (sibling);
	return result;
}

static GtkWidget*
proton_plus_widgets_games_game_row_find_focusable_action (ProtonPlusWidgetsGamesGameRow* self,
                                                          GtkWidget* current,
                                                          gboolean forward)
{
	GtkWidget* child = NULL;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (current == NULL) {
		GtkWidget* _tmp0_ = NULL;
		GtkWidget* _tmp5_;
		if (forward) {
			GtkBox* _tmp1_;
			GtkWidget* _tmp2_;
			_tmp1_ = self->priv->other_box;
			_tmp2_ = gtk_widget_get_first_child ((GtkWidget*) _tmp1_);
			_tmp0_ = _tmp2_;
		} else {
			GtkBox* _tmp3_;
			GtkWidget* _tmp4_;
			_tmp3_ = self->priv->other_box;
			_tmp4_ = gtk_widget_get_last_child ((GtkWidget*) _tmp3_);
			_tmp0_ = _tmp4_;
		}
		_tmp5_ = _g_object_ref0 (_tmp0_);
		_g_object_unref0 (child);
		child = _tmp5_;
	} else {
		GtkWidget* _tmp6_ = NULL;
		GtkWidget* _tmp9_;
		if (forward) {
			GtkWidget* _tmp7_;
			_tmp7_ = gtk_widget_get_next_sibling (current);
			_tmp6_ = _tmp7_;
		} else {
			GtkWidget* _tmp8_;
			_tmp8_ = gtk_widget_get_prev_sibling (current);
			_tmp6_ = _tmp8_;
		}
		_tmp9_ = _g_object_ref0 (_tmp6_);
		_g_object_unref0 (child);
		child = _tmp9_;
	}
	while (TRUE) {
		GtkWidget* _tmp10_;
		gboolean _tmp11_ = FALSE;
		gboolean _tmp12_ = FALSE;
		gboolean _tmp13_ = FALSE;
		GtkWidget* _tmp14_;
		GtkWidget* _tmp18_ = NULL;
		GtkWidget* _tmp23_;
		_tmp10_ = child;
		if (!(_tmp10_ != NULL)) {
			break;
		}
		_tmp14_ = child;
		if (gtk_widget_get_mapped (_tmp14_)) {
			GtkWidget* _tmp15_;
			_tmp15_ = child;
			_tmp13_ = gtk_widget_is_visible (_tmp15_);
		} else {
			_tmp13_ = FALSE;
		}
		if (_tmp13_) {
			GtkWidget* _tmp16_;
			_tmp16_ = child;
			_tmp12_ = gtk_widget_is_sensitive (_tmp16_);
		} else {
			_tmp12_ = FALSE;
		}
		if (_tmp12_) {
			GtkWidget* _tmp17_;
			_tmp17_ = child;
			_tmp11_ = gtk_widget_get_focusable (_tmp17_);
		} else {
			_tmp11_ = FALSE;
		}
		if (_tmp11_) {
			result = child;
			return result;
		}
		if (forward) {
			GtkWidget* _tmp19_;
			GtkWidget* _tmp20_;
			_tmp19_ = child;
			_tmp20_ = gtk_widget_get_next_sibling (_tmp19_);
			_tmp18_ = _tmp20_;
		} else {
			GtkWidget* _tmp21_;
			GtkWidget* _tmp22_;
			_tmp21_ = child;
			_tmp22_ = gtk_widget_get_prev_sibling (_tmp21_);
			_tmp18_ = _tmp22_;
		}
		_tmp23_ = _g_object_ref0 (_tmp18_);
		_g_object_unref0 (child);
		child = _tmp23_;
	}
	result = NULL;
	_g_object_unref0 (child);
	return result;
}

static GtkWidget*
proton_plus_widgets_games_game_row_find_action_ancestor (ProtonPlusWidgetsGamesGameRow* self,
                                                         GtkWidget* focused)
{
	GtkWidget* current = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (focused != NULL, NULL);
	_tmp0_ = _g_object_ref0 (focused);
	current = _tmp0_;
	while (TRUE) {
		gboolean _tmp1_ = FALSE;
		GtkWidget* _tmp2_;
		GtkWidget* _tmp5_;
		GtkWidget* _tmp6_;
		GtkBox* _tmp7_;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp10_;
		_tmp2_ = current;
		if (_tmp2_ != NULL) {
			GtkWidget* _tmp3_;
			GtkBox* _tmp4_;
			_tmp3_ = current;
			_tmp4_ = self->priv->other_box;
			_tmp1_ = _tmp3_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget);
		} else {
			_tmp1_ = FALSE;
		}
		if (!_tmp1_) {
			break;
		}
		_tmp5_ = current;
		_tmp6_ = gtk_widget_get_parent (_tmp5_);
		_tmp7_ = self->priv->other_box;
		if (_tmp6_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget)) {
			result = current;
			return result;
		}
		_tmp8_ = current;
		_tmp9_ = gtk_widget_get_parent (_tmp8_);
		_tmp10_ = _g_object_ref0 (_tmp9_);
		_g_object_unref0 (current);
		current = _tmp10_;
	}
	result = NULL;
	_g_object_unref0 (current);
	return result;
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

gboolean
proton_plus_widgets_games_game_row_matches_search (ProtonPlusWidgetsGamesGameRow* self,
                                                   const gchar* query)
{
	const gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (query != NULL, FALSE);
	_tmp0_ = self->priv->normalized_name;
	result = string_contains (_tmp0_, query);
	return result;
}

static Block27Data*
block27_data_ref (Block27Data* _data27_)
{
	g_atomic_int_inc (&_data27_->_ref_count_);
	return _data27_;
}

static void
block27_data_unref (void * _userdata_)
{
	Block27Data* _data27_;
	_data27_ = (Block27Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data27_->_ref_count_)) {
		ProtonPlusWidgetsGamesGameRow* self;
		self = _data27_->self;
		_g_object_unref0 (_data27_->label);
		_g_object_unref0 (self);
		g_slice_free (Block27Data, _data27_);
	}
}

static void
__lambda96_ (Block27Data* _data27_,
             gdouble x,
             gdouble y)
{
	ProtonPlusWidgetsGamesGameRow* self;
	PangoAttrList* list = NULL;
	PangoAttrList* _tmp0_;
	PangoAttribute* _tmp1_;
	self = _data27_->self;
	_tmp0_ = pango_attr_list_new ();
	list = _tmp0_;
	_tmp1_ = pango_attr_underline_new (PANGO_UNDERLINE_SINGLE);
	pango_attr_list_insert (list, _tmp1_);
	gtk_label_set_attributes (_data27_->label, list);
	_pango_attr_list_unref0 (list);
}

static void
___lambda96__gtk_event_controller_motion_enter (GtkEventControllerMotion* _sender,
                                                gdouble x,
                                                gdouble y,
                                                gpointer self)
{
	__lambda96_ (self, x, y);
}

static void
__lambda97_ (Block27Data* _data27_)
{
	ProtonPlusWidgetsGamesGameRow* self;
	self = _data27_->self;
	gtk_label_set_attributes (_data27_->label, NULL);
}

static void
___lambda97__gtk_event_controller_motion_leave (GtkEventControllerMotion* _sender,
                                                gpointer self)
{
	__lambda97_ (self);
}

static void
proton_plus_widgets_games_game_row_add_hover_underline (ProtonPlusWidgetsGamesGameRow* self,
                                                        GtkLabel* label)
{
	Block27Data* _data27_;
	GtkLabel* _tmp0_;
	GtkEventControllerMotion* motion = NULL;
	GtkEventControllerMotion* _tmp1_;
	GtkEventController* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (label != NULL);
	_data27_ = g_slice_new0 (Block27Data);
	_data27_->_ref_count_ = 1;
	_data27_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (label);
	_g_object_unref0 (_data27_->label);
	_data27_->label = _tmp0_;
	_tmp1_ = (GtkEventControllerMotion*) gtk_event_controller_motion_new ();
	motion = _tmp1_;
	g_signal_connect_data (motion, "enter", (GCallback) ___lambda96__gtk_event_controller_motion_enter, block27_data_ref (_data27_), (GClosureNotify) block27_data_unref, 0);
	g_signal_connect_data (motion, "leave", (GCallback) ___lambda97__gtk_event_controller_motion_leave, block27_data_ref (_data27_), (GClosureNotify) block27_data_unref, 0);
	_tmp2_ = _g_object_ref0 ((GtkEventController*) motion);
	gtk_widget_add_controller ((GtkWidget*) _data27_->label, _tmp2_);
	_g_object_unref0 (motion);
	block27_data_unref (_data27_);
	_data27_ = NULL;
}

void
proton_plus_widgets_games_game_row_refresh_tool_label (ProtonPlusWidgetsGamesGameRow* self)
{
	gchar* tool_name = NULL;
	gchar* _tmp0_;
	gboolean _tmp1_ = FALSE;
	ProtonPlusModelsGame* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GtkLabel* _tmp30_;
	const gchar* _tmp31_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (_ ("Default"));
	tool_name = _tmp0_;
	_tmp2_ = self->priv->_game;
	_tmp3_ = proton_plus_models_game_get_compatibility_tool (_tmp2_);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (_tmp4_, "Default") == 0) {
		ProtonPlusModelsGame* _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
		_tmp5_ = self->priv->_game;
		_tmp6_ = proton_plus_models_game_get_is_native (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = _tmp7_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gchar* _tmp8_;
		_tmp8_ = g_strdup (_ ("Native"));
		_g_free0 (tool_name);
		tool_name = _tmp8_;
	} else {
		{
			GeeLinkedList* _tool_list = NULL;
			ProtonPlusModelsGame* _tmp9_;
			ProtonPlusModelsLauncher* _tmp10_;
			ProtonPlusModelsLauncher* _tmp11_;
			GeeLinkedList* _tmp12_;
			gint _tool_size = 0;
			GeeLinkedList* _tmp13_;
			gint _tmp14_;
			gint _tmp15_;
			gint _tool_index = 0;
			_tmp9_ = self->priv->_game;
			_tmp10_ = proton_plus_models_game_get_launcher (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = _tmp11_->compatibility_tools;
			_tool_list = _tmp12_;
			_tmp13_ = _tool_list;
			_tmp14_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp13_);
			_tmp15_ = _tmp14_;
			_tool_size = _tmp15_;
			_tool_index = -1;
			while (TRUE) {
				gint _tmp16_;
				gint _tmp17_;
				ProtonPlusModelsCompatibilityTool* tool = NULL;
				GeeLinkedList* _tmp18_;
				gpointer _tmp19_;
				ProtonPlusModelsCompatibilityTool* _tmp20_;
				const gchar* _tmp21_;
				const gchar* _tmp22_;
				ProtonPlusModelsGame* _tmp23_;
				const gchar* _tmp24_;
				const gchar* _tmp25_;
				_tool_index = _tool_index + 1;
				_tmp16_ = _tool_index;
				_tmp17_ = _tool_size;
				if (!(_tmp16_ < _tmp17_)) {
					break;
				}
				_tmp18_ = _tool_list;
				_tmp19_ = gee_abstract_list_get ((GeeAbstractList*) _tmp18_, _tool_index);
				tool = (ProtonPlusModelsCompatibilityTool*) _tmp19_;
				_tmp20_ = tool;
				_tmp21_ = proton_plus_models_compatibility_tool_get_internal_title (_tmp20_);
				_tmp22_ = _tmp21_;
				_tmp23_ = self->priv->_game;
				_tmp24_ = proton_plus_models_game_get_compatibility_tool (_tmp23_);
				_tmp25_ = _tmp24_;
				if (g_strcmp0 (_tmp22_, _tmp25_) == 0) {
					ProtonPlusModelsCompatibilityTool* _tmp26_;
					const gchar* _tmp27_;
					const gchar* _tmp28_;
					gchar* _tmp29_;
					_tmp26_ = tool;
					_tmp27_ = proton_plus_models_compatibility_tool_get_display_title (_tmp26_);
					_tmp28_ = _tmp27_;
					_tmp29_ = g_strdup (_tmp28_);
					_g_free0 (tool_name);
					tool_name = _tmp29_;
					_g_object_unref0 (tool);
					break;
				}
				_g_object_unref0 (tool);
			}
		}
	}
	_tmp30_ = self->priv->tool_label;
	_tmp31_ = tool_name;
	gtk_label_set_label (_tmp30_, _tmp31_);
	_g_free0 (tool_name);
}

static void
__lambda93_ (ProtonPlusWidgetsGamesGameRow* self)
{
	g_signal_emit (self, proton_plus_widgets_games_game_row_signals[PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_MASS_EDIT_REQUESTED_SIGNAL], 0, self);
}

static void
___lambda93__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda93_ ((ProtonPlusWidgetsGamesGameRow*) self);
}

static void
_proton_plus_widgets_games_game_row_run_custom_executable_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                             gpointer self)
{
	proton_plus_widgets_games_game_row_run_custom_executable_button_clicked ((ProtonPlusWidgetsGamesGameRow*) self);
}

static void
_proton_plus_widgets_games_game_row_launch_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                              gpointer self)
{
	proton_plus_widgets_games_game_row_launch_button_clicked ((ProtonPlusWidgetsGamesGameRow*) self);
}

static void
proton_plus_widgets_games_game_row_load_steam (ProtonPlusWidgetsGamesGameRow* self,
                                               ProtonPlusModelsGamesSteam* game)
{
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	GtkButton* _tmp6_;
	GtkButton* _tmp7_;
	GtkButton* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	GtkButton* _tmp11_;
	GtkButton* _tmp12_;
	GtkButton* _tmp13_;
	GtkButton* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp22_;
	const gchar* _tmp23_;
	GtkBox* _tmp29_;
	GtkButton* _tmp30_;
	GtkBox* _tmp31_;
	GtkButton* _tmp32_;
	GtkBox* _tmp33_;
	GtkButton* _tmp34_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (game != NULL);
	_tmp0_ = (GtkButton*) gtk_button_new_from_icon_name ("screwdriver-wrench-symbolic");
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->tool_button);
	self->priv->tool_button = _tmp0_;
	_tmp1_ = self->priv->tool_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp1_, _ ("Modify the game"));
	_tmp2_ = self->priv->tool_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp2_, "flat");
	_tmp3_ = self->priv->tool_button;
	g_signal_connect_object (_tmp3_, "clicked", (GCallback) ___lambda93__gtk_button_clicked, self, 0);
	_tmp4_ = (GtkButton*) gtk_button_new_from_icon_name ("rocket-symbolic");
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->run_custom_executable_button);
	self->priv->run_custom_executable_button = _tmp4_;
	_tmp5_ = self->priv->run_custom_executable_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp5_, _ ("Launch custom executable"));
	_tmp6_ = self->priv->run_custom_executable_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp6_, "flat");
	_tmp7_ = self->priv->run_custom_executable_button;
	g_signal_connect_object (_tmp7_, "clicked", (GCallback) _proton_plus_widgets_games_game_row_run_custom_executable_button_clicked_gtk_button_clicked, self, 0);
	_tmp8_ = self->priv->run_custom_executable_button;
	_tmp9_ = proton_plus_models_game_get_prefixdir ((ProtonPlusModelsGame*) game);
	_tmp10_ = _tmp9_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp8_, g_file_test (_tmp10_, G_FILE_TEST_IS_DIR));
	_tmp11_ = (GtkButton*) gtk_button_new_from_icon_name ("play-fill");
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->launch_button);
	self->priv->launch_button = _tmp11_;
	_tmp12_ = self->priv->launch_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp12_, _ ("Launch game"));
	_tmp13_ = self->priv->launch_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp13_, "flat");
	_tmp14_ = self->priv->launch_button;
	g_signal_connect_object (_tmp14_, "clicked", (GCallback) _proton_plus_widgets_games_game_row_launch_button_clicked_gtk_button_clicked, self, 0);
	_tmp15_ = proton_plus_models_game_get_installdir ((ProtonPlusModelsGame*) game);
	_tmp16_ = _tmp15_;
	if (g_file_test (_tmp16_, G_FILE_TEST_IS_DIR)) {
		GtkLabel* _tmp17_;
		GtkLabel* _tmp18_;
		GtkGestureClick* _tmp19_;
		GtkEventController* _tmp20_;
		GtkLabel* _tmp21_;
		_tmp17_ = self->priv->title_label;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp17_, _ ("Browse game install directory"));
		_tmp18_ = self->priv->title_label;
		_tmp19_ = self->priv->title_gesture;
		_tmp20_ = _g_object_ref0 ((GtkEventController*) _tmp19_);
		gtk_widget_add_controller ((GtkWidget*) _tmp18_, _tmp20_);
		_tmp21_ = self->priv->title_label;
		proton_plus_widgets_games_game_row_add_hover_underline (self, _tmp21_);
	}
	_tmp22_ = proton_plus_models_game_get_prefixdir ((ProtonPlusModelsGame*) game);
	_tmp23_ = _tmp22_;
	if (g_file_test (_tmp23_, G_FILE_TEST_IS_DIR)) {
		GtkLabel* _tmp24_;
		GtkLabel* _tmp25_;
		GtkGestureClick* _tmp26_;
		GtkEventController* _tmp27_;
		GtkLabel* _tmp28_;
		_tmp24_ = self->priv->prefix_label;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp24_, _ ("Browse prefix directory"));
		_tmp25_ = self->priv->prefix_label;
		_tmp26_ = self->priv->prefix_gesture;
		_tmp27_ = _g_object_ref0 ((GtkEventController*) _tmp26_);
		gtk_widget_add_controller ((GtkWidget*) _tmp25_, _tmp27_);
		_tmp28_ = self->priv->prefix_label;
		proton_plus_widgets_games_game_row_add_hover_underline (self, _tmp28_);
	}
	_tmp29_ = self->priv->other_box;
	_tmp30_ = self->priv->launch_button;
	gtk_box_prepend (_tmp29_, (GtkWidget*) _tmp30_);
	_tmp31_ = self->priv->other_box;
	_tmp32_ = self->priv->run_custom_executable_button;
	gtk_box_prepend (_tmp31_, (GtkWidget*) _tmp32_);
	_tmp33_ = self->priv->other_box;
	_tmp34_ = self->priv->tool_button;
	gtk_box_prepend (_tmp33_, (GtkWidget*) _tmp34_);
}

static void
proton_plus_widgets_games_game_row_open_install_directory_button_clicked (ProtonPlusWidgetsGamesGameRow* self)
{
	ProtonPlusModelsGame* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_game;
	_tmp1_ = proton_plus_models_game_get_installdir (_tmp0_);
	_tmp2_ = _tmp1_;
	proton_plus_utils_system_open_path (_tmp2_);
}

static void
proton_plus_widgets_games_game_row_open_prefix_directory_button_clicked (ProtonPlusWidgetsGamesGameRow* self)
{
	ProtonPlusModelsGame* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_game;
	_tmp1_ = proton_plus_models_game_get_prefixdir (_tmp0_);
	_tmp2_ = _tmp1_;
	proton_plus_utils_system_open_path (_tmp2_);
}

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_)) {
		ProtonPlusWidgetsGamesGameRow* self;
		self = _data28_->self;
		_g_object_unref0 (_data28_->file_dialog);
		_g_object_unref0 (self);
		g_slice_free (Block28Data, _data28_);
	}
}

static void
__lambda94_ (Block28Data* _data28_,
             GObject* obj,
             GAsyncResult* res)
{
	ProtonPlusWidgetsGamesGameRow* self;
	GError* _inner_error0_ = NULL;
	self = _data28_->self;
	g_return_if_fail (res != NULL);
	{
		GFile* file = NULL;
		GFile* _tmp0_;
		_tmp0_ = gtk_file_dialog_open_finish (_data28_->file_dialog, res, &_inner_error0_);
		file = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		if (file != NULL) {
			gchar* _tmp1_;
			gchar* _tmp2_;
			_tmp1_ = g_file_get_path (file);
			_tmp2_ = _tmp1_;
			proton_plus_widgets_games_game_row_run_custom_executable (self, _tmp2_);
			_g_free0 (_tmp2_);
		}
		_g_object_unref0 (file);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp3_ = e;
		_tmp4_ = _tmp3_->message;
		g_warning ("games-row.vala:352: %s", _tmp4_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda94__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda94_ (self, source_object, res);
	block28_data_unref (self);
}

static void
proton_plus_widgets_games_game_row_run_custom_executable_button_clicked (ProtonPlusWidgetsGamesGameRow* self)
{
	Block28Data* _data28_;
	GtkFileDialog* _tmp0_;
	GListStore* filters = NULL;
	GListStore* _tmp1_;
	GtkFileFilter* filter = NULL;
	GtkFileFilter* _tmp2_;
	GtkRoot* _tmp3_;
	g_return_if_fail (self != NULL);
	_data28_ = g_slice_new0 (Block28Data);
	_data28_->_ref_count_ = 1;
	_data28_->self = g_object_ref (self);
	_tmp0_ = gtk_file_dialog_new ();
	_data28_->file_dialog = _tmp0_;
	gtk_file_dialog_set_title (_data28_->file_dialog, _ ("Select executable"));
	_tmp1_ = g_list_store_new (gtk_file_filter_get_type ());
	filters = _tmp1_;
	_tmp2_ = gtk_file_filter_new ();
	filter = _tmp2_;
	gtk_file_filter_add_pattern (filter, "*.exe");
	gtk_file_filter_add_pattern (filter, "*.msi");
	gtk_file_filter_add_pattern (filter, "*.msu");
	gtk_file_filter_add_pattern (filter, "*.bat");
	g_object_set (filter, "name", _ ("Executables (*.exe, *.msi, *.msu, *.bat)"), NULL);
	g_list_store_append (filters, (GObject*) filter);
	gtk_file_dialog_set_filters (_data28_->file_dialog, (GListModel*) filters);
	_tmp3_ = gtk_widget_get_root ((GtkWidget*) self);
	gtk_file_dialog_open (_data28_->file_dialog, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_window_get_type (), GtkWindow), NULL, ___lambda94__gasync_ready_callback, block28_data_ref (_data28_));
	_g_object_unref0 (filter);
	_g_object_unref0 (filters);
	block28_data_unref (_data28_);
	_data28_ = NULL;
}

static void
proton_plus_widgets_games_game_row_launch_button_clicked (ProtonPlusWidgetsGamesGameRow* self)
{
	ProtonPlusModelsGame* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_game;
	if (PROTON_PLUS_MODELS_GAMES_IS_STEAM (_tmp0_)) {
		ProtonPlusModelsGamesSteam* steam_game = NULL;
		ProtonPlusModelsGame* _tmp1_;
		ProtonPlusModelsGamesSteam* _tmp2_;
		gchar* uri = NULL;
		ProtonPlusModelsGamesSteam* _tmp3_;
		guint _tmp4_;
		guint _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		const gchar* _tmp10_;
		_tmp1_ = self->priv->_game;
		_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteam));
		steam_game = _tmp2_;
		_tmp3_ = steam_game;
		_tmp4_ = proton_plus_models_games_steam_get_appid (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = g_strdup_printf ("%u", _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = g_strconcat ("steam://run/", _tmp7_, NULL);
		_tmp9_ = _tmp8_;
		_g_free0 (_tmp7_);
		uri = _tmp9_;
		_tmp10_ = uri;
		proton_plus_utils_system_open_uri (_tmp10_);
		_g_free0 (uri);
		_g_object_unref0 (steam_game);
	}
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static void
__lambda95_ (ProtonPlusWidgetsGamesGameRow* self,
             GObject* obj,
             GAsyncResult* res)
{
	ProtonPlusUtilsCommandResult* _result_ = NULL;
	ProtonPlusUtilsCommandResult* _tmp0_;
	ProtonPlusUtilsCommandResult* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gchar* diagnostic = NULL;
	ProtonPlusUtilsCommandResult* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* details = NULL;
	ProtonPlusUtilsCommandResult* _tmp13_;
	gint _tmp14_;
	gint _tmp15_;
	gchar* _tmp16_;
	const gchar* _tmp17_;
	ProtonPlusWidgetsMainErrorDialog* dialog = NULL;
	ProtonPlusModelsGame* _tmp21_;
	const gchar* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	const gchar* _tmp26_;
	ProtonPlusWidgetsMainErrorDialog* _tmp27_;
	ProtonPlusWidgetsMainErrorDialog* _tmp28_;
	ProtonPlusWidgetsMainErrorDialog* _tmp29_;
	g_return_if_fail (res != NULL);
	_tmp0_ = proton_plus_utils_system_run_command_finish (res);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	_tmp2_ = proton_plus_utils_command_result_get_exit_status (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == 0) {
		_g_object_unref0 (_result_);
		return;
	}
	_tmp4_ = _result_;
	_tmp5_ = proton_plus_utils_command_result_get_stderr (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = string_strip (_tmp6_);
	diagnostic = _tmp7_;
	_tmp8_ = diagnostic;
	if (g_strcmp0 (_tmp8_, "") == 0) {
		ProtonPlusUtilsCommandResult* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		gchar* _tmp12_;
		_tmp9_ = _result_;
		_tmp10_ = proton_plus_utils_command_result_get_stdout (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = string_strip (_tmp11_);
		_g_free0 (diagnostic);
		diagnostic = _tmp12_;
	}
	_tmp13_ = _result_;
	_tmp14_ = proton_plus_utils_command_result_get_exit_status (_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = g_strdup_printf (_ ("Exit status: %d"), _tmp15_);
	details = _tmp16_;
	_tmp17_ = diagnostic;
	if (g_strcmp0 (_tmp17_, "") != 0) {
		const gchar* _tmp18_;
		const gchar* _tmp19_;
		gchar* _tmp20_;
		_tmp18_ = details;
		_tmp19_ = diagnostic;
		_tmp20_ = g_strdup_printf ("%s\n\n%s", _tmp18_, _tmp19_);
		_g_free0 (details);
		details = _tmp20_;
	}
	_tmp21_ = self->priv->_game;
	_tmp22_ = proton_plus_models_game_get_name (_tmp21_);
	_tmp23_ = _tmp22_;
	_tmp24_ = g_strdup_printf (_ ("The custom executable for %s could not be launched."), _tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = details;
	_tmp27_ = proton_plus_widgets_main_error_dialog_new (_ ("Custom Executable Failed"), _tmp25_, _tmp26_);
	g_object_ref_sink (_tmp27_);
	_tmp28_ = _tmp27_;
	_g_free0 (_tmp25_);
	dialog = _tmp28_;
	_tmp29_ = dialog;
	proton_plus_widgets_games_game_row_present_error_dialog (self, (AdwAlertDialog*) _tmp29_);
	_g_object_unref0 (dialog);
	_g_free0 (details);
	_g_free0 (diagnostic);
	_g_object_unref0 (_result_);
}

static void
___lambda95__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda95_ ((ProtonPlusWidgetsGamesGameRow*) self, source_object, res);
	g_object_unref (self);
}

static void
proton_plus_widgets_games_game_row_run_custom_executable (ProtonPlusWidgetsGamesGameRow* self,
                                                          const gchar* exe_path)
{
	ProtonPlusModelsLaunchersSteam* steam = NULL;
	ProtonPlusModelsGame* _tmp0_;
	ProtonPlusModelsLauncher* _tmp1_;
	ProtonPlusModelsLauncher* _tmp2_;
	ProtonPlusModelsLaunchersSteam* _tmp3_;
	ProtonPlusModelsLaunchersSteam* _tmp4_ = NULL;
	ProtonPlusModelsLaunchersSteam* _tmp5_;
	gchar* _tmp6_ = NULL;
	gchar* proton_path = NULL;
	gchar* _tmp11_;
	const gchar* _tmp12_;
	gchar* steam_compat_data_path = NULL;
	ProtonPlusModelsGame* _tmp21_;
	const gchar* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* steam_compat_client_install_path = NULL;
	ProtonPlusModelsGame* _tmp25_;
	ProtonPlusModelsLauncher* _tmp26_;
	ProtonPlusModelsLauncher* _tmp27_;
	const gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* inner_command = NULL;
	const gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	const gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	const gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	const gchar* _tmp43_;
	gchar* _tmp44_;
	gchar* _tmp45_;
	gchar* _tmp46_;
	gchar* _tmp47_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (exe_path != NULL);
	_tmp0_ = self->priv->_game;
	_tmp1_ = proton_plus_models_game_get_launcher (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (_tmp2_) ? ((ProtonPlusModelsLaunchersSteam*) _tmp2_) : NULL);
	steam = _tmp3_;
	_tmp5_ = steam;
	_tmp4_ = _tmp5_;
	_tmp6_ = NULL;
	if (_tmp4_ != NULL) {
		ProtonPlusModelsGame* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp7_ = self->priv->_game;
		_tmp8_ = proton_plus_models_game_get_compatibility_tool (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = proton_plus_models_launchers_steam_resolve_effective_proton_executable (_tmp4_, _tmp9_);
		_g_free0 (_tmp6_);
		_tmp6_ = _tmp10_;
	}
	_tmp11_ = _tmp6_;
	_tmp6_ = NULL;
	proton_path = _tmp11_;
	_tmp12_ = proton_path;
	if (_tmp12_ == NULL) {
		ProtonPlusWidgetsMainErrorDialog* dialog = NULL;
		ProtonPlusModelsGame* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		ProtonPlusWidgetsMainErrorDialog* _tmp18_;
		ProtonPlusWidgetsMainErrorDialog* _tmp19_;
		ProtonPlusWidgetsMainErrorDialog* _tmp20_;
		_tmp13_ = self->priv->_game;
		_tmp14_ = proton_plus_models_game_get_name (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = g_strdup_printf (_ ("The compatibility tool required for %s is missing from your system. Pl" \
"ease ensure it is correctly installed."), _tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = proton_plus_widgets_main_error_dialog_new (_ ("Compatibility Tool Not Found"), _tmp17_, "");
		g_object_ref_sink (_tmp18_);
		_tmp19_ = _tmp18_;
		_g_free0 (_tmp17_);
		dialog = _tmp19_;
		_tmp20_ = dialog;
		proton_plus_widgets_games_game_row_present_error_dialog (self, (AdwAlertDialog*) _tmp20_);
		_g_object_unref0 (dialog);
		_g_free0 (proton_path);
		_g_free0 (_tmp6_);
		_g_object_unref0 (steam);
		return;
	}
	_tmp21_ = self->priv->_game;
	_tmp22_ = proton_plus_models_game_get_prefixdir (_tmp21_);
	_tmp23_ = _tmp22_;
	_tmp24_ = g_strdup (_tmp23_);
	steam_compat_data_path = _tmp24_;
	_tmp25_ = self->priv->_game;
	_tmp26_ = proton_plus_models_game_get_launcher (_tmp25_);
	_tmp27_ = _tmp26_;
	_tmp28_ = _tmp27_->directory;
	_tmp29_ = g_strdup (_tmp28_);
	steam_compat_client_install_path = _tmp29_;
	_tmp30_ = steam_compat_data_path;
	_tmp31_ = g_shell_quote (_tmp30_);
	_tmp32_ = _tmp31_;
	_tmp33_ = steam_compat_client_install_path;
	_tmp34_ = g_shell_quote (_tmp33_);
	_tmp35_ = _tmp34_;
	_tmp36_ = proton_path;
	_tmp37_ = g_shell_quote (_tmp36_);
	_tmp38_ = _tmp37_;
	_tmp39_ = g_shell_quote (exe_path);
	_tmp40_ = _tmp39_;
	_tmp41_ = g_strdup_printf ("STEAM_COMPAT_DATA_PATH=%s STEAM_COMPAT_CLIENT_INSTALL_PATH=%s %s run %" \
"s", _tmp32_, _tmp35_, _tmp38_, _tmp40_);
	_tmp42_ = _tmp41_;
	_g_free0 (_tmp40_);
	_g_free0 (_tmp38_);
	_g_free0 (_tmp35_);
	_g_free0 (_tmp32_);
	inner_command = _tmp42_;
	_tmp43_ = inner_command;
	_tmp44_ = g_shell_quote (_tmp43_);
	_tmp45_ = _tmp44_;
	_tmp46_ = g_strconcat ("sh -c ", _tmp45_, NULL);
	_tmp47_ = _tmp46_;
	proton_plus_utils_system_run_command (_tmp47_, ___lambda95__gasync_ready_callback, g_object_ref (self));
	_g_free0 (_tmp47_);
	_g_free0 (_tmp45_);
	_g_free0 (inner_command);
	_g_free0 (steam_compat_client_install_path);
	_g_free0 (steam_compat_data_path);
	_g_free0 (proton_path);
	_g_free0 (_tmp6_);
	_g_object_unref0 (steam);
}

static void
proton_plus_widgets_games_game_row_present_error_dialog (ProtonPlusWidgetsGamesGameRow* self,
                                                         AdwAlertDialog* dialog)
{
	GtkWindow* root = NULL;
	GtkRoot* _tmp0_;
	GtkWindow* _tmp1_;
	GtkWindow* _tmp2_;
	GtkWindow* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dialog != NULL);
	_tmp0_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp0_) : NULL);
	root = _tmp1_;
	_tmp2_ = root;
	if (_tmp2_ == NULL) {
		_g_object_unref0 (root);
		return;
	}
	_tmp3_ = root;
	proton_plus_widgets_window_present_dialog_for_controller ((AdwDialog*) dialog, (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_window_get_type (), GtkWindow));
	_g_object_unref0 (root);
}

ProtonPlusModelsGame*
proton_plus_widgets_games_game_row_get_game (ProtonPlusWidgetsGamesGameRow* self)
{
	ProtonPlusModelsGame* result;
	ProtonPlusModelsGame* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_game;
	result = _tmp0_;
	return result;
}

void
proton_plus_widgets_games_game_row_set_game (ProtonPlusWidgetsGamesGameRow* self,
                                             ProtonPlusModelsGame* value)
{
	ProtonPlusModelsGame* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_row_get_game (self);
	if (old_value != value) {
		ProtonPlusModelsGame* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_game);
		self->priv->_game = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_row_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_GAME_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_game_row_get_selected (ProtonPlusWidgetsGamesGameRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_selected;
	return result;
}

void
proton_plus_widgets_games_game_row_set_selected (ProtonPlusWidgetsGamesGameRow* self,
                                                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_row_get_selected (self);
	if (old_value != value) {
		self->priv->_selected = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_row_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_SELECTED_PROPERTY]);
	}
}

static void
proton_plus_widgets_games_game_row_class_init (ProtonPlusWidgetsGamesGameRowClass * klass,
                                               gpointer klass_data)
{
	proton_plus_widgets_games_game_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesGameRow_private_offset);
	((GtkWidgetClass *) klass)->focus = (gboolean (*) (GtkWidget*, GtkDirectionType)) proton_plus_widgets_games_game_row_real_focus;
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_game_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_game_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_game_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_GAME_PROPERTY, proton_plus_widgets_games_game_row_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_GAME_PROPERTY] = g_param_spec_object ("game", "game", "game", PROTON_PLUS_MODELS_TYPE_GAME, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_SELECTED_PROPERTY, proton_plus_widgets_games_game_row_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_SELECTED_PROPERTY] = g_param_spec_boolean ("selected", "selected", "selected", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	proton_plus_widgets_games_game_row_signals[PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_MASS_EDIT_REQUESTED_SIGNAL] = g_signal_new ("mass-edit-requested", PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ROW);
}

static void
proton_plus_widgets_games_game_row_proton_plus_utils_controller_directional_focus_interface_init (ProtonPlusUtilsControllerDirectionalFocusIface * iface,
                                                                                                  gpointer iface_data)
{
	proton_plus_widgets_games_game_row_proton_plus_utils_controller_directional_focus_parent_iface = g_type_interface_peek_parent (iface);
	iface->controller_focus_direction = (gboolean (*) (ProtonPlusUtilsControllerDirectionalFocus*, GObject*, ProtonPlusUtilsControllerNavigationDirection)) proton_plus_widgets_games_game_row_real_controller_focus_direction;
}

static void
proton_plus_widgets_games_game_row_proton_plus_utils_controller_activation_redirect_interface_init (ProtonPlusUtilsControllerActivationRedirectIface * iface,
                                                                                                    gpointer iface_data)
{
	proton_plus_widgets_games_game_row_proton_plus_utils_controller_activation_redirect_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_controller_activation_target = (GObject* (*) (ProtonPlusUtilsControllerActivationRedirect*, GObject*)) proton_plus_widgets_games_game_row_real_get_controller_activation_target;
}

static void
proton_plus_widgets_games_game_row_instance_init (ProtonPlusWidgetsGamesGameRow * self,
                                                  gpointer klass)
{
	self->priv = proton_plus_widgets_games_game_row_get_instance_private (self);
}

static void
proton_plus_widgets_games_game_row_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesGameRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ROW, ProtonPlusWidgetsGamesGameRow);
	_g_object_unref0 (self->priv->title_gesture);
	_g_object_unref0 (self->priv->prefix_gesture);
	_g_object_unref0 (self->priv->select_check_button);
	_g_object_unref0 (self->priv->title_label);
	_g_object_unref0 (self->priv->prefix_label);
	_g_object_unref0 (self->priv->tool_label);
	_g_object_unref0 (self->priv->tool_button);
	_g_object_unref0 (self->priv->launch_button);
	_g_object_unref0 (self->priv->run_custom_executable_button);
	_g_object_unref0 (self->priv->extra_button);
	_g_object_unref0 (self->priv->other_box);
	_g_object_unref0 (self->priv->content_box);
	_g_free0 (self->priv->normalized_name);
	_g_object_unref0 (self->priv->_game);
	G_OBJECT_CLASS (proton_plus_widgets_games_game_row_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_game_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesGameRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_game_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesGameRow), 0, (GInstanceInitFunc) proton_plus_widgets_games_game_row_instance_init, NULL };
	static const GInterfaceInfo proton_plus_utils_controller_directional_focus_info = { (GInterfaceInitFunc) proton_plus_widgets_games_game_row_proton_plus_utils_controller_directional_focus_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo proton_plus_utils_controller_activation_redirect_info = { (GInterfaceInitFunc) proton_plus_widgets_games_game_row_proton_plus_utils_controller_activation_redirect_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_widgets_games_game_row_type_id;
	proton_plus_widgets_games_game_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "ProtonPlusWidgetsGamesGameRow", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_widgets_games_game_row_type_id, PROTON_PLUS_UTILS_TYPE_CONTROLLER_DIRECTIONAL_FOCUS, &proton_plus_utils_controller_directional_focus_info);
	g_type_add_interface_static (proton_plus_widgets_games_game_row_type_id, PROTON_PLUS_UTILS_TYPE_CONTROLLER_ACTIVATION_REDIRECT, &proton_plus_utils_controller_activation_redirect_info);
	ProtonPlusWidgetsGamesGameRow_private_offset = g_type_add_instance_private (proton_plus_widgets_games_game_row_type_id, sizeof (ProtonPlusWidgetsGamesGameRowPrivate));
	return proton_plus_widgets_games_game_row_type_id;
}

GType
proton_plus_widgets_games_game_row_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_game_row_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_game_row_type_id__once)) {
		GType proton_plus_widgets_games_game_row_type_id;
		proton_plus_widgets_games_game_row_type_id = proton_plus_widgets_games_game_row_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_game_row_type_id__once, proton_plus_widgets_games_game_row_type_id);
	}
	return proton_plus_widgets_games_game_row_type_id__once;
}

static void
_vala_proton_plus_widgets_games_game_row_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesGameRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ROW, ProtonPlusWidgetsGamesGameRow);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_GAME_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_game_row_get_game (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_SELECTED_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_game_row_get_selected (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_games_game_row_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesGameRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ROW, ProtonPlusWidgetsGamesGameRow);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_GAME_PROPERTY:
		proton_plus_widgets_games_game_row_set_game (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_SELECTED_PROPERTY:
		proton_plus_widgets_games_game_row_set_selected (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

