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

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

#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_TILE (proton_plus_widgets_games_launch_options_editor_launch_option_tile_get_type ())
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_TILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_TILE, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_TILE, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTileClass))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_LAUNCH_OPTION_TILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_TILE))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_LAUNCH_OPTION_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_TILE))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_TILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_TILE, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTileClass))

typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile;
typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTileClass ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTileClass;

#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SPIN_TILE (proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_get_type ())
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SPIN_TILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SPIN_TILE, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SPIN_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SPIN_TILE, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTileClass))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_LAUNCH_OPTION_SPIN_TILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SPIN_TILE))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_LAUNCH_OPTION_SPIN_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SPIN_TILE))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SPIN_TILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SPIN_TILE, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTileClass))

typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile;
typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTileClass ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTileClass;

#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_FIELD (proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_type ())
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionFieldClass))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_LAUNCH_OPTION_RESOLUTION_FIELD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_FIELD))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_LAUNCH_OPTION_RESOLUTION_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_FIELD))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionFieldClass))

typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField;
typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionFieldClass ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionFieldClass;

#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ENTRY_FIELD (proton_plus_widgets_games_launch_options_editor_launch_option_entry_field_get_type ())
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENTRY_FIELD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ENTRY_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENTRY_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ENTRY_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryFieldClass))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_LAUNCH_OPTION_ENTRY_FIELD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ENTRY_FIELD))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_LAUNCH_OPTION_ENTRY_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ENTRY_FIELD))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENTRY_FIELD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ENTRY_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryFieldClass))

typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField;
typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryFieldClass ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryFieldClass;
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_GAMESCOPE_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_GAMESCOPE_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_GAMESCOPE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescopePrivate {
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _fullscreen_tile;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _hdr_tile;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _vrr_tile;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _framerate_tile;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _resolution_field;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* _args_field;
	GtkWidget* cached_page;
};

static gint ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_parent_class = NULL;

VALA_EXTERN GType proton_plus_widgets_games_launch_options_editor_launch_option_tile_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType proton_plus_widgets_games_launch_options_editor_launch_option_entry_field_get_type (void) G_GNUC_CONST ;
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_fullscreen_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self);
VALA_EXTERN GtkSwitch* proton_plus_widgets_games_launch_options_editor_launch_option_tile_get_toggle (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_hdr_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_vrr_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_framerate_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self);
VALA_EXTERN GtkSwitch* proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_get_toggle (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* self);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_set_value (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* self,
                                                                                        gint value);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_resolution_field (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_reset (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_args_field (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_launch_option_entry_field_set_text (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* self,
                                                                                         const gchar* text);
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* proton_plus_widgets_games_launch_options_editor_wrappers_base_create_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                                                                      const gchar* title,
                                                                                                                                      const gchar* subtitle,
                                                                                                                                      gchar** tokens,
                                                                                                                                      gint tokens_length1,
                                                                                                                                      gboolean is_advanced,
                                                                                                                                      ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType type,
                                                                                                                                      const gchar* id);
static void proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_fullscreen_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self,
                                                                                             ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value);
static void proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_hdr_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self,
                                                                                      ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value);
static void proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_vrr_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self,
                                                                                      ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value);
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_new (const gchar* title,
                                                                                                                                            const gchar* subtitle,
                                                                                                                                            const gchar* value_label,
                                                                                                                                            gdouble lower,
                                                                                                                                            gdouble upper,
                                                                                                                                            gint default_value,
                                                                                                                                            const gchar* env_prefix);
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_construct (GType object_type,
                                                                                                                                                  const gchar* title,
                                                                                                                                                  const gchar* subtitle,
                                                                                                                                                  const gchar* value_label,
                                                                                                                                                  gdouble lower,
                                                                                                                                                  gdouble upper,
                                                                                                                                                  gint default_value,
                                                                                                                                                  const gchar* env_prefix);
static void proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_framerate_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self,
                                                                                            ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* value);
static void __lambda136_ (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self);
static void ___lambda136__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void __lambda137_ (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self);
static void ___lambda137__proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_value_applied (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _sender,
                                                                                                          gpointer self);
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_new (const gchar* title,
                                                                                                                                                          const gchar* subtitle,
                                                                                                                                                          gboolean include_auto,
                                                                                                                                                          gboolean is_scopebuddy);
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_construct (GType object_type,
                                                                                                                                                                const gchar* title,
                                                                                                                                                                const gchar* subtitle,
                                                                                                                                                                gboolean include_auto,
                                                                                                                                                                gboolean is_scopebuddy);
static void proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_resolution_field (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self,
                                                                                              ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* value);
VALA_EXTERN GtkSwitch* proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_toggle (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void __lambda138_ (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self);
static void ___lambda138__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
VALA_EXTERN GtkDropDown* proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_dropdown (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void __lambda139_ (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self);
static void ___lambda139__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void __lambda140_ (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self);
static void ___lambda140__proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_value_applied (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _sender,
                                                                                                                 gpointer self);
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* proton_plus_widgets_games_launch_options_editor_launch_option_entry_field_new (const gchar* title,
                                                                                                                                                const gchar* subtitle,
                                                                                                                                                const gchar* placeholder);
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* proton_plus_widgets_games_launch_options_editor_launch_option_entry_field_construct (GType object_type,
                                                                                                                                                      const gchar* title,
                                                                                                                                                      const gchar* subtitle,
                                                                                                                                                      const gchar* placeholder);
static void proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_args_field (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self,
                                                                                        ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* value);
static void __lambda141_ (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self);
static void ___lambda141__proton_plus_widgets_games_launch_options_editor_launch_option_entry_field_value_applied (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* _sender,
                                                                                                            gpointer self);
static void proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_real_clear (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* base);
static void proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_real_parse_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* base,
                                                                                           gchar** tokens,
                                                                                           gint tokens_length1,
                                                                                           gboolean* consumed,
                                                                                           gint consumed_length1);
VALA_EXTERN gint proton_plus_widgets_games_launch_options_editor_wrappers_base_get_first_present_index (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                            gchar** tokens,
                                                                                            gint tokens_length1,
                                                                                            gchar** candidates,
                                                                                            gint candidates_length1);
VALA_EXTERN gint proton_plus_widgets_games_launch_options_editor_wrappers_base_get_wrapper_end_index (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                          gchar** tokens,
                                                                                          gint tokens_length1,
                                                                                          gint wrapper_index,
                                                                                          gboolean* consumed,
                                                                                          gint consumed_length1);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_wrappers_base_append_token (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                 GString* output,
                                                                                 const gchar* token);
static void proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_real_append_command_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* base,
                                                                                                      GeeLinkedList* segments);
static void proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_property (GObject * object,
                                                                                            guint property_id,
                                                                                            GValue * value,
                                                                                            GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_property (GObject * object,
                                                                                            guint property_id,
                                                                                            const GValue * value,
                                                                                            GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope_private_offset);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope*
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_construct (GType object_type,
                                                                              ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* launch_option_handlers,
                                                                              ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* presentation_registry)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope * self = NULL;
	g_return_val_if_fail (launch_option_handlers != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope*) proton_plus_widgets_games_launch_options_editor_wrappers_base_construct (object_type, launch_option_handlers, presentation_registry);
	_g_object_unref0 (self->priv->cached_page);
	self->priv->cached_page = NULL;
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope*
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_new (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* launch_option_handlers,
                                                                        ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* presentation_registry)
{
	return proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_TYPE_GAMESCOPE, launch_option_handlers, presentation_registry);
}

void
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_selection_change (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	GtkSwitch* _tmp1_;
	GtkSwitch* _tmp2_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp3_;
	GtkSwitch* _tmp4_;
	GtkSwitch* _tmp5_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp6_;
	GtkSwitch* _tmp7_;
	GtkSwitch* _tmp8_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _tmp9_;
	GtkSwitch* _tmp10_;
	GtkSwitch* _tmp11_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _tmp12_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _tmp13_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* _tmp14_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_fullscreen_tile;
	_tmp1_ = proton_plus_widgets_games_launch_options_editor_launch_option_tile_get_toggle (_tmp0_);
	_tmp2_ = _tmp1_;
	gtk_switch_set_active (_tmp2_, FALSE);
	_tmp3_ = self->priv->_hdr_tile;
	_tmp4_ = proton_plus_widgets_games_launch_options_editor_launch_option_tile_get_toggle (_tmp3_);
	_tmp5_ = _tmp4_;
	gtk_switch_set_active (_tmp5_, FALSE);
	_tmp6_ = self->priv->_vrr_tile;
	_tmp7_ = proton_plus_widgets_games_launch_options_editor_launch_option_tile_get_toggle (_tmp6_);
	_tmp8_ = _tmp7_;
	gtk_switch_set_active (_tmp8_, FALSE);
	_tmp9_ = self->priv->_framerate_tile;
	_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_get_toggle (_tmp9_);
	_tmp11_ = _tmp10_;
	gtk_switch_set_active (_tmp11_, FALSE);
	_tmp12_ = self->priv->_framerate_tile;
	proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_set_value (_tmp12_, 60);
	_tmp13_ = self->priv->_resolution_field;
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_reset (_tmp13_);
	_tmp14_ = self->priv->_args_field;
	proton_plus_widgets_games_launch_options_editor_launch_option_entry_field_set_text (_tmp14_, "");
}

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

static void
__lambda136_ (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	g_signal_emit_by_name ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, "changed");
}

static void
___lambda136__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda136_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope*) self);
}

static void
__lambda137_ (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	g_signal_emit_by_name ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, "changed");
}

static void
___lambda137__proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_value_applied (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _sender,
                                                                                                     gpointer self)
{
	__lambda137_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope*) self);
}

static void
__lambda138_ (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	g_signal_emit_by_name ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, "changed");
}

static void
___lambda138__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda138_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope*) self);
}

static void
__lambda139_ (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	g_signal_emit_by_name ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, "changed");
}

static void
___lambda139__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda139_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope*) self);
}

static void
__lambda140_ (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	g_signal_emit_by_name ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, "changed");
}

static void
___lambda140__proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_value_applied (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _sender,
                                                                                                            gpointer self)
{
	__lambda140_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope*) self);
}

static void
__lambda141_ (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	g_signal_emit_by_name ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, "changed");
}

static void
___lambda141__proton_plus_widgets_games_launch_options_editor_launch_option_entry_field_value_applied (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* _sender,
                                                                                                       gpointer self)
{
	__lambda141_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope*) self);
}

GtkWidget*
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_create_page (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	GtkWidget* _tmp0_;
	AdwPreferencesGroup* group = NULL;
	AdwPreferencesGroup* _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp5_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp7_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp8_;
	gchar* _tmp9_;
	gchar** _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp12_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp13_;
	gchar* _tmp14_;
	gchar** _tmp15_;
	gchar** _tmp16_;
	gint _tmp16__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp17_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp18_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _tmp19_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _tmp20_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _tmp21_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _tmp22_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _tmp23_;
	GtkSwitch* _tmp24_;
	GtkSwitch* _tmp25_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _tmp26_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _tmp27_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _tmp28_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _tmp29_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _tmp30_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _tmp31_;
	GtkSwitch* _tmp32_;
	GtkSwitch* _tmp33_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _tmp34_;
	GtkDropDown* _tmp35_;
	GtkDropDown* _tmp36_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _tmp37_;
	AdwPreferencesGroup* _tmp38_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp39_;
	AdwPreferencesGroup* _tmp40_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp41_;
	AdwPreferencesGroup* _tmp42_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp43_;
	AdwPreferencesGroup* _tmp44_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _tmp45_;
	AdwPreferencesGroup* _tmp46_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _tmp47_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _tmp48_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _tmp49_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* _tmp50_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* _tmp51_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* _tmp52_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* _tmp53_;
	AdwPreferencesGroup* _tmp54_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* _tmp55_;
	AdwPreferencesGroup* _tmp56_;
	GtkWidget* _tmp57_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->cached_page;
	if (_tmp0_ != NULL) {
		GtkWidget* _tmp1_;
		GtkWidget* _tmp2_;
		_tmp1_ = self->priv->cached_page;
		_tmp2_ = _g_object_ref0 (_tmp1_);
		result = _tmp2_;
		return result;
	}
	_tmp3_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	g_object_ref_sink (_tmp3_);
	group = _tmp3_;
	_tmp4_ = g_strdup ("-f");
	_tmp5_ = g_new0 (gchar*, 1 + 1);
	_tmp5_[0] = _tmp4_;
	_tmp6_ = _tmp5_;
	_tmp6__length1 = 1;
	_tmp7_ = proton_plus_widgets_games_launch_options_editor_wrappers_base_create_tile ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, _ ("Fullscreen"), _ ("Runs the game in a fullscreen session."), _tmp6_, (gint) 1, TRUE, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_WRAPPER_ARGUMENT, "gamescope-fullscreen");
	_tmp8_ = _tmp7_;
	proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_fullscreen_tile (self, _tmp8_);
	_g_object_unref0 (_tmp8_);
	_tmp6_ = (_vala_array_free (_tmp6_, _tmp6__length1, (GDestroyNotify) g_free), NULL);
	_tmp9_ = g_strdup ("--hdr-enabled");
	_tmp10_ = g_new0 (gchar*, 1 + 1);
	_tmp10_[0] = _tmp9_;
	_tmp11_ = _tmp10_;
	_tmp11__length1 = 1;
	_tmp12_ = proton_plus_widgets_games_launch_options_editor_wrappers_base_create_tile ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, _ ("HDR"), _ ("Outputs HDR colors if your display supports it."), _tmp11_, (gint) 1, TRUE, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_WRAPPER_ARGUMENT, "gamescope-hdr");
	_tmp13_ = _tmp12_;
	proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_hdr_tile (self, _tmp13_);
	_g_object_unref0 (_tmp13_);
	_tmp11_ = (_vala_array_free (_tmp11_, _tmp11__length1, (GDestroyNotify) g_free), NULL);
	_tmp14_ = g_strdup ("--adaptive-sync");
	_tmp15_ = g_new0 (gchar*, 1 + 1);
	_tmp15_[0] = _tmp14_;
	_tmp16_ = _tmp15_;
	_tmp16__length1 = 1;
	_tmp17_ = proton_plus_widgets_games_launch_options_editor_wrappers_base_create_tile ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, _ ("Variable refresh rate"), _ ("Matches your display's refresh rate to the game's FPS."), _tmp16_, (gint) 1, TRUE, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_WRAPPER_ARGUMENT, "gamescope-vrr");
	_tmp18_ = _tmp17_;
	proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_vrr_tile (self, _tmp18_);
	_g_object_unref0 (_tmp18_);
	_tmp16_ = (_vala_array_free (_tmp16_, _tmp16__length1, (GDestroyNotify) g_free), NULL);
	_tmp19_ = proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_new (_ ("Frame limit"), _ ("Caps the frame rate inside Gamescope."), _ ("FPS"), (gdouble) 30, (gdouble) 360, 60, "-r ");
	g_object_ref_sink (_tmp19_);
	_tmp20_ = _tmp19_;
	proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_framerate_tile (self, _tmp20_);
	_g_object_unref0 (_tmp20_);
	_tmp21_ = self->priv->_framerate_tile;
	_tmp22_ = self->priv->_framerate_tile;
	proton_plus_widgets_games_launch_options_editor_wrappers_base_register_option ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, "gamescope-frame-limit", (GtkWidget*) _tmp21_, (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp22_);
	_tmp23_ = self->priv->_framerate_tile;
	_tmp24_ = proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_get_toggle (_tmp23_);
	_tmp25_ = _tmp24_;
	g_signal_connect_object ((GObject*) _tmp25_, "notify::active", (GCallback) ___lambda136__g_object_notify, self, 0);
	_tmp26_ = self->priv->_framerate_tile;
	g_signal_connect_object (_tmp26_, "value-applied", (GCallback) ___lambda137__proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_value_applied, self, 0);
	_tmp27_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_new (_ ("Resolution"), _ ("Sets the Gamescope output resolution."), FALSE, FALSE);
	g_object_ref_sink (_tmp27_);
	_tmp28_ = _tmp27_;
	proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_resolution_field (self, _tmp28_);
	_g_object_unref0 (_tmp28_);
	_tmp29_ = self->priv->_resolution_field;
	_tmp30_ = self->priv->_resolution_field;
	proton_plus_widgets_games_launch_options_editor_wrappers_base_register_option ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, "gamescope-resolution", (GtkWidget*) _tmp29_, (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp30_);
	_tmp31_ = self->priv->_resolution_field;
	_tmp32_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_toggle (_tmp31_);
	_tmp33_ = _tmp32_;
	g_signal_connect_object ((GObject*) _tmp33_, "notify::active", (GCallback) ___lambda138__g_object_notify, self, 0);
	_tmp34_ = self->priv->_resolution_field;
	_tmp35_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_dropdown (_tmp34_);
	_tmp36_ = _tmp35_;
	g_signal_connect_object ((GObject*) _tmp36_, "notify::selected", (GCallback) ___lambda139__g_object_notify, self, 0);
	_tmp37_ = self->priv->_resolution_field;
	g_signal_connect_object (_tmp37_, "value-applied", (GCallback) ___lambda140__proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_value_applied, self, 0);
	_tmp38_ = group;
	_tmp39_ = self->priv->_fullscreen_tile;
	adw_preferences_group_add (_tmp38_, (GtkWidget*) _tmp39_);
	_tmp40_ = group;
	_tmp41_ = self->priv->_hdr_tile;
	adw_preferences_group_add (_tmp40_, (GtkWidget*) _tmp41_);
	_tmp42_ = group;
	_tmp43_ = self->priv->_vrr_tile;
	adw_preferences_group_add (_tmp42_, (GtkWidget*) _tmp43_);
	_tmp44_ = group;
	_tmp45_ = self->priv->_framerate_tile;
	adw_preferences_group_add (_tmp44_, (GtkWidget*) _tmp45_);
	_tmp46_ = group;
	_tmp47_ = self->priv->_resolution_field;
	adw_preferences_group_add (_tmp46_, (GtkWidget*) _tmp47_);
	_tmp48_ = self->priv->_framerate_tile;
	proton_plus_widgets_games_launch_options_editor_ilaunch_option_add_child ((ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self, (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp48_);
	_tmp49_ = self->priv->_resolution_field;
	proton_plus_widgets_games_launch_options_editor_ilaunch_option_add_child ((ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self, (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp49_);
	_tmp50_ = proton_plus_widgets_games_launch_options_editor_launch_option_entry_field_new (_ ("Additional Gamescope arguments"), _ ("Keeps extra Gamescope flags such as output or resolution tweaks."), _ ("Add Gamescope arguments"));
	g_object_ref_sink (_tmp50_);
	_tmp51_ = _tmp50_;
	proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_args_field (self, _tmp51_);
	_g_object_unref0 (_tmp51_);
	_tmp52_ = self->priv->_args_field;
	proton_plus_widgets_games_launch_options_editor_wrappers_base_register_option ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, "gamescope-arguments", (GtkWidget*) _tmp52_, NULL);
	_tmp53_ = self->priv->_args_field;
	g_signal_connect_object (_tmp53_, "value-applied", (GCallback) ___lambda141__proton_plus_widgets_games_launch_options_editor_launch_option_entry_field_value_applied, self, 0);
	_tmp54_ = group;
	_tmp55_ = self->priv->_args_field;
	adw_preferences_group_add (_tmp54_, (GtkWidget*) _tmp55_);
	_tmp56_ = group;
	_tmp57_ = _g_object_ref0 ((GtkWidget*) _tmp56_);
	_g_object_unref0 (self->priv->cached_page);
	self->priv->cached_page = _tmp57_;
	result = (GtkWidget*) group;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_real_clear (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* base)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope * self;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* _tmp9_;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope*) base;
	{
		GeeList* _child_list = NULL;
		GeeList* _tmp0_;
		gint _child_size = 0;
		GeeList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _child_index = 0;
		_tmp0_ = ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self)->_children;
		_child_list = _tmp0_;
		_tmp1_ = _child_list;
		_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_child_size = _tmp3_;
		_child_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* child = NULL;
			GeeList* _tmp6_;
			gpointer _tmp7_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp8_;
			_child_index = _child_index + 1;
			_tmp4_ = _child_index;
			_tmp5_ = _child_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _child_list;
			_tmp7_ = gee_list_get (_tmp6_, _child_index);
			child = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp7_;
			_tmp8_ = child;
			proton_plus_widgets_games_launch_options_editor_ilaunch_option_clear (_tmp8_);
			_g_object_unref0 (child);
		}
	}
	_tmp9_ = self->priv->_args_field;
	proton_plus_widgets_games_launch_options_editor_launch_option_entry_field_set_text (_tmp9_, "");
}

static gboolean
int_try_parse (const gchar* str,
               gint* _result_,
               const gchar** unparsed,
               guint _base)
{
	gint _vala__result_ = 0;
	const gchar* _vala_unparsed = NULL;
	gchar* endptr = NULL;
	glong long_result = 0L;
	gchar* _tmp0_ = NULL;
	glong _tmp1_;
	gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	glong _tmp6_;
	gboolean result;
	g_return_val_if_fail (str != NULL, FALSE);
	errno = 0;
	_tmp1_ = strtol (str, &_tmp0_, (gint) _base);
	endptr = _tmp0_;
	long_result = _tmp1_;
	_tmp2_ = endptr;
	_tmp3_ = strlen (str);
	_tmp4_ = _tmp3_;
	if (_tmp2_ == (((gchar*) str) + _tmp4_)) {
		_vala_unparsed = "";
	} else {
		gchar* _tmp5_;
		_tmp5_ = endptr;
		_vala_unparsed = (const gchar*) _tmp5_;
	}
	_tmp6_ = long_result;
	if ((((glong) G_MININT) <= _tmp6_) && (_tmp6_ <= ((glong) G_MAXINT))) {
		gboolean _tmp7_ = FALSE;
		gboolean _tmp8_ = FALSE;
		_vala__result_ = (gint) long_result;
		if (errno != ERANGE) {
			_tmp8_ = errno != EINVAL;
		} else {
			_tmp8_ = FALSE;
		}
		if (_tmp8_) {
			const gchar* _tmp9_;
			gchar* _tmp10_;
			_tmp9_ = _vala_unparsed;
			_tmp10_ = endptr;
			_tmp7_ = _tmp9_ != _tmp10_;
		} else {
			_tmp7_ = FALSE;
		}
		result = _tmp7_;
		if (_result_) {
			*_result_ = _vala__result_;
		}
		if (unparsed) {
			*unparsed = _vala_unparsed;
		}
		return result;
	} else {
		_vala__result_ = G_MAXINT;
		result = FALSE;
		if (_result_) {
			*_result_ = _vala__result_;
		}
		if (unparsed) {
			*unparsed = _vala_unparsed;
		}
		return result;
	}
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_real_parse_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* base,
                                                                                      gchar** tokens,
                                                                                      gint tokens_length1,
                                                                                      gboolean* consumed,
                                                                                      gint consumed_length1)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope * self;
	gint wrapper_index = 0;
	gchar* _tmp0_;
	gchar** _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	gint _tmp3_;
	gint end_index = 0;
	GString* extra_args = NULL;
	GString* _tmp4_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* _tmp34_;
	GString* _tmp35_;
	const gchar* _tmp36_;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope*) base;
	_tmp0_ = g_strdup ("gamescope");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp2__length1 = 1;
	_tmp3_ = proton_plus_widgets_games_launch_options_editor_wrappers_base_get_first_present_index ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, tokens, (gint) tokens_length1, _tmp2_, (gint) 1);
	_tmp2_ = (_vala_array_free (_tmp2_, _tmp2__length1, (GDestroyNotify) g_free), NULL);
	wrapper_index = _tmp3_;
	if (wrapper_index < 0) {
		proton_plus_widgets_games_launch_options_editor_wrappers_base_set_active ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, FALSE);
		return;
	}
	proton_plus_widgets_games_launch_options_editor_wrappers_base_set_active ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, TRUE);
	consumed[wrapper_index] = TRUE;
	end_index = proton_plus_widgets_games_launch_options_editor_wrappers_base_get_wrapper_end_index ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, tokens, (gint) tokens_length1, wrapper_index, consumed, (gint) consumed_length1);
	_tmp4_ = g_string_new ("");
	extra_args = _tmp4_;
	{
		gint index = 0;
		index = wrapper_index + 1;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				gchar* token = NULL;
				const gchar* _tmp7_;
				gchar* _tmp8_;
				gboolean _tmp9_;
				const gchar* _tmp10_;
				const gchar* _tmp14_;
				const gchar* _tmp18_;
				gboolean _tmp22_ = FALSE;
				const gchar* _tmp23_;
				GString* _tmp32_;
				const gchar* _tmp33_;
				if (!_tmp5_) {
					gint _tmp6_;
					_tmp6_ = index;
					index = _tmp6_ + 1;
				}
				_tmp5_ = FALSE;
				if (!(index < end_index)) {
					break;
				}
				_tmp7_ = tokens[index];
				_tmp8_ = g_strdup (_tmp7_);
				token = _tmp8_;
				_tmp9_ = consumed[index];
				if (_tmp9_) {
					_g_free0 (token);
					continue;
				}
				_tmp10_ = token;
				if (g_strcmp0 (_tmp10_, "-f") == 0) {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp11_;
					GtkSwitch* _tmp12_;
					GtkSwitch* _tmp13_;
					_tmp11_ = self->priv->_fullscreen_tile;
					_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_option_tile_get_toggle (_tmp11_);
					_tmp13_ = _tmp12_;
					gtk_switch_set_active (_tmp13_, TRUE);
					consumed[index] = TRUE;
					_g_free0 (token);
					continue;
				}
				_tmp14_ = token;
				if (g_strcmp0 (_tmp14_, "--hdr-enabled") == 0) {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp15_;
					GtkSwitch* _tmp16_;
					GtkSwitch* _tmp17_;
					_tmp15_ = self->priv->_hdr_tile;
					_tmp16_ = proton_plus_widgets_games_launch_options_editor_launch_option_tile_get_toggle (_tmp15_);
					_tmp17_ = _tmp16_;
					gtk_switch_set_active (_tmp17_, TRUE);
					consumed[index] = TRUE;
					_g_free0 (token);
					continue;
				}
				_tmp18_ = token;
				if (g_strcmp0 (_tmp18_, "--adaptive-sync") == 0) {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp19_;
					GtkSwitch* _tmp20_;
					GtkSwitch* _tmp21_;
					_tmp19_ = self->priv->_vrr_tile;
					_tmp20_ = proton_plus_widgets_games_launch_options_editor_launch_option_tile_get_toggle (_tmp19_);
					_tmp21_ = _tmp20_;
					gtk_switch_set_active (_tmp21_, TRUE);
					consumed[index] = TRUE;
					_g_free0 (token);
					continue;
				}
				_tmp23_ = token;
				if (g_strcmp0 (_tmp23_, "-r") == 0) {
					_tmp22_ = (index + 1) < end_index;
				} else {
					_tmp22_ = FALSE;
				}
				if (_tmp22_) {
					gint framerate = 0;
					const gchar* _tmp24_;
					gint _tmp25_ = 0;
					gboolean _tmp26_;
					_tmp24_ = tokens[index + 1];
					_tmp26_ = int_try_parse (_tmp24_, &_tmp25_, NULL, (guint) 0);
					framerate = _tmp25_;
					if (_tmp26_) {
						ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _tmp27_;
						GtkSwitch* _tmp28_;
						GtkSwitch* _tmp29_;
						ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _tmp30_;
						gint _tmp31_;
						_tmp27_ = self->priv->_framerate_tile;
						_tmp28_ = proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_get_toggle (_tmp27_);
						_tmp29_ = _tmp28_;
						gtk_switch_set_active (_tmp29_, TRUE);
						_tmp30_ = self->priv->_framerate_tile;
						proton_plus_widgets_games_launch_options_editor_launch_option_spin_tile_set_value (_tmp30_, framerate);
						consumed[index] = TRUE;
						consumed[index + 1] = TRUE;
						_tmp31_ = index;
						index = _tmp31_ + 1;
						_g_free0 (token);
						continue;
					}
				}
				_tmp32_ = extra_args;
				_tmp33_ = token;
				proton_plus_widgets_games_launch_options_editor_wrappers_base_append_token ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self, _tmp32_, _tmp33_);
				consumed[index] = TRUE;
				_g_free0 (token);
			}
		}
	}
	_tmp34_ = self->priv->_args_field;
	_tmp35_ = extra_args;
	_tmp36_ = _tmp35_->str;
	proton_plus_widgets_games_launch_options_editor_launch_option_entry_field_set_text (_tmp34_, _tmp36_);
	{
		GeeList* _child_list = NULL;
		GeeList* _tmp37_;
		gint _child_size = 0;
		GeeList* _tmp38_;
		gint _tmp39_;
		gint _tmp40_;
		gint _child_index = 0;
		_tmp37_ = ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self)->_children;
		_child_list = _tmp37_;
		_tmp38_ = _child_list;
		_tmp39_ = gee_collection_get_size ((GeeCollection*) _tmp38_);
		_tmp40_ = _tmp39_;
		_child_size = _tmp40_;
		_child_index = -1;
		while (TRUE) {
			gint _tmp41_;
			gint _tmp42_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* child = NULL;
			GeeList* _tmp43_;
			gpointer _tmp44_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp45_;
			_child_index = _child_index + 1;
			_tmp41_ = _child_index;
			_tmp42_ = _child_size;
			if (!(_tmp41_ < _tmp42_)) {
				break;
			}
			_tmp43_ = _child_list;
			_tmp44_ = gee_list_get (_tmp43_, _child_index);
			child = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp44_;
			_tmp45_ = child;
			proton_plus_widgets_games_launch_options_editor_ilaunch_option_parse_tokens (_tmp45_, tokens, (gint) tokens_length1, consumed, (gint) consumed_length1);
			_g_object_unref0 (child);
		}
	}
	_g_string_free0 (extra_args);
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_real_append_command_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* base,
                                                                                                 GeeLinkedList* segments)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope * self;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope*) base;
	g_return_if_fail (segments != NULL);
	if (!proton_plus_widgets_games_launch_options_editor_ilaunch_option_is_active ((ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self)) {
		return;
	}
	gee_abstract_collection_add ((GeeAbstractCollection*) segments, "gamescope");
	{
		GeeList* _child_list = NULL;
		GeeList* _tmp0_;
		gint _child_size = 0;
		GeeList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _child_index = 0;
		_tmp0_ = ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self)->_children;
		_child_list = _tmp0_;
		_tmp1_ = _child_list;
		_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_child_size = _tmp3_;
		_child_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* child = NULL;
			GeeList* _tmp6_;
			gpointer _tmp7_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp8_;
			_child_index = _child_index + 1;
			_tmp4_ = _child_index;
			_tmp5_ = _child_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _child_list;
			_tmp7_ = gee_list_get (_tmp6_, _child_index);
			child = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp7_;
			_tmp8_ = child;
			if (proton_plus_widgets_games_launch_options_editor_ilaunch_option_is_active (_tmp8_)) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp9_;
				_tmp9_ = child;
				proton_plus_widgets_games_launch_options_editor_ilaunch_option_append_command_segments (_tmp9_, segments);
			}
			_g_object_unref0 (child);
		}
	}
	gee_abstract_collection_add ((GeeAbstractCollection*) segments, "--");
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile*
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_fullscreen_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_fullscreen_tile;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_fullscreen_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self,
                                                                                        ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_fullscreen_tile);
	self->priv->_fullscreen_tile = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile*
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_hdr_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_hdr_tile;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_hdr_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self,
                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_hdr_tile);
	self->priv->_hdr_tile = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile*
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_vrr_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_vrr_tile;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_vrr_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self,
                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_vrr_tile);
	self->priv->_vrr_tile = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile*
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_framerate_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_framerate_tile;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_framerate_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self,
                                                                                       ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSpinTile* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_framerate_tile);
	self->priv->_framerate_tile = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_resolution_field (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_resolution_field;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_resolution_field (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self,
                                                                                         ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_resolution_field);
	self->priv->_resolution_field = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField*
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_args_field (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_args_field;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_args_field (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope* self,
                                                                                   ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEntryField* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_args_field);
	self->priv->_args_field = _tmp0_;
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescopeClass * klass,
                                                                               gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope_private_offset);
	((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBaseClass *) klass)->clear = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*)) proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_real_clear;
	((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBaseClass *) klass)->parse_tokens = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*, gchar**, gint, gboolean*, gint)) proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_real_parse_tokens;
	((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBaseClass *) klass)->append_command_segments = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*, GeeLinkedList*)) proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_real_append_command_segments;
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_finalize;
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope * self,
                                                                                  gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_TYPE_GAMESCOPE, ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope);
	_g_object_unref0 (self->priv->_fullscreen_tile);
	_g_object_unref0 (self->priv->_hdr_tile);
	_g_object_unref0 (self->priv->_vrr_tile);
	_g_object_unref0 (self->priv->_framerate_tile);
	_g_object_unref0 (self->priv->_resolution_field);
	_g_object_unref0 (self->priv->_args_field);
	_g_object_unref0 (self->priv->cached_page);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescopeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_type_id;
	proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_type_id = g_type_register_static (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_TYPE_BASE, "ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescopePrivate));
	return proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_type_id;
		proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_type_id = proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_type_id__once, proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_wrappers_gamescope_get_property (GObject * object,
                                                                                       guint property_id,
                                                                                       GValue * value,
                                                                                       GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_TYPE_GAMESCOPE, ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope);
	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_wrappers_gamescope_set_property (GObject * object,
                                                                                       guint property_id,
                                                                                       const GValue * value,
                                                                                       GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_TYPE_GAMESCOPE, ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersGamescope);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

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;
}

