/* gpu-vendor-options-group.c generated by valac 0.56.19, the Vala compiler
 * generated from gpu-vendor-options-group.vala, do not modify */

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

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_GPU_VENDOR_OPTIONS_GROUP_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_GPU_VENDOR_OPTIONS_GROUP_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_GPU_VENDOR_OPTIONS_GROUP_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_GPU_VENDOR_OPTIONS_GROUP_CHANGED_SIGNAL,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_GPU_VENDOR_OPTIONS_GROUP_NUM_SIGNALS
};
static guint proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_GPU_VENDOR_OPTIONS_GROUP_NUM_SIGNALS] = {0};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroupPrivate {
	GtkStack* _stack;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* _amd_group;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* _nvidia_group;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorIntelOptionsGroup* _intel_group;
	GtkLabel* _desc_label;
	gboolean advanced_visible;
	gboolean presentation_visible;
};

static gint ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_parent_class = NULL;

static void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_desc_label (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                     GtkLabel* value);
static GtkLabel* proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_desc_label (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self);
static void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_stack (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                GtkStack* value);
static GtkStack* proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_stack (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self);
static void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_amd_group (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                    ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* value);
static void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_nvidia_group (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                       ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* value);
static void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_intel_group (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                      ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorIntelOptionsGroup* value);
static ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_amd_group (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self);
static void __lambda131_ (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self);
static void ___lambda131__proton_plus_widgets_games_launch_options_editor_groups_base_options_group_changed (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup* _sender,
                                                                                                      gpointer self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_nvidia_group (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self);
static void __lambda132_ (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self);
static void ___lambda132__proton_plus_widgets_games_launch_options_editor_groups_base_options_group_changed (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup* _sender,
                                                                                                      gpointer self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorIntelOptionsGroup* proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_intel_group (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self);
static void __lambda133_ (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self);
static void ___lambda133__proton_plus_widgets_games_launch_options_editor_groups_base_options_group_changed (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup* _sender,
                                                                                                      gpointer self);
static void __lambda134_ (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                   GObject* obj,
                   GAsyncResult* _result_);
static void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_select_detected_vendor (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                             ProtonPlusUtilsGpuVendor vendor);
static void ___lambda134__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_detected_vendor_subtitle (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                                   const gchar* vendor);
static void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_refresh_visibility (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_advanced_visible (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                           gboolean visible);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_presentation_visible (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                               gboolean visible);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_reset_controls (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_amd_options_group_reset_controls (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* self);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_nvidia_options_group_reset_controls (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* self);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_intel_options_group_reset_controls (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorIntelOptionsGroup* self);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_normalize_dependencies (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_amd_options_group_normalize_amd_fsr_upgrade_dependencies (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* self);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_nvidia_options_group_normalize_nvidia_vendor_dependencies (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* self);
static void proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_property (GObject * object,
                                                                                                         guint property_id,
                                                                                                         GValue * value,
                                                                                                         GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_property (GObject * object,
                                                                                                         guint property_id,
                                                                                                         const GValue * value,
                                                                                                         GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup_private_offset);
}

static void
__lambda131_ (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self)
{
	g_signal_emit (self, proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_GPU_VENDOR_OPTIONS_GROUP_CHANGED_SIGNAL], 0);
}

static void
___lambda131__proton_plus_widgets_games_launch_options_editor_groups_base_options_group_changed (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup* _sender,
                                                                                                 gpointer self)
{
	__lambda131_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup*) self);
}

static void
__lambda132_ (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self)
{
	g_signal_emit (self, proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_GPU_VENDOR_OPTIONS_GROUP_CHANGED_SIGNAL], 0);
}

static void
___lambda132__proton_plus_widgets_games_launch_options_editor_groups_base_options_group_changed (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup* _sender,
                                                                                                 gpointer self)
{
	__lambda132_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup*) self);
}

static void
__lambda133_ (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self)
{
	g_signal_emit (self, proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_GPU_VENDOR_OPTIONS_GROUP_CHANGED_SIGNAL], 0);
}

static void
___lambda133__proton_plus_widgets_games_launch_options_editor_groups_base_options_group_changed (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup* _sender,
                                                                                                 gpointer self)
{
	__lambda133_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup*) self);
}

static void
__lambda134_ (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
              GObject* obj,
              GAsyncResult* _result_)
{
	g_return_if_fail (_result_ != NULL);
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_select_detected_vendor (self, proton_plus_utils_system_detect_gpu_vendor_finish (_result_));
}

static void
___lambda134__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda134_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup*) self, source_object, res);
	g_object_unref (self);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup*
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_construct (GType object_type,
                                                                                           ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* launch_option_handlers,
                                                                                           ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* presentation_registry)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup * self = NULL;
	GtkBox* title_vbox = NULL;
	GtkBox* _tmp0_;
	GtkLabel* title_label = NULL;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	GtkLabel* _tmp5_;
	GtkLabel* _tmp6_;
	GtkLabel* _tmp7_;
	GtkLabel* _tmp8_;
	GtkStack* _tmp9_;
	GtkStack* _tmp10_;
	GtkStack* _tmp11_;
	GtkStack* _tmp12_;
	GtkStack* _tmp13_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* _tmp14_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* _tmp15_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* _tmp16_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* _tmp17_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorIntelOptionsGroup* _tmp18_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorIntelOptionsGroup* _tmp19_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* _tmp20_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* _tmp21_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorIntelOptionsGroup* _tmp22_;
	GtkBox* amd_box = NULL;
	GtkBox* _tmp23_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* _tmp24_;
	GtkBox* nvidia_box = NULL;
	GtkBox* _tmp25_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* _tmp26_;
	GtkBox* intel_box = NULL;
	GtkBox* _tmp27_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorIntelOptionsGroup* _tmp28_;
	GtkStack* _tmp29_;
	GtkStack* _tmp30_;
	GtkStack* _tmp31_;
	GtkStack* _tmp32_;
	g_return_val_if_fail (launch_option_handlers != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, "spacing", 12, NULL);
	self->priv->advanced_visible = FALSE;
	self->priv->presentation_visible = FALSE;
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
	g_object_ref_sink (_tmp0_);
	title_vbox = _tmp0_;
	gtk_widget_set_hexpand ((GtkWidget*) title_vbox, TRUE);
	gtk_widget_set_margin_bottom ((GtkWidget*) title_vbox, 4);
	_tmp1_ = (GtkLabel*) gtk_label_new (_ ("GPU vendor options"));
	g_object_ref_sink (_tmp1_);
	title_label = _tmp1_;
	gtk_widget_add_css_class ((GtkWidget*) title_label, "title-4");
	gtk_widget_set_halign ((GtkWidget*) title_label, GTK_ALIGN_START);
	_tmp2_ = (GtkLabel*) gtk_label_new (_ ("Use GPU-specific compatibility toggles for AMD, NVIDIA and Intel hardw" \
"are."));
	g_object_ref_sink (_tmp2_);
	_tmp3_ = _tmp2_;
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_desc_label (self, _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = self->priv->_desc_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp4_, "caption");
	_tmp5_ = self->priv->_desc_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp5_, "dim-label");
	_tmp6_ = self->priv->_desc_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_START);
	_tmp7_ = self->priv->_desc_label;
	gtk_label_set_wrap (_tmp7_, TRUE);
	gtk_box_append (title_vbox, (GtkWidget*) title_label);
	_tmp8_ = self->priv->_desc_label;
	gtk_box_append (title_vbox, (GtkWidget*) _tmp8_);
	_tmp9_ = (GtkStack*) gtk_stack_new ();
	g_object_ref_sink (_tmp9_);
	_tmp10_ = _tmp9_;
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_stack (self, _tmp10_);
	_g_object_unref0 (_tmp10_);
	_tmp11_ = self->priv->_stack;
	gtk_stack_set_hhomogeneous (_tmp11_, FALSE);
	_tmp12_ = self->priv->_stack;
	gtk_stack_set_vhomogeneous (_tmp12_, FALSE);
	_tmp13_ = self->priv->_stack;
	gtk_stack_set_transition_type (_tmp13_, GTK_STACK_TRANSITION_TYPE_CROSSFADE);
	_tmp14_ = proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_amd_options_group_new (launch_option_handlers, presentation_registry);
	g_object_ref_sink (_tmp14_);
	_tmp15_ = _tmp14_;
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_amd_group (self, _tmp15_);
	_g_object_unref0 (_tmp15_);
	_tmp16_ = proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_nvidia_options_group_new (launch_option_handlers, presentation_registry);
	g_object_ref_sink (_tmp16_);
	_tmp17_ = _tmp16_;
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_nvidia_group (self, _tmp17_);
	_g_object_unref0 (_tmp17_);
	_tmp18_ = proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_intel_options_group_new (launch_option_handlers, presentation_registry);
	g_object_ref_sink (_tmp18_);
	_tmp19_ = _tmp18_;
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_intel_group (self, _tmp19_);
	_g_object_unref0 (_tmp19_);
	_tmp20_ = self->priv->_amd_group;
	g_signal_connect_object ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup*) _tmp20_, "changed", (GCallback) ___lambda131__proton_plus_widgets_games_launch_options_editor_groups_base_options_group_changed, self, 0);
	_tmp21_ = self->priv->_nvidia_group;
	g_signal_connect_object ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup*) _tmp21_, "changed", (GCallback) ___lambda132__proton_plus_widgets_games_launch_options_editor_groups_base_options_group_changed, self, 0);
	_tmp22_ = self->priv->_intel_group;
	g_signal_connect_object ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup*) _tmp22_, "changed", (GCallback) ___lambda133__proton_plus_widgets_games_launch_options_editor_groups_base_options_group_changed, self, 0);
	_tmp23_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp23_);
	amd_box = _tmp23_;
	_tmp24_ = self->priv->_amd_group;
	gtk_box_append (amd_box, (GtkWidget*) _tmp24_);
	_tmp25_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp25_);
	nvidia_box = _tmp25_;
	_tmp26_ = self->priv->_nvidia_group;
	gtk_box_append (nvidia_box, (GtkWidget*) _tmp26_);
	_tmp27_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp27_);
	intel_box = _tmp27_;
	_tmp28_ = self->priv->_intel_group;
	gtk_box_append (intel_box, (GtkWidget*) _tmp28_);
	_tmp29_ = self->priv->_stack;
	gtk_stack_add_titled (_tmp29_, (GtkWidget*) amd_box, "amd", _ ("AMD"));
	_tmp30_ = self->priv->_stack;
	gtk_stack_add_titled (_tmp30_, (GtkWidget*) nvidia_box, "nvidia", _ ("NVIDIA"));
	_tmp31_ = self->priv->_stack;
	gtk_stack_add_titled (_tmp31_, (GtkWidget*) intel_box, "intel", _ ("Intel"));
	gtk_box_append ((GtkBox*) self, (GtkWidget*) title_vbox);
	_tmp32_ = self->priv->_stack;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp32_);
	proton_plus_utils_system_detect_gpu_vendor (___lambda134__gasync_ready_callback, g_object_ref (self));
	_g_object_unref0 (intel_box);
	_g_object_unref0 (nvidia_box);
	_g_object_unref0 (amd_box);
	_g_object_unref0 (title_label);
	_g_object_unref0 (title_vbox);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup*
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_new (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* launch_option_handlers,
                                                                                     ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* presentation_registry)
{
	return proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_TYPE_GPU_VENDOR_OPTIONS_GROUP, launch_option_handlers, presentation_registry);
}

static void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_select_detected_vendor (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                        ProtonPlusUtilsGpuVendor vendor)
{
	g_return_if_fail (self != NULL);
	switch (vendor) {
		case PROTON_PLUS_UTILS_GPU_VENDOR_AMD:
		{
			GtkStack* _tmp0_;
			_tmp0_ = self->priv->_stack;
			gtk_stack_set_visible_child_name (_tmp0_, "amd");
			proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_detected_vendor_subtitle (self, _ ("AMD"));
			break;
		}
		case PROTON_PLUS_UTILS_GPU_VENDOR_NVIDIA:
		{
			GtkStack* _tmp1_;
			_tmp1_ = self->priv->_stack;
			gtk_stack_set_visible_child_name (_tmp1_, "nvidia");
			proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_detected_vendor_subtitle (self, _ ("NVIDIA"));
			break;
		}
		case PROTON_PLUS_UTILS_GPU_VENDOR_INTEL:
		{
			GtkStack* _tmp2_;
			_tmp2_ = self->priv->_stack;
			gtk_stack_set_visible_child_name (_tmp2_, "intel");
			proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_detected_vendor_subtitle (self, _ ("Intel"));
			break;
		}
		default:
		{
			break;
		}
	}
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_refresh_visibility (self);
}

static void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_detected_vendor_subtitle (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                              const gchar* vendor)
{
	GtkLabel* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (vendor != NULL);
	_tmp0_ = self->priv->_desc_label;
	_tmp1_ = g_strdup_printf (_ ("Use GPU-specific compatibility toggles for %s hardware."), vendor);
	_tmp2_ = _tmp1_;
	gtk_label_set_label (_tmp0_, _tmp2_);
	_g_free0 (_tmp2_);
}

void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_advanced_visible (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                      gboolean visible)
{
	g_return_if_fail (self != NULL);
	self->priv->advanced_visible = visible;
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_refresh_visibility (self);
}

void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_presentation_visible (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                          gboolean visible)
{
	g_return_if_fail (self != NULL);
	self->priv->presentation_visible = visible;
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_refresh_visibility (self);
}

static void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_refresh_visibility (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	if (self->priv->advanced_visible) {
		_tmp0_ = self->priv->presentation_visible;
	} else {
		_tmp0_ = FALSE;
	}
	gtk_widget_set_visible ((GtkWidget*) self, _tmp0_);
}

void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_reset_controls (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* _tmp0_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* _tmp1_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorIntelOptionsGroup* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_amd_group;
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_amd_options_group_reset_controls (_tmp0_);
	_tmp1_ = self->priv->_nvidia_group;
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_nvidia_options_group_reset_controls (_tmp1_);
	_tmp2_ = self->priv->_intel_group;
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_intel_options_group_reset_controls (_tmp2_);
}

void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_normalize_dependencies (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* _tmp0_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_amd_group;
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_amd_options_group_normalize_amd_fsr_upgrade_dependencies (_tmp0_);
	_tmp1_ = self->priv->_nvidia_group;
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_nvidia_options_group_normalize_nvidia_vendor_dependencies (_tmp1_);
}

static GtkStack*
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_stack (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self)
{
	GtkStack* result;
	GtkStack* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_stack;
	result = _tmp0_;
	return result;
}

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

static void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_stack (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                           GtkStack* value)
{
	GtkStack* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_stack);
	self->priv->_stack = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup*
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_amd_group (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_amd_group;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_amd_group (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                               ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorAmdOptionsGroup* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_amd_group);
	self->priv->_amd_group = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup*
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_nvidia_group (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_nvidia_group;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_nvidia_group (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorNvidiaOptionsGroup* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_nvidia_group);
	self->priv->_nvidia_group = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorIntelOptionsGroup*
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_intel_group (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorIntelOptionsGroup* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorIntelOptionsGroup* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_intel_group;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_intel_group (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorIntelOptionsGroup* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorIntelOptionsGroup* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_intel_group);
	self->priv->_intel_group = _tmp0_;
}

static GtkLabel*
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_desc_label (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self)
{
	GtkLabel* result;
	GtkLabel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_desc_label;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_desc_label (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup* self,
                                                                                                GtkLabel* value)
{
	GtkLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_desc_label);
	self->priv->_desc_label = _tmp0_;
}

static void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroupClass * klass,
                                                                                            gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_finalize;
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_GPU_VENDOR_OPTIONS_GROUP_CHANGED_SIGNAL] = g_signal_new ("changed", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_TYPE_GPU_VENDOR_OPTIONS_GROUP, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup * self,
                                                                                               gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_TYPE_GPU_VENDOR_OPTIONS_GROUP, ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup);
	_g_object_unref0 (self->priv->_stack);
	_g_object_unref0 (self->priv->_amd_group);
	_g_object_unref0 (self->priv->_nvidia_group);
	_g_object_unref0 (self->priv->_intel_group);
	_g_object_unref0 (self->priv->_desc_label);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_type_id;
	proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_type_id = g_type_register_static (gtk_box_get_type (), "ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroupPrivate));
	return proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_type_id;
		proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_type_id = proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_type_id__once, proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_get_property (GObject * object,
                                                                                                    guint property_id,
                                                                                                    GValue * value,
                                                                                                    GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_TYPE_GPU_VENDOR_OPTIONS_GROUP, ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_groups_gpu_vendor_options_group_set_property (GObject * object,
                                                                                                    guint property_id,
                                                                                                    const GValue * value,
                                                                                                    GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_TYPE_GPU_VENDOR_OPTIONS_GROUP, ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsGpuVendorOptionsGroup);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

