/* compatibility-tool-dropdown.c generated by valac 0.56.19, the Vala compiler
 * generated from compatibility-tool-dropdown.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 <glib/gi18n-lib.h>
#include <gee.h>
#include <adwaita.h>
#include <pango/pango.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_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;
typedef struct _ProtonPlusWidgetsCompatibilityToolDropDownPrivate ProtonPlusWidgetsCompatibilityToolDropDownPrivate;

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

typedef struct _ProtonPlusModelsGame ProtonPlusModelsGame;
typedef struct _ProtonPlusModelsGameClass ProtonPlusModelsGameClass;

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

typedef struct _ProtonPlusModelsSimpleRunner ProtonPlusModelsSimpleRunner;
typedef struct _ProtonPlusModelsSimpleRunnerClass ProtonPlusModelsSimpleRunnerClass;
enum  {
	PROTON_PLUS_WIDGETS_COMPATIBILITY_TOOL_DROP_DOWN_0_PROPERTY,
	PROTON_PLUS_WIDGETS_COMPATIBILITY_TOOL_DROP_DOWN_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_compatibility_tool_drop_down_properties[PROTON_PLUS_WIDGETS_COMPATIBILITY_TOOL_DROP_DOWN_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

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

typedef struct _ProtonPlusModelsLauncher ProtonPlusModelsLauncher;
typedef struct _ProtonPlusModelsLauncherClass ProtonPlusModelsLauncherClass;
typedef struct _ProtonPlusModelsLauncherPrivate ProtonPlusModelsLauncherPrivate;

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

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

#define PROTON_PLUS_MODELS_LAUNCHER_TYPE_INSTALLATION_TYPES (proton_plus_models_launcher_installation_types_get_type ())

#define PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG (proton_plus_widgets_error_dialog_get_type ())
#define PROTON_PLUS_WIDGETS_ERROR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG, ProtonPlusWidgetsErrorDialog))
#define PROTON_PLUS_WIDGETS_ERROR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG, ProtonPlusWidgetsErrorDialogClass))
#define PROTON_PLUS_WIDGETS_IS_ERROR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG))
#define PROTON_PLUS_WIDGETS_IS_ERROR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG))
#define PROTON_PLUS_WIDGETS_ERROR_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG, ProtonPlusWidgetsErrorDialogClass))

typedef struct _ProtonPlusWidgetsErrorDialog ProtonPlusWidgetsErrorDialog;
typedef struct _ProtonPlusWidgetsErrorDialogClass ProtonPlusWidgetsErrorDialogClass;
#define _g_free0(var) (var = (g_free (var), NULL))

#define PROTON_PLUS_WIDGETS_TYPE_WINDOW (proton_plus_widgets_window_get_type ())
#define PROTON_PLUS_WIDGETS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_WINDOW, ProtonPlusWidgetsWindow))
#define PROTON_PLUS_WIDGETS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_WINDOW, ProtonPlusWidgetsWindowClass))
#define PROTON_PLUS_WIDGETS_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_WINDOW))
#define PROTON_PLUS_WIDGETS_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_WINDOW))
#define PROTON_PLUS_WIDGETS_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_WINDOW, ProtonPlusWidgetsWindowClass))

typedef struct _ProtonPlusWidgetsWindow ProtonPlusWidgetsWindow;
typedef struct _ProtonPlusWidgetsWindowClass ProtonPlusWidgetsWindowClass;

struct _ProtonPlusWidgetsCompatibilityToolDropDown {
	GtkWidget parent_instance;
	ProtonPlusWidgetsCompatibilityToolDropDownPrivate * priv;
	GtkDropDown* dropdown;
	gboolean skip;
};

struct _ProtonPlusWidgetsCompatibilityToolDropDownClass {
	GtkWidgetClass parent_class;
};

struct _ProtonPlusWidgetsCompatibilityToolDropDownPrivate {
	GtkSignalListItemFactory* factory;
	GtkSignalListItemFactory* list_factory;
	GtkListItem* last_compatibility_tool_list_item;
	GtkBinLayout* bin_layout;
	ProtonPlusModelsGame* game;
	GHashTable* hast_table;
};

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

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

static gint ProtonPlusWidgetsCompatibilityToolDropDown_private_offset;
static gpointer proton_plus_widgets_compatibility_tool_drop_down_parent_class = NULL;
VALA_EXTERN ProtonPlusWidgetsWindow* proton_plus_widgets_application_window;

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_models_game_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGame, g_object_unref)
VALA_EXTERN GType proton_plus_models_simple_runner_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsSimpleRunner, g_object_unref)
VALA_EXTERN 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);
static gboolean __lambda36_ (ProtonPlusModelsSimpleRunner* a,
                      ProtonPlusModelsSimpleRunner* b);
VALA_EXTERN const gchar* proton_plus_models_simple_runner_get_internal_title (ProtonPlusModelsSimpleRunner* self);
static gboolean ___lambda36__gequal_func (gconstpointer a,
                                   gconstpointer b);
static void _g_object_unref0_ (gpointer var);
static void proton_plus_widgets_compatibility_tool_drop_down_list_factory_setup (ProtonPlusWidgetsCompatibilityToolDropDown* self,
                                                                          GObject* object);
static void _proton_plus_widgets_compatibility_tool_drop_down_list_factory_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                                              GObject* object,
                                                                                                              gpointer self);
static void proton_plus_widgets_compatibility_tool_drop_down_list_factory_bind (ProtonPlusWidgetsCompatibilityToolDropDown* self,
                                                                         GObject* object);
static void _proton_plus_widgets_compatibility_tool_drop_down_list_factory_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                                            GObject* object,
                                                                                                            gpointer self);
static void proton_plus_widgets_compatibility_tool_drop_down_factory_setup (ProtonPlusWidgetsCompatibilityToolDropDown* self,
                                                                     GObject* object);
static void _proton_plus_widgets_compatibility_tool_drop_down_factory_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                                         GObject* object,
                                                                                                         gpointer self);
static void proton_plus_widgets_compatibility_tool_drop_down_factory_bind (ProtonPlusWidgetsCompatibilityToolDropDown* self,
                                                                    GObject* object);
static void _proton_plus_widgets_compatibility_tool_drop_down_factory_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                                       GObject* object,
                                                                                                       gpointer self);
VALA_EXTERN const gchar* proton_plus_models_game_get_compatibility_tool (ProtonPlusModelsGame* self);
VALA_EXTERN GType proton_plus_models_launcher_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsLauncher, g_object_unref)
VALA_EXTERN ProtonPlusModelsLauncher* proton_plus_models_game_get_launcher (ProtonPlusModelsGame* self);
VALA_EXTERN GType proton_plus_models_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGroup, g_object_unref)
VALA_EXTERN GType proton_plus_models_launcher_installation_types_get_type (void) G_GNUC_CONST ;
static void proton_plus_widgets_compatibility_tool_drop_down_selected_item_changed (ProtonPlusWidgetsCompatibilityToolDropDown* self);
static void _proton_plus_widgets_compatibility_tool_drop_down_selected_item_changed_g_object_notify (GObject* _sender,
                                                                                              GParamSpec* pspec,
                                                                                              gpointer self);
static void proton_plus_widgets_compatibility_tool_drop_down_on_destroy (ProtonPlusWidgetsCompatibilityToolDropDown* self);
static void _proton_plus_widgets_compatibility_tool_drop_down_on_destroy_gtk_widget_destroy (GtkWidget* _sender,
                                                                                      gpointer self);
VALA_EXTERN const gchar* proton_plus_models_simple_runner_get_display_title (ProtonPlusModelsSimpleRunner* self);
VALA_EXTERN gboolean proton_plus_models_game_change_compatibility_tool (ProtonPlusModelsGame* self,
                                                            const gchar* compat_tool);
VALA_EXTERN GType proton_plus_widgets_error_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsErrorDialog, g_object_unref)
VALA_EXTERN const gchar* proton_plus_models_game_get_name (ProtonPlusModelsGame* self);
VALA_EXTERN ProtonPlusWidgetsErrorDialog* proton_plus_widgets_error_dialog_new (const gchar* heading,
                                                                    const gchar* body);
VALA_EXTERN ProtonPlusWidgetsErrorDialog* proton_plus_widgets_error_dialog_construct (GType object_type,
                                                                          const gchar* heading,
                                                                          const gchar* body);
VALA_EXTERN GType proton_plus_widgets_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsWindow, g_object_unref)
static void proton_plus_widgets_compatibility_tool_drop_down_on_compatibility_tools_changed (ProtonPlusWidgetsCompatibilityToolDropDown* self);
static void proton_plus_widgets_compatibility_tool_drop_down_finalize (GObject * obj);
static GType proton_plus_widgets_compatibility_tool_drop_down_get_type_once (void);

static inline gpointer
proton_plus_widgets_compatibility_tool_drop_down_get_instance_private (ProtonPlusWidgetsCompatibilityToolDropDown* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsCompatibilityToolDropDown_private_offset);
}

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

static gboolean
__lambda36_ (ProtonPlusModelsSimpleRunner* a,
             ProtonPlusModelsSimpleRunner* b)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gboolean result;
	g_return_val_if_fail (a != NULL, FALSE);
	g_return_val_if_fail (b != NULL, FALSE);
	_tmp0_ = proton_plus_models_simple_runner_get_internal_title (a);
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_models_simple_runner_get_internal_title (b);
	_tmp3_ = _tmp2_;
	result = g_strcmp0 (_tmp1_, _tmp3_) == 0;
	return result;
}

static gboolean
___lambda36__gequal_func (gconstpointer a,
                          gconstpointer b)
{
	gboolean result;
	result = __lambda36_ ((ProtonPlusModelsSimpleRunner*) a, (ProtonPlusModelsSimpleRunner*) b);
	return result;
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static void
_proton_plus_widgets_compatibility_tool_drop_down_list_factory_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                                         GObject* object,
                                                                                                         gpointer self)
{
	proton_plus_widgets_compatibility_tool_drop_down_list_factory_setup ((ProtonPlusWidgetsCompatibilityToolDropDown*) self, object);
}

static void
_proton_plus_widgets_compatibility_tool_drop_down_list_factory_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                                       GObject* object,
                                                                                                       gpointer self)
{
	proton_plus_widgets_compatibility_tool_drop_down_list_factory_bind ((ProtonPlusWidgetsCompatibilityToolDropDown*) self, object);
}

static void
_proton_plus_widgets_compatibility_tool_drop_down_factory_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                                    GObject* object,
                                                                                                    gpointer self)
{
	proton_plus_widgets_compatibility_tool_drop_down_factory_setup ((ProtonPlusWidgetsCompatibilityToolDropDown*) self, object);
}

static void
_proton_plus_widgets_compatibility_tool_drop_down_factory_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                                  GObject* object,
                                                                                                  gpointer self)
{
	proton_plus_widgets_compatibility_tool_drop_down_factory_bind ((ProtonPlusWidgetsCompatibilityToolDropDown*) self, object);
}

static gpointer
_gtk_expression_ref0 (gpointer self)
{
	return self ? gtk_expression_ref (self) : NULL;
}

static void
_proton_plus_widgets_compatibility_tool_drop_down_selected_item_changed_g_object_notify (GObject* _sender,
                                                                                         GParamSpec* pspec,
                                                                                         gpointer self)
{
	proton_plus_widgets_compatibility_tool_drop_down_selected_item_changed ((ProtonPlusWidgetsCompatibilityToolDropDown*) self);
}

static void
_proton_plus_widgets_compatibility_tool_drop_down_on_destroy_gtk_widget_destroy (GtkWidget* _sender,
                                                                                 gpointer self)
{
	proton_plus_widgets_compatibility_tool_drop_down_on_destroy ((ProtonPlusWidgetsCompatibilityToolDropDown*) self);
}

ProtonPlusWidgetsCompatibilityToolDropDown*
proton_plus_widgets_compatibility_tool_drop_down_construct (GType object_type,
                                                            ProtonPlusModelsGame* game,
                                                            GListStore* model,
                                                            GtkPropertyExpression* expression)
{
	ProtonPlusWidgetsCompatibilityToolDropDown * self = NULL;
	ProtonPlusModelsGame* _tmp0_;
	GHashTable* _tmp1_;
	GtkSignalListItemFactory* _tmp2_;
	GtkSignalListItemFactory* _tmp3_;
	GtkSignalListItemFactory* _tmp4_;
	GtkSignalListItemFactory* _tmp5_;
	GtkSignalListItemFactory* _tmp6_;
	GtkSignalListItemFactory* _tmp7_;
	GListModel* _tmp8_;
	GtkExpression* _tmp9_;
	GtkDropDown* _tmp10_;
	GtkDropDown* _tmp11_;
	GtkSignalListItemFactory* _tmp12_;
	GtkDropDown* _tmp13_;
	GtkSignalListItemFactory* _tmp14_;
	GtkDropDown* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	GtkDropDown* _tmp37_;
	GtkBinLayout* _tmp38_;
	GtkBinLayout* _tmp39_;
	GtkLayoutManager* _tmp40_;
	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 = (ProtonPlusWidgetsCompatibilityToolDropDown*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (game);
	_g_object_unref0 (self->priv->game);
	self->priv->game = _tmp0_;
	_tmp1_ = g_hash_table_new_full (NULL, ___lambda36__gequal_func, _g_object_unref0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->hast_table);
	self->priv->hast_table = _tmp1_;
	_tmp2_ = (GtkSignalListItemFactory*) gtk_signal_list_item_factory_new ();
	_g_object_unref0 (self->priv->list_factory);
	self->priv->list_factory = _tmp2_;
	_tmp3_ = self->priv->list_factory;
	g_signal_connect_object (_tmp3_, "setup", (GCallback) _proton_plus_widgets_compatibility_tool_drop_down_list_factory_setup_gtk_signal_list_item_factory_setup, self, 0);
	_tmp4_ = self->priv->list_factory;
	g_signal_connect_object (_tmp4_, "bind", (GCallback) _proton_plus_widgets_compatibility_tool_drop_down_list_factory_bind_gtk_signal_list_item_factory_bind, self, 0);
	_tmp5_ = (GtkSignalListItemFactory*) gtk_signal_list_item_factory_new ();
	_g_object_unref0 (self->priv->factory);
	self->priv->factory = _tmp5_;
	_tmp6_ = self->priv->factory;
	g_signal_connect_object (_tmp6_, "setup", (GCallback) _proton_plus_widgets_compatibility_tool_drop_down_factory_setup_gtk_signal_list_item_factory_setup, self, 0);
	_tmp7_ = self->priv->factory;
	g_signal_connect_object (_tmp7_, "bind", (GCallback) _proton_plus_widgets_compatibility_tool_drop_down_factory_bind_gtk_signal_list_item_factory_bind, self, 0);
	_tmp8_ = _g_object_ref0 ((GListModel*) model);
	_tmp9_ = _gtk_expression_ref0 ((GtkExpression*) expression);
	_tmp10_ = (GtkDropDown*) gtk_drop_down_new (_tmp8_, _tmp9_);
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->dropdown);
	self->dropdown = _tmp10_;
	_tmp11_ = self->dropdown;
	_tmp12_ = self->priv->list_factory;
	gtk_drop_down_set_list_factory (_tmp11_, (GtkListItemFactory*) _tmp12_);
	_tmp13_ = self->dropdown;
	_tmp14_ = self->priv->factory;
	gtk_drop_down_set_factory (_tmp13_, (GtkListItemFactory*) _tmp14_);
	_tmp15_ = self->dropdown;
	gtk_widget_set_parent ((GtkWidget*) _tmp15_, (GtkWidget*) self);
	_tmp16_ = proton_plus_models_game_get_compatibility_tool (game);
	_tmp17_ = _tmp16_;
	if (g_strcmp0 (_tmp17_, _ ("Undefined")) == 0) {
		GtkDropDown* _tmp18_;
		_tmp18_ = self->dropdown;
		gtk_drop_down_set_selected (_tmp18_, (guint) 0);
	} else {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp19_ = FALSE;
				_tmp19_ = TRUE;
				while (TRUE) {
					ProtonPlusModelsLauncher* _tmp21_;
					ProtonPlusModelsLauncher* _tmp22_;
					GeeArrayList* _tmp23_;
					gint _tmp24_;
					gint _tmp25_;
					ProtonPlusModelsLauncher* _tmp26_;
					ProtonPlusModelsLauncher* _tmp27_;
					GeeArrayList* _tmp28_;
					gpointer _tmp29_;
					ProtonPlusModelsSimpleRunner* _tmp30_;
					const gchar* _tmp31_;
					const gchar* _tmp32_;
					const gchar* _tmp33_;
					const gchar* _tmp34_;
					gboolean _tmp35_;
					if (!_tmp19_) {
						gint _tmp20_;
						_tmp20_ = i;
						i = _tmp20_ + 1;
					}
					_tmp19_ = FALSE;
					_tmp21_ = proton_plus_models_game_get_launcher (game);
					_tmp22_ = _tmp21_;
					_tmp23_ = _tmp22_->compatibility_tools;
					_tmp24_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp23_);
					_tmp25_ = _tmp24_;
					if (!(i < _tmp25_)) {
						break;
					}
					_tmp26_ = proton_plus_models_game_get_launcher (game);
					_tmp27_ = _tmp26_;
					_tmp28_ = _tmp27_->compatibility_tools;
					_tmp29_ = gee_abstract_list_get ((GeeAbstractList*) _tmp28_, i);
					_tmp30_ = (ProtonPlusModelsSimpleRunner*) _tmp29_;
					_tmp31_ = proton_plus_models_simple_runner_get_internal_title (_tmp30_);
					_tmp32_ = _tmp31_;
					_tmp33_ = proton_plus_models_game_get_compatibility_tool (game);
					_tmp34_ = _tmp33_;
					_tmp35_ = g_strcmp0 (_tmp32_, _tmp34_) == 0;
					_g_object_unref0 (_tmp30_);
					if (_tmp35_) {
						GtkDropDown* _tmp36_;
						_tmp36_ = self->dropdown;
						gtk_drop_down_set_selected (_tmp36_, (guint) (i + 1));
						break;
					}
				}
			}
		}
	}
	_tmp37_ = self->dropdown;
	g_signal_connect_object ((GObject*) _tmp37_, "notify::selected-item", (GCallback) _proton_plus_widgets_compatibility_tool_drop_down_selected_item_changed_g_object_notify, self, 0);
	_tmp38_ = (GtkBinLayout*) gtk_bin_layout_new ();
	_g_object_unref0 (self->priv->bin_layout);
	self->priv->bin_layout = _tmp38_;
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) _proton_plus_widgets_compatibility_tool_drop_down_on_destroy_gtk_widget_destroy, self, 0);
	_tmp39_ = self->priv->bin_layout;
	_tmp40_ = _g_object_ref0 ((GtkLayoutManager*) _tmp39_);
	gtk_widget_set_layout_manager ((GtkWidget*) self, _tmp40_);
	gtk_widget_set_size_request ((GtkWidget*) self, 350, 0);
	return self;
}

ProtonPlusWidgetsCompatibilityToolDropDown*
proton_plus_widgets_compatibility_tool_drop_down_new (ProtonPlusModelsGame* game,
                                                      GListStore* model,
                                                      GtkPropertyExpression* expression)
{
	return proton_plus_widgets_compatibility_tool_drop_down_construct (PROTON_PLUS_WIDGETS_TYPE_COMPATIBILITY_TOOL_DROP_DOWN, game, model, expression);
}

static void
proton_plus_widgets_compatibility_tool_drop_down_selected_item_changed (ProtonPlusWidgetsCompatibilityToolDropDown* self)
{
	ProtonPlusModelsSimpleRunner* simple_runner = NULL;
	GtkDropDown* _tmp0_;
	GObject* _tmp1_;
	ProtonPlusModelsSimpleRunner* _tmp2_;
	GtkListItem* list_item = NULL;
	GHashTable* _tmp3_;
	ProtonPlusModelsSimpleRunner* _tmp4_;
	gconstpointer _tmp5_;
	GtkListItem* _tmp6_;
	GtkListItem* _tmp7_;
	ProtonPlusModelsSimpleRunner* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	GtkListItem* _tmp11_;
	gconstpointer _tmp12_;
	GtkListItem* _tmp13_;
	gconstpointer _tmp14_;
	GtkListItem* _tmp15_;
	GtkListItem* _tmp16_;
	gboolean success = FALSE;
	ProtonPlusModelsGame* _tmp17_;
	ProtonPlusModelsSimpleRunner* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->dropdown;
	_tmp1_ = gtk_drop_down_get_selected_item (_tmp0_);
	_tmp2_ = _g_object_ref0 (PROTON_PLUS_MODELS_IS_SIMPLE_RUNNER (_tmp1_) ? ((ProtonPlusModelsSimpleRunner*) _tmp1_) : NULL);
	simple_runner = _tmp2_;
	_tmp3_ = self->priv->hast_table;
	_tmp4_ = simple_runner;
	_tmp5_ = g_hash_table_lookup (_tmp3_, _tmp4_);
	_tmp6_ = _g_object_ref0 ((GtkListItem*) _tmp5_);
	list_item = _tmp6_;
	_tmp7_ = list_item;
	if (_tmp7_ == NULL) {
		_g_object_unref0 (list_item);
		_g_object_unref0 (simple_runner);
		return;
	}
	_tmp8_ = simple_runner;
	_tmp9_ = proton_plus_models_simple_runner_get_display_title (_tmp8_);
	_tmp10_ = _tmp9_;
	gtk_widget_set_tooltip_text ((GtkWidget*) self, _tmp10_);
	_tmp11_ = list_item;
	_tmp12_ = g_object_get_data ((GObject*) _tmp11_, "check");
	gtk_widget_set_visible ((GtkWidget*) ((GtkImage*) _tmp12_), TRUE);
	_tmp13_ = self->priv->last_compatibility_tool_list_item;
	_tmp14_ = g_object_get_data ((GObject*) _tmp13_, "check");
	gtk_widget_set_visible ((GtkWidget*) ((GtkImage*) _tmp14_), FALSE);
	_tmp15_ = list_item;
	_tmp16_ = _g_object_ref0 (_tmp15_);
	_g_object_unref0 (self->priv->last_compatibility_tool_list_item);
	self->priv->last_compatibility_tool_list_item = _tmp16_;
	if (self->skip) {
		self->skip = FALSE;
		_g_object_unref0 (list_item);
		_g_object_unref0 (simple_runner);
		return;
	}
	_tmp17_ = self->priv->game;
	_tmp18_ = simple_runner;
	_tmp19_ = proton_plus_models_simple_runner_get_internal_title (_tmp18_);
	_tmp20_ = _tmp19_;
	success = proton_plus_models_game_change_compatibility_tool (_tmp17_, _tmp20_);
	if (!success) {
		ProtonPlusWidgetsErrorDialog* dialog = NULL;
		ProtonPlusModelsGame* _tmp21_;
		const gchar* _tmp22_;
		const gchar* _tmp23_;
		gchar* _tmp24_;
		gchar* _tmp25_;
		ProtonPlusWidgetsErrorDialog* _tmp26_;
		ProtonPlusWidgetsErrorDialog* _tmp27_;
		ProtonPlusWidgetsErrorDialog* _tmp28_;
		ProtonPlusWidgetsWindow* _tmp29_;
		ProtonPlusModelsGame* _tmp30_;
		const gchar* _tmp31_;
		const gchar* _tmp32_;
		_tmp21_ = self->priv->game;
		_tmp22_ = proton_plus_models_game_get_name (_tmp21_);
		_tmp23_ = _tmp22_;
		_tmp24_ = g_strdup_printf (_ ("Couldn't change the compatibility tool of %s"), _tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = proton_plus_widgets_error_dialog_new (_tmp25_, _ ("Please report this issue on GitHub."));
		g_object_ref_sink (_tmp26_);
		_tmp27_ = _tmp26_;
		_g_free0 (_tmp25_);
		dialog = _tmp27_;
		_tmp28_ = dialog;
		_tmp29_ = proton_plus_widgets_application_window;
		adw_dialog_present ((AdwDialog*) _tmp28_, (GtkWidget*) _tmp29_);
		self->skip = TRUE;
		_tmp30_ = self->priv->game;
		_tmp31_ = proton_plus_models_game_get_compatibility_tool (_tmp30_);
		_tmp32_ = _tmp31_;
		if (g_strcmp0 (_tmp32_, _ ("Undefined")) == 0) {
			GtkDropDown* _tmp33_;
			_tmp33_ = self->dropdown;
			gtk_drop_down_set_selected (_tmp33_, (guint) 0);
		} else {
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp34_ = FALSE;
					_tmp34_ = TRUE;
					while (TRUE) {
						ProtonPlusModelsGame* _tmp36_;
						ProtonPlusModelsLauncher* _tmp37_;
						ProtonPlusModelsLauncher* _tmp38_;
						GeeArrayList* _tmp39_;
						gint _tmp40_;
						gint _tmp41_;
						ProtonPlusModelsGame* _tmp42_;
						const gchar* _tmp43_;
						const gchar* _tmp44_;
						ProtonPlusModelsGame* _tmp45_;
						ProtonPlusModelsLauncher* _tmp46_;
						ProtonPlusModelsLauncher* _tmp47_;
						GeeArrayList* _tmp48_;
						gpointer _tmp49_;
						ProtonPlusModelsSimpleRunner* _tmp50_;
						const gchar* _tmp51_;
						const gchar* _tmp52_;
						gboolean _tmp53_;
						if (!_tmp34_) {
							gint _tmp35_;
							_tmp35_ = i;
							i = _tmp35_ + 1;
						}
						_tmp34_ = FALSE;
						_tmp36_ = self->priv->game;
						_tmp37_ = proton_plus_models_game_get_launcher (_tmp36_);
						_tmp38_ = _tmp37_;
						_tmp39_ = _tmp38_->compatibility_tools;
						_tmp40_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp39_);
						_tmp41_ = _tmp40_;
						if (!(i < _tmp41_)) {
							break;
						}
						_tmp42_ = self->priv->game;
						_tmp43_ = proton_plus_models_game_get_compatibility_tool (_tmp42_);
						_tmp44_ = _tmp43_;
						_tmp45_ = self->priv->game;
						_tmp46_ = proton_plus_models_game_get_launcher (_tmp45_);
						_tmp47_ = _tmp46_;
						_tmp48_ = _tmp47_->compatibility_tools;
						_tmp49_ = gee_abstract_list_get ((GeeAbstractList*) _tmp48_, i);
						_tmp50_ = (ProtonPlusModelsSimpleRunner*) _tmp49_;
						_tmp51_ = proton_plus_models_simple_runner_get_internal_title (_tmp50_);
						_tmp52_ = _tmp51_;
						_tmp53_ = g_strcmp0 (_tmp44_, _tmp52_) == 0;
						_g_object_unref0 (_tmp50_);
						if (_tmp53_) {
							GtkDropDown* _tmp54_;
							_tmp54_ = self->dropdown;
							gtk_drop_down_set_selected (_tmp54_, (guint) (i + 1));
							break;
						}
					}
				}
			}
		}
		_g_object_unref0 (dialog);
	}
	_g_object_unref0 (list_item);
	_g_object_unref0 (simple_runner);
}

static void
proton_plus_widgets_compatibility_tool_drop_down_list_factory_bind (ProtonPlusWidgetsCompatibilityToolDropDown* self,
                                                                    GObject* object)
{
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	ProtonPlusModelsSimpleRunner* simple_runner = NULL;
	GtkListItem* _tmp1_;
	GObject* _tmp2_;
	ProtonPlusModelsSimpleRunner* _tmp3_;
	GHashTable* _tmp4_;
	ProtonPlusModelsSimpleRunner* _tmp5_;
	ProtonPlusModelsSimpleRunner* _tmp6_;
	GtkListItem* _tmp7_;
	GtkListItem* _tmp8_;
	gconstpointer _tmp9_;
	ProtonPlusModelsSimpleRunner* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	gconstpointer _tmp13_;
	GtkListItem* _tmp14_;
	gconstpointer _tmp15_;
	ProtonPlusModelsSimpleRunner* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	GtkListItem* _tmp19_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_list_item_get_type ()) ? ((GtkListItem*) object) : NULL);
	list_item = _tmp0_;
	_tmp1_ = list_item;
	_tmp2_ = gtk_list_item_get_item (_tmp1_);
	_tmp3_ = _g_object_ref0 (PROTON_PLUS_MODELS_IS_SIMPLE_RUNNER (_tmp2_) ? ((ProtonPlusModelsSimpleRunner*) _tmp2_) : NULL);
	simple_runner = _tmp3_;
	_tmp4_ = self->priv->hast_table;
	_tmp5_ = simple_runner;
	_tmp6_ = _g_object_ref0 (_tmp5_);
	_tmp7_ = list_item;
	_tmp8_ = _g_object_ref0 (_tmp7_);
	g_hash_table_insert (_tmp4_, _tmp6_, _tmp8_);
	_tmp9_ = g_object_get_data (object, "title");
	_tmp10_ = simple_runner;
	_tmp11_ = proton_plus_models_simple_runner_get_display_title (_tmp10_);
	_tmp12_ = _tmp11_;
	gtk_label_set_label ((GtkLabel*) _tmp9_, _tmp12_);
	_tmp13_ = g_object_get_data (object, "check");
	_tmp14_ = list_item;
	gtk_widget_set_visible ((GtkWidget*) ((GtkImage*) _tmp13_), gtk_list_item_get_selected (_tmp14_));
	_tmp15_ = g_object_get_data (object, "box");
	_tmp16_ = simple_runner;
	_tmp17_ = proton_plus_models_simple_runner_get_display_title (_tmp16_);
	_tmp18_ = _tmp17_;
	gtk_widget_set_tooltip_text ((GtkWidget*) ((GtkBox*) _tmp15_), _tmp18_);
	_tmp19_ = list_item;
	if (gtk_list_item_get_selected (_tmp19_)) {
		GtkListItem* _tmp20_;
		GtkListItem* _tmp21_;
		_tmp20_ = list_item;
		_tmp21_ = _g_object_ref0 (_tmp20_);
		_g_object_unref0 (self->priv->last_compatibility_tool_list_item);
		self->priv->last_compatibility_tool_list_item = _tmp21_;
	}
	_g_object_unref0 (simple_runner);
	_g_object_unref0 (list_item);
}

static void
proton_plus_widgets_compatibility_tool_drop_down_list_factory_setup (ProtonPlusWidgetsCompatibilityToolDropDown* self,
                                                                     GObject* object)
{
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	GtkLabel* title_label = NULL;
	GtkLabel* _tmp1_;
	GtkImage* check_image = NULL;
	GtkImage* _tmp2_;
	GtkBox* box = NULL;
	GtkBox* _tmp3_;
	GtkLabel* _tmp4_;
	GtkImage* _tmp5_;
	GtkBox* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_list_item_get_type ()) ? ((GtkListItem*) object) : NULL);
	list_item = _tmp0_;
	_tmp1_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp1_);
	title_label = _tmp1_;
	gtk_label_set_xalign (title_label, 0.0f);
	gtk_label_set_max_width_chars (title_label, 30);
	gtk_label_set_ellipsize (title_label, PANGO_ELLIPSIZE_END);
	gtk_widget_set_hexpand ((GtkWidget*) title_label, TRUE);
	_tmp2_ = (GtkImage*) gtk_image_new_from_icon_name ("object-select-symbolic");
	g_object_ref_sink (_tmp2_);
	check_image = _tmp2_;
	gtk_widget_set_visible ((GtkWidget*) check_image, FALSE);
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp3_);
	box = _tmp3_;
	gtk_box_append (box, (GtkWidget*) title_label);
	gtk_box_append (box, (GtkWidget*) check_image);
	gtk_widget_set_size_request ((GtkWidget*) box, 290, 0);
	_tmp4_ = _g_object_ref0 (title_label);
	g_object_set_data_full (object, "title", _tmp4_, g_object_unref);
	_tmp5_ = _g_object_ref0 (check_image);
	g_object_set_data_full (object, "check", _tmp5_, g_object_unref);
	_tmp6_ = _g_object_ref0 (box);
	g_object_set_data_full (object, "box", _tmp6_, g_object_unref);
	gtk_list_item_set_child (list_item, (GtkWidget*) box);
	_g_object_unref0 (box);
	_g_object_unref0 (check_image);
	_g_object_unref0 (title_label);
	_g_object_unref0 (list_item);
}

static void
proton_plus_widgets_compatibility_tool_drop_down_factory_bind (ProtonPlusWidgetsCompatibilityToolDropDown* self,
                                                               GObject* object)
{
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	ProtonPlusModelsSimpleRunner* simple_runner = NULL;
	GObject* _tmp1_;
	ProtonPlusModelsSimpleRunner* _tmp2_;
	gconstpointer _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	GtkDropDown* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_list_item_get_type ()) ? ((GtkListItem*) object) : NULL);
	list_item = _tmp0_;
	_tmp1_ = gtk_list_item_get_item (list_item);
	_tmp2_ = _g_object_ref0 (PROTON_PLUS_MODELS_IS_SIMPLE_RUNNER (_tmp1_) ? ((ProtonPlusModelsSimpleRunner*) _tmp1_) : NULL);
	simple_runner = _tmp2_;
	_tmp3_ = g_object_get_data (object, "title");
	_tmp4_ = proton_plus_models_simple_runner_get_display_title (simple_runner);
	_tmp5_ = _tmp4_;
	gtk_label_set_label ((GtkLabel*) _tmp3_, _tmp5_);
	_tmp6_ = self->dropdown;
	_tmp7_ = proton_plus_models_simple_runner_get_display_title (simple_runner);
	_tmp8_ = _tmp7_;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp6_, _tmp8_);
	_g_object_unref0 (simple_runner);
	_g_object_unref0 (list_item);
}

static void
proton_plus_widgets_compatibility_tool_drop_down_factory_setup (ProtonPlusWidgetsCompatibilityToolDropDown* self,
                                                                GObject* object)
{
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	GtkLabel* title_label = NULL;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_list_item_get_type ()) ? ((GtkListItem*) object) : NULL);
	list_item = _tmp0_;
	_tmp1_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp1_);
	title_label = _tmp1_;
	gtk_label_set_xalign (title_label, 0.0f);
	gtk_label_set_max_width_chars (title_label, 30);
	gtk_label_set_ellipsize (title_label, PANGO_ELLIPSIZE_END);
	gtk_widget_set_hexpand ((GtkWidget*) title_label, TRUE);
	_tmp2_ = _g_object_ref0 (title_label);
	g_object_set_data_full (object, "title", _tmp2_, g_object_unref);
	gtk_list_item_set_child (list_item, (GtkWidget*) title_label);
	_g_object_unref0 (title_label);
	_g_object_unref0 (list_item);
}

static void
proton_plus_widgets_compatibility_tool_drop_down_on_destroy (ProtonPlusWidgetsCompatibilityToolDropDown* self)
{
	GtkDropDown* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->dropdown;
	gtk_widget_unparent ((GtkWidget*) _tmp0_);
}

static void
proton_plus_widgets_compatibility_tool_drop_down_on_compatibility_tools_changed (ProtonPlusWidgetsCompatibilityToolDropDown* self)
{
	g_return_if_fail (self != NULL);
}

static void
proton_plus_widgets_compatibility_tool_drop_down_class_init (ProtonPlusWidgetsCompatibilityToolDropDownClass * klass,
                                                             gpointer klass_data)
{
	proton_plus_widgets_compatibility_tool_drop_down_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsCompatibilityToolDropDown_private_offset);
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_compatibility_tool_drop_down_finalize;
}

static void
proton_plus_widgets_compatibility_tool_drop_down_instance_init (ProtonPlusWidgetsCompatibilityToolDropDown * self,
                                                                gpointer klass)
{
	self->priv = proton_plus_widgets_compatibility_tool_drop_down_get_instance_private (self);
}

static void
proton_plus_widgets_compatibility_tool_drop_down_finalize (GObject * obj)
{
	ProtonPlusWidgetsCompatibilityToolDropDown * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TYPE_COMPATIBILITY_TOOL_DROP_DOWN, ProtonPlusWidgetsCompatibilityToolDropDown);
	_g_object_unref0 (self->priv->factory);
	_g_object_unref0 (self->priv->list_factory);
	_g_object_unref0 (self->priv->last_compatibility_tool_list_item);
	_g_object_unref0 (self->dropdown);
	_g_object_unref0 (self->priv->bin_layout);
	_g_object_unref0 (self->priv->game);
	_g_hash_table_unref0 (self->priv->hast_table);
	G_OBJECT_CLASS (proton_plus_widgets_compatibility_tool_drop_down_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_compatibility_tool_drop_down_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsCompatibilityToolDropDownClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_compatibility_tool_drop_down_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsCompatibilityToolDropDown), 0, (GInstanceInitFunc) proton_plus_widgets_compatibility_tool_drop_down_instance_init, NULL };
	GType proton_plus_widgets_compatibility_tool_drop_down_type_id;
	proton_plus_widgets_compatibility_tool_drop_down_type_id = g_type_register_static (gtk_widget_get_type (), "ProtonPlusWidgetsCompatibilityToolDropDown", &g_define_type_info, 0);
	ProtonPlusWidgetsCompatibilityToolDropDown_private_offset = g_type_add_instance_private (proton_plus_widgets_compatibility_tool_drop_down_type_id, sizeof (ProtonPlusWidgetsCompatibilityToolDropDownPrivate));
	return proton_plus_widgets_compatibility_tool_drop_down_type_id;
}

GType
proton_plus_widgets_compatibility_tool_drop_down_get_type (void)
{
	static volatile gsize proton_plus_widgets_compatibility_tool_drop_down_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_compatibility_tool_drop_down_type_id__once)) {
		GType proton_plus_widgets_compatibility_tool_drop_down_type_id;
		proton_plus_widgets_compatibility_tool_drop_down_type_id = proton_plus_widgets_compatibility_tool_drop_down_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_compatibility_tool_drop_down_type_id__once, proton_plus_widgets_compatibility_tool_drop_down_type_id);
	}
	return proton_plus_widgets_compatibility_tool_drop_down_type_id__once;
}

