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

#include "protonplus_core.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib-object.h>
#include <gtk/gtk.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_ACTION_AVAILABILITY_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_NATIVE_GAME_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_LAUNCH_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_CUSTOM_EXECUTABLE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ENABLE_CUSTOM_EXECUTABLE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_INSTALL_DIRECTORY_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PREFIX_DIRECTORY_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PROTONTRICKS_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PROTONDB_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_ANTICHEAT_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ENABLE_ANTICHEAT_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ANTICHEAT_STATE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_HAS_SECONDARY_ACTIONS_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_NUM_PROPERTIES];
enum  {
	PROTON_PLUS_WIDGETS_GAMES_GAME_CONTROLLER_NAVIGATION_POLICY_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_CONTROLLER_NAVIGATION_POLICY_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_game_controller_navigation_policy_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_CONTROLLER_NAVIGATION_POLICY_NUM_PROPERTIES];
enum  {
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_ITEM_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_GENERATION_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_game_action_target_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _ProtonPlusWidgetsGamesGameActionAvailabilityPrivate {
	gboolean _native_game;
	gboolean _show_launch;
	gboolean _show_custom_executable;
	gboolean _enable_custom_executable;
	gboolean _show_install_directory;
	gboolean _show_prefix_directory;
	gboolean _show_protontricks;
	gboolean _show_protondb;
	gboolean _show_anticheat;
	gboolean _enable_anticheat;
	ProtonPlusWidgetsGamesGameAntiCheatState _anticheat_state;
};

struct _ProtonPlusWidgetsGamesGameActionTargetPrivate {
	ProtonPlusWidgetsGamesGameListItem* _item;
	guint64 _generation;
};

static gint ProtonPlusWidgetsGamesGameActionAvailability_private_offset;
static gpointer proton_plus_widgets_games_game_action_availability_parent_class = NULL;
static gpointer proton_plus_widgets_games_game_controller_navigation_policy_parent_class = NULL;
static gint ProtonPlusWidgetsGamesGameActionTarget_private_offset;
static gpointer proton_plus_widgets_games_game_action_target_parent_class = NULL;

static void proton_plus_widgets_games_game_action_availability_set_native_game (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                         gboolean value);
static void proton_plus_widgets_games_game_action_availability_set_show_launch (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                         gboolean value);
static void proton_plus_widgets_games_game_action_availability_set_show_custom_executable (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                                    gboolean value);
static void proton_plus_widgets_games_game_action_availability_set_enable_custom_executable (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                                      gboolean value);
static void proton_plus_widgets_games_game_action_availability_set_show_install_directory (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                                    gboolean value);
static void proton_plus_widgets_games_game_action_availability_set_show_prefix_directory (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                                   gboolean value);
static void proton_plus_widgets_games_game_action_availability_set_show_protontricks (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                               gboolean value);
static void proton_plus_widgets_games_game_action_availability_set_show_protondb (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                           gboolean value);
static void proton_plus_widgets_games_game_action_availability_set_show_anticheat (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                            gboolean value);
static ProtonPlusWidgetsGamesGameAntiCheatState proton_plus_widgets_games_game_action_availability_parse_anticheat_state (const gchar* status);
static void proton_plus_widgets_games_game_action_availability_set_anticheat_state (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                             ProtonPlusWidgetsGamesGameAntiCheatState value);
static gboolean proton_plus_widgets_games_game_action_availability_is_known_anticheat_state (ProtonPlusWidgetsGamesGameAntiCheatState state);
static void proton_plus_widgets_games_game_action_availability_set_enable_anticheat (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                              gboolean value);
static void proton_plus_widgets_games_game_action_availability_finalize (GObject * obj);
static GType proton_plus_widgets_games_game_action_availability_get_type_once (void);
static void _vala_proton_plus_widgets_games_game_action_availability_get_property (GObject * object,
                                                                            guint property_id,
                                                                            GValue * value,
                                                                            GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_game_action_availability_set_property (GObject * object,
                                                                            guint property_id,
                                                                            const GValue * value,
                                                                            GParamSpec * pspec);
static GType proton_plus_widgets_games_game_controller_navigation_policy_get_type_once (void);
static void proton_plus_widgets_games_game_action_target_set_generation (ProtonPlusWidgetsGamesGameActionTarget* self,
                                                                  guint64 value);
static void proton_plus_widgets_games_game_action_target_set_item (ProtonPlusWidgetsGamesGameActionTarget* self,
                                                            ProtonPlusWidgetsGamesGameListItem* value);
static void proton_plus_widgets_games_game_action_target_finalize (GObject * obj);
static GType proton_plus_widgets_games_game_action_target_get_type_once (void);
static void _vala_proton_plus_widgets_games_game_action_target_get_property (GObject * object,
                                                                      guint property_id,
                                                                      GValue * value,
                                                                      GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_game_action_target_set_property (GObject * object,
                                                                      guint property_id,
                                                                      const GValue * value,
                                                                      GParamSpec * pspec);

static GType
proton_plus_widgets_games_game_row_activation_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_ACTIVATION_MODIFY, "PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_ACTIVATION_MODIFY", "modify"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_ACTIVATION_TOGGLE_SELECTION, "PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_ACTIVATION_TOGGLE_SELECTION", "toggle-selection"}, {0, NULL, NULL}};
	GType proton_plus_widgets_games_game_row_activation_type_id;
	proton_plus_widgets_games_game_row_activation_type_id = g_enum_register_static ("ProtonPlusWidgetsGamesGameRowActivation", values);
	return proton_plus_widgets_games_game_row_activation_type_id;
}

GType
proton_plus_widgets_games_game_row_activation_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_game_row_activation_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_game_row_activation_type_id__once)) {
		GType proton_plus_widgets_games_game_row_activation_type_id;
		proton_plus_widgets_games_game_row_activation_type_id = proton_plus_widgets_games_game_row_activation_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_game_row_activation_type_id__once, proton_plus_widgets_games_game_row_activation_type_id);
	}
	return proton_plus_widgets_games_game_row_activation_type_id__once;
}

static GType
proton_plus_widgets_games_game_collection_boundary_action_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_WIDGETS_GAMES_GAME_COLLECTION_BOUNDARY_ACTION_NONE, "PROTON_PLUS_WIDGETS_GAMES_GAME_COLLECTION_BOUNDARY_ACTION_NONE", "none"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_COLLECTION_BOUNDARY_ACTION_FOCUS_TOOLBAR, "PROTON_PLUS_WIDGETS_GAMES_GAME_COLLECTION_BOUNDARY_ACTION_FOCUS_TOOLBAR", "focus-toolbar"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_COLLECTION_BOUNDARY_ACTION_FOCUS_FIRST_SORT_HEADER, "PROTON_PLUS_WIDGETS_GAMES_GAME_COLLECTION_BOUNDARY_ACTION_FOCUS_FIRST_SORT_HEADER", "focus-first-sort-header"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_COLLECTION_BOUNDARY_ACTION_FOCUS_FIRST_GAME, "PROTON_PLUS_WIDGETS_GAMES_GAME_COLLECTION_BOUNDARY_ACTION_FOCUS_FIRST_GAME", "focus-first-game"}, {0, NULL, NULL}};
	GType proton_plus_widgets_games_game_collection_boundary_action_type_id;
	proton_plus_widgets_games_game_collection_boundary_action_type_id = g_enum_register_static ("ProtonPlusWidgetsGamesGameCollectionBoundaryAction", values);
	return proton_plus_widgets_games_game_collection_boundary_action_type_id;
}

GType
proton_plus_widgets_games_game_collection_boundary_action_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_game_collection_boundary_action_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_game_collection_boundary_action_type_id__once)) {
		GType proton_plus_widgets_games_game_collection_boundary_action_type_id;
		proton_plus_widgets_games_game_collection_boundary_action_type_id = proton_plus_widgets_games_game_collection_boundary_action_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_game_collection_boundary_action_type_id__once, proton_plus_widgets_games_game_collection_boundary_action_type_id);
	}
	return proton_plus_widgets_games_game_collection_boundary_action_type_id__once;
}

static GType
proton_plus_widgets_games_game_sort_header_navigation_action_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_NONE, "PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_NONE", "none"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_PREVIOUS_HEADER, "PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_PREVIOUS_HEADER", "previous-header"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_NEXT_HEADER, "PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_NEXT_HEADER", "next-header"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_FOCUS_TOOLBAR, "PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_FOCUS_TOOLBAR", "focus-toolbar"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_FOCUS_FIRST_GAME, "PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_FOCUS_FIRST_GAME", "focus-first-game"}, {0, NULL, NULL}};
	GType proton_plus_widgets_games_game_sort_header_navigation_action_type_id;
	proton_plus_widgets_games_game_sort_header_navigation_action_type_id = g_enum_register_static ("ProtonPlusWidgetsGamesGameSortHeaderNavigationAction", values);
	return proton_plus_widgets_games_game_sort_header_navigation_action_type_id;
}

GType
proton_plus_widgets_games_game_sort_header_navigation_action_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_game_sort_header_navigation_action_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_game_sort_header_navigation_action_type_id__once)) {
		GType proton_plus_widgets_games_game_sort_header_navigation_action_type_id;
		proton_plus_widgets_games_game_sort_header_navigation_action_type_id = proton_plus_widgets_games_game_sort_header_navigation_action_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_game_sort_header_navigation_action_type_id__once, proton_plus_widgets_games_game_sort_header_navigation_action_type_id);
	}
	return proton_plus_widgets_games_game_sort_header_navigation_action_type_id__once;
}

static GType
proton_plus_widgets_games_game_focus_lane_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_SELECTION, "PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_SELECTION", "selection"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_ROW, "PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_ROW", "row"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_FIRST_ACTION, "PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_FIRST_ACTION", "first-action"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_PRIMARY_ACTION, "PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_PRIMARY_ACTION", "primary-action"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_SECONDARY_ACTION, "PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_SECONDARY_ACTION", "secondary-action"}, {0, NULL, NULL}};
	GType proton_plus_widgets_games_game_focus_lane_type_id;
	proton_plus_widgets_games_game_focus_lane_type_id = g_enum_register_static ("ProtonPlusWidgetsGamesGameFocusLane", values);
	return proton_plus_widgets_games_game_focus_lane_type_id;
}

GType
proton_plus_widgets_games_game_focus_lane_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_game_focus_lane_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_game_focus_lane_type_id__once)) {
		GType proton_plus_widgets_games_game_focus_lane_type_id;
		proton_plus_widgets_games_game_focus_lane_type_id = proton_plus_widgets_games_game_focus_lane_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_game_focus_lane_type_id__once, proton_plus_widgets_games_game_focus_lane_type_id);
	}
	return proton_plus_widgets_games_game_focus_lane_type_id__once;
}

static GType
proton_plus_widgets_games_game_anti_cheat_state_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_LOADING, "PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_LOADING", "loading"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_SUPPORTED, "PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_SUPPORTED", "supported"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_RUNNING, "PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_RUNNING", "running"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_PLANNED, "PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_PLANNED", "planned"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_BROKEN, "PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_BROKEN", "broken"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_DENIED, "PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_DENIED", "denied"}, {PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_UNKNOWN, "PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_UNKNOWN", "unknown"}, {0, NULL, NULL}};
	GType proton_plus_widgets_games_game_anti_cheat_state_type_id;
	proton_plus_widgets_games_game_anti_cheat_state_type_id = g_enum_register_static ("ProtonPlusWidgetsGamesGameAntiCheatState", values);
	return proton_plus_widgets_games_game_anti_cheat_state_type_id;
}

GType
proton_plus_widgets_games_game_anti_cheat_state_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_game_anti_cheat_state_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_game_anti_cheat_state_type_id__once)) {
		GType proton_plus_widgets_games_game_anti_cheat_state_type_id;
		proton_plus_widgets_games_game_anti_cheat_state_type_id = proton_plus_widgets_games_game_anti_cheat_state_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_game_anti_cheat_state_type_id__once, proton_plus_widgets_games_game_anti_cheat_state_type_id);
	}
	return proton_plus_widgets_games_game_anti_cheat_state_type_id__once;
}

static inline gpointer
proton_plus_widgets_games_game_action_availability_get_instance_private (ProtonPlusWidgetsGamesGameActionAvailability* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesGameActionAvailability_private_offset);
}

ProtonPlusWidgetsGamesGameActionAvailability*
proton_plus_widgets_games_game_action_availability_evaluate (gboolean is_steam,
                                                             gboolean is_non_steam,
                                                             gboolean is_native,
                                                             gboolean has_install_directory,
                                                             gboolean has_prefix_directory,
                                                             gboolean protontricks_available,
                                                             const gchar* anticheat_status,
                                                             gboolean has_anticheat_page,
                                                             gboolean anticheat_lookup_complete)
{
	ProtonPlusWidgetsGamesGameActionAvailability* _result_ = NULL;
	ProtonPlusWidgetsGamesGameActionAvailability* _tmp0_;
	ProtonPlusWidgetsGamesGameActionAvailability* _tmp1_;
	ProtonPlusWidgetsGamesGameActionAvailability* _tmp2_;
	ProtonPlusWidgetsGamesGameActionAvailability* _tmp3_;
	gboolean _tmp4_ = FALSE;
	ProtonPlusWidgetsGamesGameActionAvailability* _tmp5_;
	ProtonPlusWidgetsGamesGameActionAvailability* _tmp6_;
	ProtonPlusWidgetsGamesGameActionAvailability* _tmp7_;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	ProtonPlusWidgetsGamesGameActionAvailability* _tmp10_;
	gboolean _tmp11_ = FALSE;
	ProtonPlusWidgetsGamesGameActionAvailability* _tmp12_;
	gboolean _tmp13_ = FALSE;
	gboolean _tmp14_ = FALSE;
	ProtonPlusWidgetsGamesGameActionAvailability* _tmp16_;
	ProtonPlusWidgetsGamesGameActionAvailability* _tmp17_;
	gboolean _tmp18_ = FALSE;
	gboolean _tmp19_ = FALSE;
	ProtonPlusWidgetsGamesGameActionAvailability* _tmp20_;
	gboolean _tmp21_;
	ProtonPlusWidgetsGamesGameActionAvailability* _tmp24_;
	ProtonPlusWidgetsGamesGameActionAvailability* result;
	_tmp0_ = proton_plus_widgets_games_game_action_availability_new ();
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	proton_plus_widgets_games_game_action_availability_set_native_game (_tmp1_, is_native);
	_tmp2_ = _result_;
	proton_plus_widgets_games_game_action_availability_set_show_launch (_tmp2_, is_steam);
	_tmp3_ = _result_;
	proton_plus_widgets_games_game_action_availability_set_show_custom_executable (_tmp3_, is_steam);
	if (is_steam) {
		_tmp4_ = has_prefix_directory;
	} else {
		_tmp4_ = FALSE;
	}
	_tmp5_ = _result_;
	proton_plus_widgets_games_game_action_availability_set_enable_custom_executable (_tmp5_, _tmp4_);
	_tmp6_ = _result_;
	proton_plus_widgets_games_game_action_availability_set_show_install_directory (_tmp6_, has_install_directory);
	_tmp7_ = _result_;
	proton_plus_widgets_games_game_action_availability_set_show_prefix_directory (_tmp7_, has_prefix_directory);
	if (is_steam) {
		_tmp9_ = !is_non_steam;
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		_tmp8_ = protontricks_available;
	} else {
		_tmp8_ = FALSE;
	}
	_tmp10_ = _result_;
	proton_plus_widgets_games_game_action_availability_set_show_protontricks (_tmp10_, _tmp8_);
	if (is_steam) {
		_tmp11_ = !is_non_steam;
	} else {
		_tmp11_ = FALSE;
	}
	_tmp12_ = _result_;
	proton_plus_widgets_games_game_action_availability_set_show_protondb (_tmp12_, _tmp11_);
	if (is_steam) {
		_tmp14_ = !is_non_steam;
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		gboolean _tmp15_ = FALSE;
		if (has_anticheat_page) {
			_tmp15_ = TRUE;
		} else {
			_tmp15_ = !anticheat_lookup_complete;
		}
		_tmp13_ = _tmp15_;
	} else {
		_tmp13_ = FALSE;
	}
	_tmp16_ = _result_;
	proton_plus_widgets_games_game_action_availability_set_show_anticheat (_tmp16_, _tmp13_);
	_tmp17_ = _result_;
	proton_plus_widgets_games_game_action_availability_set_anticheat_state (_tmp17_, proton_plus_widgets_games_game_action_availability_parse_anticheat_state (anticheat_status));
	_tmp20_ = _result_;
	_tmp21_ = _tmp20_->priv->_show_anticheat;
	if (_tmp21_) {
		_tmp19_ = has_anticheat_page;
	} else {
		_tmp19_ = FALSE;
	}
	if (_tmp19_) {
		ProtonPlusWidgetsGamesGameActionAvailability* _tmp22_;
		ProtonPlusWidgetsGamesGameAntiCheatState _tmp23_;
		_tmp22_ = _result_;
		_tmp23_ = _tmp22_->priv->_anticheat_state;
		_tmp18_ = proton_plus_widgets_games_game_action_availability_is_known_anticheat_state (_tmp23_);
	} else {
		_tmp18_ = FALSE;
	}
	_tmp24_ = _result_;
	proton_plus_widgets_games_game_action_availability_set_enable_anticheat (_tmp24_, _tmp18_);
	result = _result_;
	return result;
}

ProtonPlusWidgetsGamesGameRowActivation
proton_plus_widgets_games_game_action_availability_row_activation (gboolean selection_mode)
{
	ProtonPlusWidgetsGamesGameRowActivation _tmp0_ = 0;
	ProtonPlusWidgetsGamesGameRowActivation result;
	if (selection_mode) {
		_tmp0_ = PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_ACTIVATION_TOGGLE_SELECTION;
	} else {
		_tmp0_ = PROTON_PLUS_WIDGETS_GAMES_GAME_ROW_ACTIVATION_MODIFY;
	}
	result = _tmp0_;
	return result;
}

static ProtonPlusWidgetsGamesGameAntiCheatState
proton_plus_widgets_games_game_action_availability_parse_anticheat_state (const gchar* status)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	static GQuark _tmp1_label4 = 0;
	static GQuark _tmp1_label5 = 0;
	ProtonPlusWidgetsGamesGameAntiCheatState result;
	_tmp0_ = status;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string (NULL)))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_LOADING;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("Supported")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_SUPPORTED;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("Running")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_RUNNING;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("Planned")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_PLANNED;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label4) ? _tmp1_label4 : (_tmp1_label4 = g_quark_from_static_string ("Broken")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_BROKEN;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label5) ? _tmp1_label5 : (_tmp1_label5 = g_quark_from_static_string ("Denied")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_DENIED;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_UNKNOWN;
				return result;
			}
		}
	}
}

static gboolean
proton_plus_widgets_games_game_action_availability_is_known_anticheat_state (ProtonPlusWidgetsGamesGameAntiCheatState state)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	if (state != PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_LOADING) {
		_tmp0_ = state != PROTON_PLUS_WIDGETS_GAMES_GAME_ANTI_CHEAT_STATE_UNKNOWN;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

ProtonPlusWidgetsGamesGameActionAvailability*
proton_plus_widgets_games_game_action_availability_construct (GType object_type)
{
	ProtonPlusWidgetsGamesGameActionAvailability * self = NULL;
	self = (ProtonPlusWidgetsGamesGameActionAvailability*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusWidgetsGamesGameActionAvailability*
proton_plus_widgets_games_game_action_availability_new (void)
{
	return proton_plus_widgets_games_game_action_availability_construct (PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ACTION_AVAILABILITY);
}

gboolean
proton_plus_widgets_games_game_action_availability_get_native_game (ProtonPlusWidgetsGamesGameActionAvailability* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_native_game;
	return result;
}

static void
proton_plus_widgets_games_game_action_availability_set_native_game (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                    gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_action_availability_get_native_game (self);
	if (old_value != value) {
		self->priv->_native_game = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_NATIVE_GAME_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_game_action_availability_get_show_launch (ProtonPlusWidgetsGamesGameActionAvailability* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_launch;
	return result;
}

static void
proton_plus_widgets_games_game_action_availability_set_show_launch (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                    gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_action_availability_get_show_launch (self);
	if (old_value != value) {
		self->priv->_show_launch = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_LAUNCH_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_game_action_availability_get_show_custom_executable (ProtonPlusWidgetsGamesGameActionAvailability* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_custom_executable;
	return result;
}

static void
proton_plus_widgets_games_game_action_availability_set_show_custom_executable (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                               gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_action_availability_get_show_custom_executable (self);
	if (old_value != value) {
		self->priv->_show_custom_executable = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_CUSTOM_EXECUTABLE_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_game_action_availability_get_enable_custom_executable (ProtonPlusWidgetsGamesGameActionAvailability* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_enable_custom_executable;
	return result;
}

static void
proton_plus_widgets_games_game_action_availability_set_enable_custom_executable (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_action_availability_get_enable_custom_executable (self);
	if (old_value != value) {
		self->priv->_enable_custom_executable = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ENABLE_CUSTOM_EXECUTABLE_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_game_action_availability_get_show_install_directory (ProtonPlusWidgetsGamesGameActionAvailability* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_install_directory;
	return result;
}

static void
proton_plus_widgets_games_game_action_availability_set_show_install_directory (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                               gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_action_availability_get_show_install_directory (self);
	if (old_value != value) {
		self->priv->_show_install_directory = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_INSTALL_DIRECTORY_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_game_action_availability_get_show_prefix_directory (ProtonPlusWidgetsGamesGameActionAvailability* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_prefix_directory;
	return result;
}

static void
proton_plus_widgets_games_game_action_availability_set_show_prefix_directory (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_action_availability_get_show_prefix_directory (self);
	if (old_value != value) {
		self->priv->_show_prefix_directory = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PREFIX_DIRECTORY_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_game_action_availability_get_show_protontricks (ProtonPlusWidgetsGamesGameActionAvailability* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_protontricks;
	return result;
}

static void
proton_plus_widgets_games_game_action_availability_set_show_protontricks (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_action_availability_get_show_protontricks (self);
	if (old_value != value) {
		self->priv->_show_protontricks = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PROTONTRICKS_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_game_action_availability_get_show_protondb (ProtonPlusWidgetsGamesGameActionAvailability* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_protondb;
	return result;
}

static void
proton_plus_widgets_games_game_action_availability_set_show_protondb (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                      gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_action_availability_get_show_protondb (self);
	if (old_value != value) {
		self->priv->_show_protondb = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PROTONDB_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_game_action_availability_get_show_anticheat (ProtonPlusWidgetsGamesGameActionAvailability* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_anticheat;
	return result;
}

static void
proton_plus_widgets_games_game_action_availability_set_show_anticheat (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                       gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_action_availability_get_show_anticheat (self);
	if (old_value != value) {
		self->priv->_show_anticheat = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_ANTICHEAT_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_game_action_availability_get_enable_anticheat (ProtonPlusWidgetsGamesGameActionAvailability* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_enable_anticheat;
	return result;
}

static void
proton_plus_widgets_games_game_action_availability_set_enable_anticheat (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                         gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_action_availability_get_enable_anticheat (self);
	if (old_value != value) {
		self->priv->_enable_anticheat = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ENABLE_ANTICHEAT_PROPERTY]);
	}
}

ProtonPlusWidgetsGamesGameAntiCheatState
proton_plus_widgets_games_game_action_availability_get_anticheat_state (ProtonPlusWidgetsGamesGameActionAvailability* self)
{
	ProtonPlusWidgetsGamesGameAntiCheatState result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_anticheat_state;
	return result;
}

static void
proton_plus_widgets_games_game_action_availability_set_anticheat_state (ProtonPlusWidgetsGamesGameActionAvailability* self,
                                                                        ProtonPlusWidgetsGamesGameAntiCheatState value)
{
	ProtonPlusWidgetsGamesGameAntiCheatState old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_action_availability_get_anticheat_state (self);
	if (old_value != value) {
		self->priv->_anticheat_state = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ANTICHEAT_STATE_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_game_action_availability_get_has_secondary_actions (ProtonPlusWidgetsGamesGameActionAvailability* self)
{
	gboolean result;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp5_ = self->priv->_show_custom_executable;
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		gboolean _tmp6_;
		_tmp6_ = self->priv->_show_install_directory;
		_tmp4_ = _tmp6_;
	}
	if (_tmp4_) {
		_tmp3_ = TRUE;
	} else {
		gboolean _tmp7_;
		_tmp7_ = self->priv->_show_prefix_directory;
		_tmp3_ = _tmp7_;
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		gboolean _tmp8_;
		_tmp8_ = self->priv->_show_protontricks;
		_tmp2_ = _tmp8_;
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		gboolean _tmp9_;
		_tmp9_ = self->priv->_show_protondb;
		_tmp1_ = _tmp9_;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp10_;
		_tmp10_ = self->priv->_show_anticheat;
		_tmp0_ = _tmp10_;
	}
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_game_action_availability_class_init (ProtonPlusWidgetsGamesGameActionAvailabilityClass * klass,
                                                               gpointer klass_data)
{
	proton_plus_widgets_games_game_action_availability_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesGameActionAvailability_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_game_action_availability_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_game_action_availability_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_game_action_availability_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_NATIVE_GAME_PROPERTY, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_NATIVE_GAME_PROPERTY] = g_param_spec_boolean ("native-game", "native-game", "native-game", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_LAUNCH_PROPERTY, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_LAUNCH_PROPERTY] = g_param_spec_boolean ("show-launch", "show-launch", "show-launch", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_CUSTOM_EXECUTABLE_PROPERTY, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_CUSTOM_EXECUTABLE_PROPERTY] = g_param_spec_boolean ("show-custom-executable", "show-custom-executable", "show-custom-executable", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ENABLE_CUSTOM_EXECUTABLE_PROPERTY, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ENABLE_CUSTOM_EXECUTABLE_PROPERTY] = g_param_spec_boolean ("enable-custom-executable", "enable-custom-executable", "enable-custom-executable", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_INSTALL_DIRECTORY_PROPERTY, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_INSTALL_DIRECTORY_PROPERTY] = g_param_spec_boolean ("show-install-directory", "show-install-directory", "show-install-directory", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PREFIX_DIRECTORY_PROPERTY, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PREFIX_DIRECTORY_PROPERTY] = g_param_spec_boolean ("show-prefix-directory", "show-prefix-directory", "show-prefix-directory", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PROTONTRICKS_PROPERTY, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PROTONTRICKS_PROPERTY] = g_param_spec_boolean ("show-protontricks", "show-protontricks", "show-protontricks", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PROTONDB_PROPERTY, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PROTONDB_PROPERTY] = g_param_spec_boolean ("show-protondb", "show-protondb", "show-protondb", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_ANTICHEAT_PROPERTY, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_ANTICHEAT_PROPERTY] = g_param_spec_boolean ("show-anticheat", "show-anticheat", "show-anticheat", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ENABLE_ANTICHEAT_PROPERTY, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ENABLE_ANTICHEAT_PROPERTY] = g_param_spec_boolean ("enable-anticheat", "enable-anticheat", "enable-anticheat", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ANTICHEAT_STATE_PROPERTY, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ANTICHEAT_STATE_PROPERTY] = g_param_spec_enum ("anticheat-state", "anticheat-state", "anticheat-state", PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ANTI_CHEAT_STATE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_HAS_SECONDARY_ACTIONS_PROPERTY, proton_plus_widgets_games_game_action_availability_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_HAS_SECONDARY_ACTIONS_PROPERTY] = g_param_spec_boolean ("has-secondary-actions", "has-secondary-actions", "has-secondary-actions", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_widgets_games_game_action_availability_instance_init (ProtonPlusWidgetsGamesGameActionAvailability * self,
                                                                  gpointer klass)
{
	self->priv = proton_plus_widgets_games_game_action_availability_get_instance_private (self);
}

static void
proton_plus_widgets_games_game_action_availability_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesGameActionAvailability * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ACTION_AVAILABILITY, ProtonPlusWidgetsGamesGameActionAvailability);
	G_OBJECT_CLASS (proton_plus_widgets_games_game_action_availability_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_game_action_availability_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesGameActionAvailabilityClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_game_action_availability_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesGameActionAvailability), 0, (GInstanceInitFunc) proton_plus_widgets_games_game_action_availability_instance_init, NULL };
	GType proton_plus_widgets_games_game_action_availability_type_id;
	proton_plus_widgets_games_game_action_availability_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesGameActionAvailability", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesGameActionAvailability_private_offset = g_type_add_instance_private (proton_plus_widgets_games_game_action_availability_type_id, sizeof (ProtonPlusWidgetsGamesGameActionAvailabilityPrivate));
	return proton_plus_widgets_games_game_action_availability_type_id;
}

GType
proton_plus_widgets_games_game_action_availability_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_game_action_availability_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_game_action_availability_type_id__once)) {
		GType proton_plus_widgets_games_game_action_availability_type_id;
		proton_plus_widgets_games_game_action_availability_type_id = proton_plus_widgets_games_game_action_availability_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_game_action_availability_type_id__once, proton_plus_widgets_games_game_action_availability_type_id);
	}
	return proton_plus_widgets_games_game_action_availability_type_id__once;
}

static void
_vala_proton_plus_widgets_games_game_action_availability_get_property (GObject * object,
                                                                       guint property_id,
                                                                       GValue * value,
                                                                       GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesGameActionAvailability * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ACTION_AVAILABILITY, ProtonPlusWidgetsGamesGameActionAvailability);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_NATIVE_GAME_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_game_action_availability_get_native_game (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_LAUNCH_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_game_action_availability_get_show_launch (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_CUSTOM_EXECUTABLE_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_game_action_availability_get_show_custom_executable (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ENABLE_CUSTOM_EXECUTABLE_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_game_action_availability_get_enable_custom_executable (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_INSTALL_DIRECTORY_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_game_action_availability_get_show_install_directory (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PREFIX_DIRECTORY_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_game_action_availability_get_show_prefix_directory (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PROTONTRICKS_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_game_action_availability_get_show_protontricks (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PROTONDB_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_game_action_availability_get_show_protondb (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_ANTICHEAT_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_game_action_availability_get_show_anticheat (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ENABLE_ANTICHEAT_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_game_action_availability_get_enable_anticheat (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ANTICHEAT_STATE_PROPERTY:
		g_value_set_enum (value, proton_plus_widgets_games_game_action_availability_get_anticheat_state (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_HAS_SECONDARY_ACTIONS_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_game_action_availability_get_has_secondary_actions (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_games_game_action_availability_set_property (GObject * object,
                                                                       guint property_id,
                                                                       const GValue * value,
                                                                       GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesGameActionAvailability * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ACTION_AVAILABILITY, ProtonPlusWidgetsGamesGameActionAvailability);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_NATIVE_GAME_PROPERTY:
		proton_plus_widgets_games_game_action_availability_set_native_game (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_LAUNCH_PROPERTY:
		proton_plus_widgets_games_game_action_availability_set_show_launch (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_CUSTOM_EXECUTABLE_PROPERTY:
		proton_plus_widgets_games_game_action_availability_set_show_custom_executable (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ENABLE_CUSTOM_EXECUTABLE_PROPERTY:
		proton_plus_widgets_games_game_action_availability_set_enable_custom_executable (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_INSTALL_DIRECTORY_PROPERTY:
		proton_plus_widgets_games_game_action_availability_set_show_install_directory (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PREFIX_DIRECTORY_PROPERTY:
		proton_plus_widgets_games_game_action_availability_set_show_prefix_directory (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PROTONTRICKS_PROPERTY:
		proton_plus_widgets_games_game_action_availability_set_show_protontricks (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_PROTONDB_PROPERTY:
		proton_plus_widgets_games_game_action_availability_set_show_protondb (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_SHOW_ANTICHEAT_PROPERTY:
		proton_plus_widgets_games_game_action_availability_set_show_anticheat (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ENABLE_ANTICHEAT_PROPERTY:
		proton_plus_widgets_games_game_action_availability_set_enable_anticheat (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_AVAILABILITY_ANTICHEAT_STATE_PROPERTY:
		proton_plus_widgets_games_game_action_availability_set_anticheat_state (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

gboolean
proton_plus_widgets_games_game_controller_navigation_policy_top_boundary_uses_sort_header (ProtonPlusWidgetsGamesGameFocusLane lane)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	if (lane == PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_SELECTION) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = lane == PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_ROW;
	}
	result = _tmp0_;
	return result;
}

gboolean
proton_plus_widgets_games_game_controller_navigation_policy_top_boundary_uses_selection (ProtonPlusWidgetsGamesGameFocusLane lane)
{
	gboolean result;
	result = lane == PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_SELECTION;
	return result;
}

ProtonPlusWidgetsGamesGameFocusLane
proton_plus_widgets_games_game_controller_navigation_policy_action_lane (gboolean secondary_action)
{
	ProtonPlusWidgetsGamesGameFocusLane _tmp0_ = 0;
	ProtonPlusWidgetsGamesGameFocusLane result;
	if (secondary_action) {
		_tmp0_ = PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_SECONDARY_ACTION;
	} else {
		_tmp0_ = PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_PRIMARY_ACTION;
	}
	result = _tmp0_;
	return result;
}

ProtonPlusWidgetsGamesGameFocusLane
proton_plus_widgets_games_game_controller_navigation_policy_selection_mode_lane (ProtonPlusWidgetsGamesGameFocusLane lane,
                                                                                 gboolean selection_mode)
{
	ProtonPlusWidgetsGamesGameFocusLane _tmp0_ = 0;
	gboolean _tmp1_ = FALSE;
	ProtonPlusWidgetsGamesGameFocusLane result;
	if (selection_mode) {
		_tmp1_ = lane == PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_ROW;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = PROTON_PLUS_WIDGETS_GAMES_GAME_FOCUS_LANE_SELECTION;
	} else {
		_tmp0_ = lane;
	}
	result = _tmp0_;
	return result;
}

gboolean
proton_plus_widgets_games_game_controller_navigation_policy_can_attempt_action_focus (gboolean mapped,
                                                                                      gboolean visible,
                                                                                      gboolean sensitive)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean result;
	if (mapped) {
		_tmp1_ = visible;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = sensitive;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

ProtonPlusWidgetsGamesGameCollectionBoundaryAction
proton_plus_widgets_games_game_controller_navigation_policy_boundary_action (gboolean focused_in_toolbar,
                                                                             gboolean focused_in_collection,
                                                                             ProtonPlusUtilsControllerNavigationDirection direction,
                                                                             gboolean prefer_sort_headers)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusWidgetsGamesGameCollectionBoundaryAction result;
	if (focused_in_toolbar) {
		_tmp0_ = direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		ProtonPlusWidgetsGamesGameCollectionBoundaryAction _tmp1_ = 0;
		if (prefer_sort_headers) {
			_tmp1_ = PROTON_PLUS_WIDGETS_GAMES_GAME_COLLECTION_BOUNDARY_ACTION_FOCUS_FIRST_SORT_HEADER;
		} else {
			_tmp1_ = PROTON_PLUS_WIDGETS_GAMES_GAME_COLLECTION_BOUNDARY_ACTION_FOCUS_FIRST_GAME;
		}
		result = _tmp1_;
		return result;
	}
	if (!focused_in_collection) {
		result = PROTON_PLUS_WIDGETS_GAMES_GAME_COLLECTION_BOUNDARY_ACTION_NONE;
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
		result = PROTON_PLUS_WIDGETS_GAMES_GAME_COLLECTION_BOUNDARY_ACTION_FOCUS_TOOLBAR;
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN) {
		result = PROTON_PLUS_WIDGETS_GAMES_GAME_COLLECTION_BOUNDARY_ACTION_FOCUS_FIRST_GAME;
		return result;
	}
	result = PROTON_PLUS_WIDGETS_GAMES_GAME_COLLECTION_BOUNDARY_ACTION_NONE;
	return result;
}

ProtonPlusWidgetsGamesGameSortHeaderNavigationAction
proton_plus_widgets_games_game_controller_navigation_policy_sort_header_action (gint index,
                                                                                gint count,
                                                                                ProtonPlusUtilsControllerNavigationDirection direction)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	ProtonPlusWidgetsGamesGameSortHeaderNavigationAction result;
	if (index < 0) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = index >= count;
	}
	if (_tmp0_) {
		result = PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_NONE;
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
		result = PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_FOCUS_TOOLBAR;
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN) {
		result = PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_FOCUS_FIRST_GAME;
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_LEFT) {
		_tmp1_ = index > 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		result = PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_PREVIOUS_HEADER;
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_RIGHT) {
		_tmp2_ = (index + 1) < count;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		result = PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_NEXT_HEADER;
		return result;
	}
	result = PROTON_PLUS_WIDGETS_GAMES_GAME_SORT_HEADER_NAVIGATION_ACTION_NONE;
	return result;
}

GtkSortType
proton_plus_widgets_games_game_controller_navigation_policy_next_sort_direction (gboolean is_primary_column,
                                                                                 GtkSortType current_direction)
{
	GtkSortType _tmp0_ = 0;
	GtkSortType result;
	if (!is_primary_column) {
		result = GTK_SORT_ASCENDING;
		return result;
	}
	if (current_direction == GTK_SORT_ASCENDING) {
		_tmp0_ = GTK_SORT_DESCENDING;
	} else {
		_tmp0_ = GTK_SORT_ASCENDING;
	}
	result = _tmp0_;
	return result;
}

ProtonPlusWidgetsGamesGameControllerNavigationPolicy*
proton_plus_widgets_games_game_controller_navigation_policy_construct (GType object_type)
{
	ProtonPlusWidgetsGamesGameControllerNavigationPolicy * self = NULL;
	self = (ProtonPlusWidgetsGamesGameControllerNavigationPolicy*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusWidgetsGamesGameControllerNavigationPolicy*
proton_plus_widgets_games_game_controller_navigation_policy_new (void)
{
	return proton_plus_widgets_games_game_controller_navigation_policy_construct (PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_CONTROLLER_NAVIGATION_POLICY);
}

static void
proton_plus_widgets_games_game_controller_navigation_policy_class_init (ProtonPlusWidgetsGamesGameControllerNavigationPolicyClass * klass,
                                                                        gpointer klass_data)
{
	proton_plus_widgets_games_game_controller_navigation_policy_parent_class = g_type_class_peek_parent (klass);
}

static void
proton_plus_widgets_games_game_controller_navigation_policy_instance_init (ProtonPlusWidgetsGamesGameControllerNavigationPolicy * self,
                                                                           gpointer klass)
{
}

static GType
proton_plus_widgets_games_game_controller_navigation_policy_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesGameControllerNavigationPolicyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_game_controller_navigation_policy_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesGameControllerNavigationPolicy), 0, (GInstanceInitFunc) proton_plus_widgets_games_game_controller_navigation_policy_instance_init, NULL };
	GType proton_plus_widgets_games_game_controller_navigation_policy_type_id;
	proton_plus_widgets_games_game_controller_navigation_policy_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesGameControllerNavigationPolicy", &g_define_type_info, 0);
	return proton_plus_widgets_games_game_controller_navigation_policy_type_id;
}

GType
proton_plus_widgets_games_game_controller_navigation_policy_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_game_controller_navigation_policy_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_game_controller_navigation_policy_type_id__once)) {
		GType proton_plus_widgets_games_game_controller_navigation_policy_type_id;
		proton_plus_widgets_games_game_controller_navigation_policy_type_id = proton_plus_widgets_games_game_controller_navigation_policy_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_game_controller_navigation_policy_type_id__once, proton_plus_widgets_games_game_controller_navigation_policy_type_id);
	}
	return proton_plus_widgets_games_game_controller_navigation_policy_type_id__once;
}

static inline gpointer
proton_plus_widgets_games_game_action_target_get_instance_private (ProtonPlusWidgetsGamesGameActionTarget* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesGameActionTarget_private_offset);
}

void
proton_plus_widgets_games_game_action_target_bind (ProtonPlusWidgetsGamesGameActionTarget* self,
                                                   ProtonPlusWidgetsGamesGameListItem* item)
{
	guint64 _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->_generation;
	proton_plus_widgets_games_game_action_target_set_generation (self, _tmp0_ + 1);
	proton_plus_widgets_games_game_action_target_set_item (self, item);
}

void
proton_plus_widgets_games_game_action_target_unbind (ProtonPlusWidgetsGamesGameActionTarget* self)
{
	guint64 _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_generation;
	proton_plus_widgets_games_game_action_target_set_generation (self, _tmp0_ + 1);
	proton_plus_widgets_games_game_action_target_set_item (self, NULL);
}

ProtonPlusWidgetsGamesGameActionTarget*
proton_plus_widgets_games_game_action_target_construct (GType object_type)
{
	ProtonPlusWidgetsGamesGameActionTarget * self = NULL;
	self = (ProtonPlusWidgetsGamesGameActionTarget*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusWidgetsGamesGameActionTarget*
proton_plus_widgets_games_game_action_target_new (void)
{
	return proton_plus_widgets_games_game_action_target_construct (PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ACTION_TARGET);
}

ProtonPlusWidgetsGamesGameListItem*
proton_plus_widgets_games_game_action_target_get_item (ProtonPlusWidgetsGamesGameActionTarget* self)
{
	ProtonPlusWidgetsGamesGameListItem* result;
	ProtonPlusWidgetsGamesGameListItem* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_item;
	result = _tmp0_;
	return result;
}

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

static void
proton_plus_widgets_games_game_action_target_set_item (ProtonPlusWidgetsGamesGameActionTarget* self,
                                                       ProtonPlusWidgetsGamesGameListItem* value)
{
	ProtonPlusWidgetsGamesGameListItem* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_action_target_get_item (self);
	if (old_value != value) {
		ProtonPlusWidgetsGamesGameListItem* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_item);
		self->priv->_item = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_action_target_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_ITEM_PROPERTY]);
	}
}

guint64
proton_plus_widgets_games_game_action_target_get_generation (ProtonPlusWidgetsGamesGameActionTarget* self)
{
	guint64 result;
	g_return_val_if_fail (self != NULL, 0ULL);
	result = self->priv->_generation;
	return result;
}

static void
proton_plus_widgets_games_game_action_target_set_generation (ProtonPlusWidgetsGamesGameActionTarget* self,
                                                             guint64 value)
{
	guint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_game_action_target_get_generation (self);
	if (old_value != value) {
		self->priv->_generation = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_game_action_target_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_GENERATION_PROPERTY]);
	}
}

static void
proton_plus_widgets_games_game_action_target_class_init (ProtonPlusWidgetsGamesGameActionTargetClass * klass,
                                                         gpointer klass_data)
{
	proton_plus_widgets_games_game_action_target_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesGameActionTarget_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_game_action_target_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_game_action_target_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_game_action_target_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_ITEM_PROPERTY, proton_plus_widgets_games_game_action_target_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_ITEM_PROPERTY] = g_param_spec_object ("item", "item", "item", PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_LIST_ITEM, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_GENERATION_PROPERTY, proton_plus_widgets_games_game_action_target_properties[PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_GENERATION_PROPERTY] = g_param_spec_uint64 ("generation", "generation", "generation", 0, G_MAXUINT64, (guint64) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_widgets_games_game_action_target_instance_init (ProtonPlusWidgetsGamesGameActionTarget * self,
                                                            gpointer klass)
{
	self->priv = proton_plus_widgets_games_game_action_target_get_instance_private (self);
	self->priv->_generation = (guint64) 0;
}

static void
proton_plus_widgets_games_game_action_target_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesGameActionTarget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ACTION_TARGET, ProtonPlusWidgetsGamesGameActionTarget);
	_g_object_unref0 (self->priv->_item);
	G_OBJECT_CLASS (proton_plus_widgets_games_game_action_target_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_game_action_target_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesGameActionTargetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_game_action_target_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesGameActionTarget), 0, (GInstanceInitFunc) proton_plus_widgets_games_game_action_target_instance_init, NULL };
	GType proton_plus_widgets_games_game_action_target_type_id;
	proton_plus_widgets_games_game_action_target_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesGameActionTarget", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesGameActionTarget_private_offset = g_type_add_instance_private (proton_plus_widgets_games_game_action_target_type_id, sizeof (ProtonPlusWidgetsGamesGameActionTargetPrivate));
	return proton_plus_widgets_games_game_action_target_type_id;
}

GType
proton_plus_widgets_games_game_action_target_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_game_action_target_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_game_action_target_type_id__once)) {
		GType proton_plus_widgets_games_game_action_target_type_id;
		proton_plus_widgets_games_game_action_target_type_id = proton_plus_widgets_games_game_action_target_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_game_action_target_type_id__once, proton_plus_widgets_games_game_action_target_type_id);
	}
	return proton_plus_widgets_games_game_action_target_type_id__once;
}

static void
_vala_proton_plus_widgets_games_game_action_target_get_property (GObject * object,
                                                                 guint property_id,
                                                                 GValue * value,
                                                                 GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesGameActionTarget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ACTION_TARGET, ProtonPlusWidgetsGamesGameActionTarget);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_ITEM_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_game_action_target_get_item (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_GENERATION_PROPERTY:
		g_value_set_uint64 (value, proton_plus_widgets_games_game_action_target_get_generation (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_games_game_action_target_set_property (GObject * object,
                                                                 guint property_id,
                                                                 const GValue * value,
                                                                 GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesGameActionTarget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ACTION_TARGET, ProtonPlusWidgetsGamesGameActionTarget);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_ITEM_PROPERTY:
		proton_plus_widgets_games_game_action_target_set_item (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_GAME_ACTION_TARGET_GENERATION_PROPERTY:
		proton_plus_widgets_games_game_action_target_set_generation (self, g_value_get_uint64 (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

