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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <pango/pango.h>
#include <glib/gi18n-lib.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_GAME_ROW (proton_plus_widgets_game_row_get_type ())
#define PROTON_PLUS_WIDGETS_GAME_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_GAME_ROW, ProtonPlusWidgetsGameRow))
#define PROTON_PLUS_WIDGETS_GAME_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_GAME_ROW, ProtonPlusWidgetsGameRowClass))
#define PROTON_PLUS_WIDGETS_IS_GAME_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_GAME_ROW))
#define PROTON_PLUS_WIDGETS_IS_GAME_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_GAME_ROW))
#define PROTON_PLUS_WIDGETS_GAME_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_GAME_ROW, ProtonPlusWidgetsGameRowClass))

typedef struct _ProtonPlusWidgetsGameRow ProtonPlusWidgetsGameRow;
typedef struct _ProtonPlusWidgetsGameRowClass ProtonPlusWidgetsGameRowClass;
typedef struct _ProtonPlusWidgetsGameRowPrivate ProtonPlusWidgetsGameRowPrivate;

#define PROTON_PLUS_WIDGETS_TYPE_COMPATIBILITY_TOOL_DROP_DOWN (proton_plus_widgets_compatibility_tool_drop_down_get_type ())
#define PROTON_PLUS_WIDGETS_COMPATIBILITY_TOOL_DROP_DOWN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_COMPATIBILITY_TOOL_DROP_DOWN, ProtonPlusWidgetsCompatibilityToolDropDown))
#define PROTON_PLUS_WIDGETS_COMPATIBILITY_TOOL_DROP_DOWN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_COMPATIBILITY_TOOL_DROP_DOWN, ProtonPlusWidgetsCompatibilityToolDropDownClass))
#define PROTON_PLUS_WIDGETS_IS_COMPATIBILITY_TOOL_DROP_DOWN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_COMPATIBILITY_TOOL_DROP_DOWN))
#define PROTON_PLUS_WIDGETS_IS_COMPATIBILITY_TOOL_DROP_DOWN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_COMPATIBILITY_TOOL_DROP_DOWN))
#define PROTON_PLUS_WIDGETS_COMPATIBILITY_TOOL_DROP_DOWN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_COMPATIBILITY_TOOL_DROP_DOWN, ProtonPlusWidgetsCompatibilityToolDropDownClass))

typedef struct _ProtonPlusWidgetsCompatibilityToolDropDown ProtonPlusWidgetsCompatibilityToolDropDown;
typedef struct _ProtonPlusWidgetsCompatibilityToolDropDownClass ProtonPlusWidgetsCompatibilityToolDropDownClass;

#define PROTON_PLUS_WIDGETS_TYPE_EXTRA_BUTTON (proton_plus_widgets_extra_button_get_type ())
#define PROTON_PLUS_WIDGETS_EXTRA_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_EXTRA_BUTTON, ProtonPlusWidgetsExtraButton))
#define PROTON_PLUS_WIDGETS_EXTRA_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_EXTRA_BUTTON, ProtonPlusWidgetsExtraButtonClass))
#define PROTON_PLUS_WIDGETS_IS_EXTRA_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_EXTRA_BUTTON))
#define PROTON_PLUS_WIDGETS_IS_EXTRA_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_EXTRA_BUTTON))
#define PROTON_PLUS_WIDGETS_EXTRA_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_EXTRA_BUTTON, ProtonPlusWidgetsExtraButtonClass))

typedef struct _ProtonPlusWidgetsExtraButton ProtonPlusWidgetsExtraButton;
typedef struct _ProtonPlusWidgetsExtraButtonClass ProtonPlusWidgetsExtraButtonClass;

#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;
enum  {
	PROTON_PLUS_WIDGETS_GAME_ROW_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAME_ROW_GAME_PROPERTY,
	PROTON_PLUS_WIDGETS_GAME_ROW_SELECTED_PROPERTY,
	PROTON_PLUS_WIDGETS_GAME_ROW_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_game_row_properties[PROTON_PLUS_WIDGETS_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))

#define PROTON_PLUS_MODELS_GAMES_TYPE_STEAM (proton_plus_models_games_steam_get_type ())
#define PROTON_PLUS_MODELS_GAMES_STEAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteam))
#define PROTON_PLUS_MODELS_GAMES_STEAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteamClass))
#define PROTON_PLUS_MODELS_GAMES_IS_STEAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM))
#define PROTON_PLUS_MODELS_GAMES_IS_STEAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM))
#define PROTON_PLUS_MODELS_GAMES_STEAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteamClass))

typedef struct _ProtonPlusModelsGamesSteam ProtonPlusModelsGamesSteam;
typedef struct _ProtonPlusModelsGamesSteamClass ProtonPlusModelsGamesSteamClass;
enum  {
	PROTON_PLUS_WIDGETS_GAME_ROW_LAUNCH_OPTIONS_REQUESTED_SIGNAL,
	PROTON_PLUS_WIDGETS_GAME_ROW_NUM_SIGNALS
};
static guint proton_plus_widgets_game_row_signals[PROTON_PLUS_WIDGETS_GAME_ROW_NUM_SIGNALS] = {0};

struct _ProtonPlusWidgetsGameRow {
	GtkListBoxRow parent_instance;
	ProtonPlusWidgetsGameRowPrivate * priv;
	ProtonPlusWidgetsCompatibilityToolDropDown* compatibility_tool_dropdown;
};

struct _ProtonPlusWidgetsGameRowClass {
	GtkListBoxRowClass parent_class;
};

struct _ProtonPlusWidgetsGameRowPrivate {
	GtkLabel* title_label;
	GtkLabel* prefix_label;
	GtkButton* launch_options_button;
	GtkButton* anticheat_button;
	GtkButton* protondb_button;
	ProtonPlusWidgetsExtraButton* extra_button;
	GtkBox* content_box;
	ProtonPlusModelsGame* _game;
	gboolean _selected;
};

static gint ProtonPlusWidgetsGameRow_private_offset;
static gpointer proton_plus_widgets_game_row_parent_class = NULL;

VALA_EXTERN GType proton_plus_widgets_game_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsGameRow, g_object_unref)
VALA_EXTERN GType proton_plus_widgets_compatibility_tool_drop_down_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsCompatibilityToolDropDown, g_object_unref)
VALA_EXTERN GType proton_plus_widgets_extra_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsExtraButton, g_object_unref)
VALA_EXTERN GType proton_plus_models_game_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGame, g_object_unref)
VALA_EXTERN ProtonPlusWidgetsGameRow* proton_plus_widgets_game_row_new (ProtonPlusModelsGame* game,
                                                            GListStore* model,
                                                            GtkPropertyExpression* expression);
VALA_EXTERN ProtonPlusWidgetsGameRow* proton_plus_widgets_game_row_construct (GType object_type,
                                                                  ProtonPlusModelsGame* game,
                                                                  GListStore* model,
                                                                  GtkPropertyExpression* expression);
VALA_EXTERN void proton_plus_widgets_game_row_set_game (ProtonPlusWidgetsGameRow* self,
                                            ProtonPlusModelsGame* value);
VALA_EXTERN const gchar* proton_plus_models_game_get_name (ProtonPlusModelsGame* self);
VALA_EXTERN guint proton_plus_models_game_get_prefix (ProtonPlusModelsGame* self);
VALA_EXTERN ProtonPlusWidgetsCompatibilityToolDropDown* proton_plus_widgets_compatibility_tool_drop_down_new (ProtonPlusModelsGame* game,
                                                                                                  GListStore* model,
                                                                                                  GtkPropertyExpression* expression);
VALA_EXTERN ProtonPlusWidgetsCompatibilityToolDropDown* proton_plus_widgets_compatibility_tool_drop_down_construct (GType object_type,
                                                                                                        ProtonPlusModelsGame* game,
                                                                                                        GListStore* model,
                                                                                                        GtkPropertyExpression* expression);
VALA_EXTERN ProtonPlusWidgetsExtraButton* proton_plus_widgets_extra_button_new (ProtonPlusModelsGame* game);
VALA_EXTERN ProtonPlusWidgetsExtraButton* proton_plus_widgets_extra_button_construct (GType object_type,
                                                                          ProtonPlusModelsGame* game);
VALA_EXTERN GType proton_plus_models_games_steam_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGamesSteam, g_object_unref)
static void proton_plus_widgets_game_row_load_steam (ProtonPlusWidgetsGameRow* self,
                                              ProtonPlusModelsGamesSteam* game);
static void proton_plus_widgets_game_row_launch_options_button_clicked (ProtonPlusWidgetsGameRow* self);
static void _proton_plus_widgets_game_row_launch_options_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                     gpointer self);
VALA_EXTERN const gchar* proton_plus_models_games_steam_get_awacy_status (ProtonPlusModelsGamesSteam* self);
static void proton_plus_widgets_game_row_anticheat_button_clicked (ProtonPlusWidgetsGameRow* self);
static void _proton_plus_widgets_game_row_anticheat_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                gpointer self);
static void proton_plus_widgets_game_row_protondb_button_clicked (ProtonPlusWidgetsGameRow* self);
static void _proton_plus_widgets_game_row_protondb_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                               gpointer self);
VALA_EXTERN gboolean proton_plus_models_games_steam_get_is_non_steam (ProtonPlusModelsGamesSteam* self);
VALA_EXTERN ProtonPlusModelsGame* proton_plus_widgets_game_row_get_game (ProtonPlusWidgetsGameRow* self);
VALA_EXTERN const gchar* proton_plus_models_games_steam_get_awacy_name (ProtonPlusModelsGamesSteam* self);
VALA_EXTERN void proton_plus_utils_system_open_uri (const gchar* uri);
VALA_EXTERN guint proton_plus_models_games_steam_get_appid (ProtonPlusModelsGamesSteam* self);
VALA_EXTERN gboolean proton_plus_widgets_game_row_get_selected (ProtonPlusWidgetsGameRow* self);
VALA_EXTERN void proton_plus_widgets_game_row_set_selected (ProtonPlusWidgetsGameRow* self,
                                                gboolean value);
static void proton_plus_widgets_game_row_finalize (GObject * obj);
static GType proton_plus_widgets_game_row_get_type_once (void);
static void _vala_proton_plus_widgets_game_row_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec);
static void _vala_proton_plus_widgets_game_row_set_property (GObject * object,
                                                      guint property_id,
                                                      const GValue * value,
                                                      GParamSpec * pspec);

static inline gpointer
proton_plus_widgets_game_row_get_instance_private (ProtonPlusWidgetsGameRow* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGameRow_private_offset);
}

ProtonPlusWidgetsGameRow*
proton_plus_widgets_game_row_construct (GType object_type,
                                        ProtonPlusModelsGame* game,
                                        GListStore* model,
                                        GtkPropertyExpression* expression)
{
	ProtonPlusWidgetsGameRow * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	const gchar* _tmp5_;
	GtkLabel* _tmp6_;
	GtkLabel* _tmp7_;
	GtkLabel* _tmp8_;
	guint _tmp9_;
	guint _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GtkLabel* _tmp13_;
	GtkLabel* _tmp14_;
	GtkLabel* _tmp15_;
	const gchar* _tmp16_;
	GtkLabel* _tmp17_;
	GtkLabel* _tmp18_;
	GtkLabel* _tmp19_;
	GtkLabel* _tmp20_;
	ProtonPlusWidgetsCompatibilityToolDropDown* _tmp21_;
	ProtonPlusWidgetsExtraButton* _tmp22_;
	GtkBox* _tmp23_;
	GtkBox* _tmp24_;
	GtkBox* _tmp25_;
	GtkBox* _tmp26_;
	GtkBox* _tmp27_;
	GtkBox* _tmp28_;
	GtkBox* _tmp29_;
	GtkLabel* _tmp30_;
	GtkBox* _tmp31_;
	GtkLabel* _tmp32_;
	GtkBox* _tmp33_;
	ProtonPlusWidgetsCompatibilityToolDropDown* _tmp34_;
	GtkBox* _tmp35_;
	ProtonPlusWidgetsExtraButton* _tmp36_;
	GtkBox* _tmp37_;
	g_return_val_if_fail (game != NULL, NULL);
	g_return_val_if_fail (model != NULL, NULL);
	g_return_val_if_fail (expression != NULL, NULL);
	self = (ProtonPlusWidgetsGameRow*) g_object_new (object_type, NULL);
	proton_plus_widgets_game_row_set_game (self, game);
	_tmp0_ = proton_plus_models_game_get_name (game);
	_tmp1_ = _tmp0_;
	_tmp2_ = (GtkLabel*) gtk_label_new (_tmp1_);
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->title_label);
	self->priv->title_label = _tmp2_;
	_tmp3_ = self->priv->title_label;
	_tmp4_ = self->priv->title_label;
	_tmp5_ = gtk_label_get_label (_tmp4_);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp3_, _tmp5_);
	_tmp6_ = self->priv->title_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_START);
	_tmp7_ = self->priv->title_label;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp7_, TRUE);
	_tmp8_ = self->priv->title_label;
	gtk_label_set_ellipsize (_tmp8_, PANGO_ELLIPSIZE_END);
	_tmp9_ = proton_plus_models_game_get_prefix (game);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_strdup_printf ("%u", _tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = (GtkLabel*) gtk_label_new (_tmp12_);
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->prefix_label);
	self->priv->prefix_label = _tmp13_;
	_g_free0 (_tmp12_);
	_tmp14_ = self->priv->prefix_label;
	_tmp15_ = self->priv->prefix_label;
	_tmp16_ = gtk_label_get_label (_tmp15_);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp14_, _tmp16_);
	_tmp17_ = self->priv->prefix_label;
	gtk_label_set_max_width_chars (_tmp17_, 10);
	_tmp18_ = self->priv->prefix_label;
	gtk_label_set_ellipsize (_tmp18_, PANGO_ELLIPSIZE_END);
	_tmp19_ = self->priv->prefix_label;
	gtk_label_set_selectable (_tmp19_, TRUE);
	_tmp20_ = self->priv->prefix_label;
	gtk_widget_set_size_request ((GtkWidget*) _tmp20_, 110, 0);
	_tmp21_ = proton_plus_widgets_compatibility_tool_drop_down_new (game, model, expression);
	g_object_ref_sink (_tmp21_);
	_g_object_unref0 (self->compatibility_tool_dropdown);
	self->compatibility_tool_dropdown = _tmp21_;
	_tmp22_ = proton_plus_widgets_extra_button_new (game);
	g_object_ref_sink (_tmp22_);
	_g_object_unref0 (self->priv->extra_button);
	self->priv->extra_button = _tmp22_;
	_tmp23_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
	g_object_ref_sink (_tmp23_);
	_g_object_unref0 (self->priv->content_box);
	self->priv->content_box = _tmp23_;
	_tmp24_ = self->priv->content_box;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp24_, 10);
	_tmp25_ = self->priv->content_box;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp25_, 10);
	_tmp26_ = self->priv->content_box;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp26_, 10);
	_tmp27_ = self->priv->content_box;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp27_, 10);
	_tmp28_ = self->priv->content_box;
	gtk_widget_set_valign ((GtkWidget*) _tmp28_, GTK_ALIGN_CENTER);
	_tmp29_ = self->priv->content_box;
	_tmp30_ = self->priv->title_label;
	gtk_box_append (_tmp29_, (GtkWidget*) _tmp30_);
	_tmp31_ = self->priv->content_box;
	_tmp32_ = self->priv->prefix_label;
	gtk_box_append (_tmp31_, (GtkWidget*) _tmp32_);
	_tmp33_ = self->priv->content_box;
	_tmp34_ = self->compatibility_tool_dropdown;
	gtk_box_append (_tmp33_, (GtkWidget*) _tmp34_);
	if (PROTON_PLUS_MODELS_GAMES_IS_STEAM (game)) {
		proton_plus_widgets_game_row_load_steam (self, G_TYPE_CHECK_INSTANCE_CAST (game, PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteam));
	}
	_tmp35_ = self->priv->content_box;
	_tmp36_ = self->priv->extra_button;
	gtk_box_append (_tmp35_, (GtkWidget*) _tmp36_);
	_tmp37_ = self->priv->content_box;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp37_);
	return self;
}

ProtonPlusWidgetsGameRow*
proton_plus_widgets_game_row_new (ProtonPlusModelsGame* game,
                                  GListStore* model,
                                  GtkPropertyExpression* expression)
{
	return proton_plus_widgets_game_row_construct (PROTON_PLUS_WIDGETS_TYPE_GAME_ROW, game, model, expression);
}

static void
_proton_plus_widgets_game_row_launch_options_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                gpointer self)
{
	proton_plus_widgets_game_row_launch_options_button_clicked ((ProtonPlusWidgetsGameRow*) self);
}

static void
_proton_plus_widgets_game_row_anticheat_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self)
{
	proton_plus_widgets_game_row_anticheat_button_clicked ((ProtonPlusWidgetsGameRow*) self);
}

static void
_proton_plus_widgets_game_row_protondb_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                          gpointer self)
{
	proton_plus_widgets_game_row_protondb_button_clicked ((ProtonPlusWidgetsGameRow*) self);
}

static void
proton_plus_widgets_game_row_load_steam (ProtonPlusWidgetsGameRow* self,
                                         ProtonPlusModelsGamesSteam* game)
{
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GtkButton* _tmp8_;
	GtkButton* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	GQuark _tmp14_ = 0U;
	static GQuark _tmp13_label0 = 0;
	static GQuark _tmp13_label1 = 0;
	static GQuark _tmp13_label2 = 0;
	static GQuark _tmp13_label3 = 0;
	static GQuark _tmp13_label4 = 0;
	GtkButton* _tmp22_;
	GtkButton* _tmp23_;
	GtkButton* _tmp24_;
	GtkButton* _tmp25_;
	GtkButton* _tmp26_;
	gboolean _tmp27_;
	gboolean _tmp28_;
	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 ("edit-symbolic");
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->launch_options_button);
	self->priv->launch_options_button = _tmp0_;
	_tmp1_ = self->priv->launch_options_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp1_, _ ("Modify the game launch options"));
	_tmp2_ = self->priv->launch_options_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp2_, "flat");
	_tmp3_ = self->priv->launch_options_button;
	g_signal_connect_object (_tmp3_, "clicked", (GCallback) _proton_plus_widgets_game_row_launch_options_button_clicked_gtk_button_clicked, self, 0);
	_tmp4_ = (GtkButton*) gtk_button_new_from_icon_name ("shield-symbolic");
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->anticheat_button);
	self->priv->anticheat_button = _tmp4_;
	_tmp5_ = self->priv->anticheat_button;
	_tmp6_ = proton_plus_models_games_steam_get_awacy_status (game);
	_tmp7_ = _tmp6_;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp5_, _tmp7_);
	_tmp8_ = self->priv->anticheat_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp8_, "flat");
	_tmp9_ = self->priv->anticheat_button;
	g_signal_connect_object (_tmp9_, "clicked", (GCallback) _proton_plus_widgets_game_row_anticheat_button_clicked_gtk_button_clicked, self, 0);
	_tmp10_ = proton_plus_models_games_steam_get_awacy_status (game);
	_tmp11_ = _tmp10_;
	_tmp12_ = _tmp11_;
	_tmp14_ = (NULL == _tmp12_) ? 0 : g_quark_from_string (_tmp12_);
	if (_tmp14_ == ((0 != _tmp13_label0) ? _tmp13_label0 : (_tmp13_label0 = g_quark_from_static_string ("Supported")))) {
		switch (0) {
			default:
			{
				GtkButton* _tmp15_;
				_tmp15_ = self->priv->anticheat_button;
				gtk_widget_add_css_class ((GtkWidget*) _tmp15_, "green");
				break;
			}
		}
	} else if (_tmp14_ == ((0 != _tmp13_label1) ? _tmp13_label1 : (_tmp13_label1 = g_quark_from_static_string ("Running")))) {
		switch (0) {
			default:
			{
				GtkButton* _tmp16_;
				_tmp16_ = self->priv->anticheat_button;
				gtk_widget_add_css_class ((GtkWidget*) _tmp16_, "blue");
				break;
			}
		}
	} else if (_tmp14_ == ((0 != _tmp13_label2) ? _tmp13_label2 : (_tmp13_label2 = g_quark_from_static_string ("Planned")))) {
		switch (0) {
			default:
			{
				GtkButton* _tmp17_;
				_tmp17_ = self->priv->anticheat_button;
				gtk_widget_add_css_class ((GtkWidget*) _tmp17_, "purple");
				break;
			}
		}
	} else if (_tmp14_ == ((0 != _tmp13_label3) ? _tmp13_label3 : (_tmp13_label3 = g_quark_from_static_string ("Broken")))) {
		switch (0) {
			default:
			{
				GtkButton* _tmp18_;
				_tmp18_ = self->priv->anticheat_button;
				gtk_widget_add_css_class ((GtkWidget*) _tmp18_, "orange");
				break;
			}
		}
	} else if (_tmp14_ == ((0 != _tmp13_label4) ? _tmp13_label4 : (_tmp13_label4 = g_quark_from_static_string ("Denied")))) {
		switch (0) {
			default:
			{
				GtkButton* _tmp19_;
				_tmp19_ = self->priv->anticheat_button;
				gtk_widget_add_css_class ((GtkWidget*) _tmp19_, "red");
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				GtkButton* _tmp20_;
				GtkButton* _tmp21_;
				_tmp20_ = self->priv->anticheat_button;
				gtk_widget_set_tooltip_text ((GtkWidget*) _tmp20_, _ ("Unknown"));
				_tmp21_ = self->priv->anticheat_button;
				gtk_widget_set_sensitive ((GtkWidget*) _tmp21_, FALSE);
				break;
			}
		}
	}
	_tmp22_ = (GtkButton*) gtk_button_new_from_icon_name ("proton-symbolic");
	g_object_ref_sink (_tmp22_);
	_g_object_unref0 (self->priv->protondb_button);
	self->priv->protondb_button = _tmp22_;
	_tmp23_ = self->priv->protondb_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp23_, _ ("Open ProtonDB page"));
	_tmp24_ = self->priv->protondb_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp24_, "flat");
	_tmp25_ = self->priv->protondb_button;
	g_signal_connect_object (_tmp25_, "clicked", (GCallback) _proton_plus_widgets_game_row_protondb_button_clicked_gtk_button_clicked, self, 0);
	_tmp26_ = self->priv->protondb_button;
	_tmp27_ = proton_plus_models_games_steam_get_is_non_steam (game);
	_tmp28_ = _tmp27_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp26_, !_tmp28_);
	_tmp29_ = self->priv->content_box;
	_tmp30_ = self->priv->launch_options_button;
	gtk_box_append (_tmp29_, (GtkWidget*) _tmp30_);
	_tmp31_ = self->priv->content_box;
	_tmp32_ = self->priv->anticheat_button;
	gtk_box_append (_tmp31_, (GtkWidget*) _tmp32_);
	_tmp33_ = self->priv->content_box;
	_tmp34_ = self->priv->protondb_button;
	gtk_box_append (_tmp33_, (GtkWidget*) _tmp34_);
}

static void
proton_plus_widgets_game_row_launch_options_button_clicked (ProtonPlusWidgetsGameRow* self)
{
	ProtonPlusModelsGame* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_game;
	if (!PROTON_PLUS_MODELS_GAMES_IS_STEAM (_tmp0_)) {
		return;
	}
	g_signal_emit (self, proton_plus_widgets_game_row_signals[PROTON_PLUS_WIDGETS_GAME_ROW_LAUNCH_OPTIONS_REQUESTED_SIGNAL], 0, self);
}

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

static void
proton_plus_widgets_game_row_anticheat_button_clicked (ProtonPlusWidgetsGameRow* self)
{
	ProtonPlusModelsGame* _tmp0_;
	ProtonPlusModelsGamesSteam* steam_game = NULL;
	ProtonPlusModelsGame* _tmp1_;
	ProtonPlusModelsGamesSteam* _tmp2_;
	ProtonPlusModelsGamesSteam* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_game;
	if (!PROTON_PLUS_MODELS_GAMES_IS_STEAM (_tmp0_)) {
		return;
	}
	_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_awacy_name (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ != NULL) {
		ProtonPlusModelsGamesSteam* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp6_ = steam_game;
		_tmp7_ = proton_plus_models_games_steam_get_awacy_name (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_strdup_printf ("https://areweanticheatyet.com/game/%s", _tmp8_);
		_tmp10_ = _tmp9_;
		proton_plus_utils_system_open_uri (_tmp10_);
		_g_free0 (_tmp10_);
	}
	_g_object_unref0 (steam_game);
}

static void
proton_plus_widgets_game_row_protondb_button_clicked (ProtonPlusWidgetsGameRow* self)
{
	ProtonPlusModelsGame* _tmp0_;
	ProtonPlusModelsGamesSteam* steam_game = NULL;
	ProtonPlusModelsGame* _tmp1_;
	ProtonPlusModelsGamesSteam* _tmp2_;
	ProtonPlusModelsGamesSteam* _tmp3_;
	guint _tmp4_;
	guint _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_game;
	if (!PROTON_PLUS_MODELS_GAMES_IS_STEAM (_tmp0_)) {
		return;
	}
	_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 ("https://www.protondb.com/app/%u", _tmp5_);
	_tmp7_ = _tmp6_;
	proton_plus_utils_system_open_uri (_tmp7_);
	_g_free0 (_tmp7_);
	_g_object_unref0 (steam_game);
}

ProtonPlusModelsGame*
proton_plus_widgets_game_row_get_game (ProtonPlusWidgetsGameRow* 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_game_row_set_game (ProtonPlusWidgetsGameRow* self,
                                       ProtonPlusModelsGame* value)
{
	ProtonPlusModelsGame* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_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_game_row_properties[PROTON_PLUS_WIDGETS_GAME_ROW_GAME_PROPERTY]);
	}
}

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

void
proton_plus_widgets_game_row_set_selected (ProtonPlusWidgetsGameRow* self,
                                           gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_game_row_get_selected (self);
	if (old_value != value) {
		self->priv->_selected = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_game_row_properties[PROTON_PLUS_WIDGETS_GAME_ROW_SELECTED_PROPERTY]);
	}
}

static void
proton_plus_widgets_game_row_class_init (ProtonPlusWidgetsGameRowClass * klass,
                                         gpointer klass_data)
{
	proton_plus_widgets_game_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGameRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_game_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_game_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_game_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAME_ROW_GAME_PROPERTY, proton_plus_widgets_game_row_properties[PROTON_PLUS_WIDGETS_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_GAME_ROW_SELECTED_PROPERTY, proton_plus_widgets_game_row_properties[PROTON_PLUS_WIDGETS_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_game_row_signals[PROTON_PLUS_WIDGETS_GAME_ROW_LAUNCH_OPTIONS_REQUESTED_SIGNAL] = g_signal_new ("launch-options-requested", PROTON_PLUS_WIDGETS_TYPE_GAME_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, PROTON_PLUS_WIDGETS_TYPE_GAME_ROW);
}

static void
proton_plus_widgets_game_row_instance_init (ProtonPlusWidgetsGameRow * self,
                                            gpointer klass)
{
	self->priv = proton_plus_widgets_game_row_get_instance_private (self);
}

static void
proton_plus_widgets_game_row_finalize (GObject * obj)
{
	ProtonPlusWidgetsGameRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TYPE_GAME_ROW, ProtonPlusWidgetsGameRow);
	_g_object_unref0 (self->priv->title_label);
	_g_object_unref0 (self->priv->prefix_label);
	_g_object_unref0 (self->compatibility_tool_dropdown);
	_g_object_unref0 (self->priv->launch_options_button);
	_g_object_unref0 (self->priv->anticheat_button);
	_g_object_unref0 (self->priv->protondb_button);
	_g_object_unref0 (self->priv->extra_button);
	_g_object_unref0 (self->priv->content_box);
	_g_object_unref0 (self->priv->_game);
	G_OBJECT_CLASS (proton_plus_widgets_game_row_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_game_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGameRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_game_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGameRow), 0, (GInstanceInitFunc) proton_plus_widgets_game_row_instance_init, NULL };
	GType proton_plus_widgets_game_row_type_id;
	proton_plus_widgets_game_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "ProtonPlusWidgetsGameRow", &g_define_type_info, 0);
	ProtonPlusWidgetsGameRow_private_offset = g_type_add_instance_private (proton_plus_widgets_game_row_type_id, sizeof (ProtonPlusWidgetsGameRowPrivate));
	return proton_plus_widgets_game_row_type_id;
}

GType
proton_plus_widgets_game_row_get_type (void)
{
	static volatile gsize proton_plus_widgets_game_row_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_game_row_type_id__once)) {
		GType proton_plus_widgets_game_row_type_id;
		proton_plus_widgets_game_row_type_id = proton_plus_widgets_game_row_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_game_row_type_id__once, proton_plus_widgets_game_row_type_id);
	}
	return proton_plus_widgets_game_row_type_id__once;
}

static void
_vala_proton_plus_widgets_game_row_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec)
{
	ProtonPlusWidgetsGameRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TYPE_GAME_ROW, ProtonPlusWidgetsGameRow);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAME_ROW_GAME_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_game_row_get_game (self));
		break;
		case PROTON_PLUS_WIDGETS_GAME_ROW_SELECTED_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_game_row_get_selected (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_game_row_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec)
{
	ProtonPlusWidgetsGameRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TYPE_GAME_ROW, ProtonPlusWidgetsGameRow);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAME_ROW_GAME_PROPERTY:
		proton_plus_widgets_game_row_set_game (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAME_ROW_SELECTED_PROPERTY:
		proton_plus_widgets_game_row_set_selected (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

