/* launch-options-editor-resolution-field.c generated by valac 0.56.19, the Vala compiler
 * generated from launch-options-editor-resolution-field.vala, do not modify */

#include <adwaita.h>
#include "protonplus_core.h"
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gee.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.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_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;
typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionFieldPrivate ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionFieldPrivate;

#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_CHOICE (proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_type ())
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_CHOICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_CHOICE, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_CHOICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_CHOICE, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoiceClass))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_LAUNCH_OPTION_RESOLUTION_CHOICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_CHOICE))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_LAUNCH_OPTION_RESOLUTION_CHOICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_CHOICE))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_CHOICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_CHOICE, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoiceClass))

typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice;
typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoiceClass ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoiceClass;
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_TOGGLE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_DROPDOWN_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_WIDTH_ENTRY_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_HEIGHT_ENTRY_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_APPLY_BUTTON_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_IS_ADVANCED_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_LINE_TYPE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_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 _gtk_expression_unref0(var) ((var == NULL) ? NULL : (var = (gtk_expression_unref (var), NULL)))
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_VALUE_APPLIED_SIGNAL,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_CHANGED_SIGNAL,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_NUM_SIGNALS
};
static guint proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_NUM_SIGNALS] = {0};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField {
	AdwActionRow parent_instance;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionFieldPrivate * priv;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionFieldClass {
	AdwActionRowClass parent_class;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionFieldPrivate {
	GtkSwitch* _toggle;
	GtkDropDown* _dropdown;
	GtkEntry* _width_entry;
	GtkEntry* _height_entry;
	GtkButton* _apply_button;
	GtkBox* custom_box;
	GeeLinkedList* choices;
	gint committed_width;
	gint committed_height;
	gboolean _is_advanced;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType _line_type;
	GeeList* _children;
	gboolean is_scopebuddy;
};

static gint ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_parent_class = NULL;
static ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOptionIface * proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_proton_plus_widgets_games_launch_options_editor_ilaunch_option_parent_iface = NULL;

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_resolution_choice_get_type (void) G_GNUC_CONST ;
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);
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_new (const gchar* label,
                                                                                                                                                            gint width,
                                                                                                                                                            gint height,
                                                                                                                                                            gboolean is_auto,
                                                                                                                                                            gboolean is_custom);
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_construct (GType object_type,
                                                                                                                                                                  const gchar* label,
                                                                                                                                                                  gint width,
                                                                                                                                                                  gint height,
                                                                                                                                                                  gboolean is_auto,
                                                                                                                                                                  gboolean is_custom);
VALA_EXTERN const gchar* proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_label (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_dropdown (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                                  GtkDropDown* value);
VALA_EXTERN GtkDropDown* proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_dropdown (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_toggle (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                                GtkSwitch* value);
VALA_EXTERN GtkSwitch* proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_toggle (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_width_entry (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                                     GtkEntry* value);
VALA_EXTERN GtkEntry* proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_width_entry (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_apply_pending_resolution (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void _proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_apply_pending_resolution_gtk_entry_activate (GtkEntry* _sender,
                                                                                                                                  gpointer self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_height_entry (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                                      GtkEntry* value);
VALA_EXTERN GtkEntry* proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_height_entry (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_apply_button (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                                      GtkButton* value);
VALA_EXTERN GtkButton* proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_apply_button (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void _proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_apply_pending_resolution_gtk_button_clicked (GtkButton* _sender,
                                                                                                                                  gpointer self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_options_visibility (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void _proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_options_visibility_g_object_notify (GObject* _sender,
                                                                                                                                 GParamSpec* pspec,
                                                                                                                                 gpointer self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_visibility (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void _proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_visibility_g_object_notify (GObject* _sender,
                                                                                                                                GParamSpec* pspec,
                                                                                                                                gpointer self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_state (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void _proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_state_gtk_editable_changed (GtkEditable* _sender,
                                                                                                                                gpointer self);
static void __lambda117_ (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void ___lambda117__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void __lambda118_ (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void ___lambda118__proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_value_applied (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _sender,
                                                                                                                 gpointer self);
static void __lambda119_ (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void ___lambda119__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_add_child (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                                    ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* child);
static void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_clear (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_reset (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_parse_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                                       gchar** tokens,
                                                                                                       gint tokens_length1,
                                                                                                       gboolean* consumed,
                                                                                                       gint consumed_length1);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_auto (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_resolution (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                                    gint width,
                                                                                                    gint height);
static void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_append_command_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                                                  GeeLinkedList* segments);
VALA_EXTERN gboolean proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_is_auto (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
VALA_EXTERN gboolean proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_has_resolution (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_resolution (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                                    gint* width,
                                                                                                    gint* height);
VALA_EXTERN gboolean proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_is_auto (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* self);
VALA_EXTERN gint proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_width (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* self);
VALA_EXTERN gint proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_height (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* self);
VALA_EXTERN gboolean proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_is_custom (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_selected_choice (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_pending_resolution (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                                                gint* width,
                                                                                                                gint* height);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_is_active (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base);
static void proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_property (GObject * object,
                                                                                                        guint property_id,
                                                                                                        GValue * value,
                                                                                                        GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_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_launch_option_resolution_field_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField_private_offset);
}

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

static void
_proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_apply_pending_resolution_gtk_entry_activate (GtkEntry* _sender,
                                                                                                                             gpointer self)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_apply_pending_resolution ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) self);
}

static void
_proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_apply_pending_resolution_gtk_button_clicked (GtkButton* _sender,
                                                                                                                             gpointer self)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_apply_pending_resolution ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) self);
}

static void
_proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_options_visibility_g_object_notify (GObject* _sender,
                                                                                                                            GParamSpec* pspec,
                                                                                                                            gpointer self)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_options_visibility ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) self);
}

static void
_proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_visibility_g_object_notify (GObject* _sender,
                                                                                                                           GParamSpec* pspec,
                                                                                                                           gpointer self)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_visibility ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) self);
}

static void
_proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_state_gtk_editable_changed (GtkEditable* _sender,
                                                                                                                           gpointer self)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_state ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) self);
}

static void
__lambda117_ (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	g_signal_emit (self, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_CHANGED_SIGNAL], 0);
}

static void
___lambda117__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda117_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) self);
}

static void
__lambda118_ (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	g_signal_emit (self, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_CHANGED_SIGNAL], 0);
}

static void
___lambda118__proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_value_applied (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* _sender,
                                                                                                            gpointer self)
{
	__lambda118_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) self);
}

static void
__lambda119_ (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	g_signal_emit (self, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_CHANGED_SIGNAL], 0);
}

static void
___lambda119__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda119_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) self);
}

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)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField * self = NULL;
	GeeArrayList* _tmp0_;
	GeeLinkedList* _tmp1_;
	GeeLinkedList* _tmp2_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp3_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp4_;
	GeeLinkedList* _tmp5_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp6_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp7_;
	GeeLinkedList* _tmp8_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp9_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp10_;
	GeeLinkedList* _tmp11_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp12_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp13_;
	GeeLinkedList* _tmp14_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp15_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp16_;
	GeeLinkedList* _tmp20_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp21_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp22_;
	gchar** labels = NULL;
	GeeLinkedList* _tmp23_;
	gint _tmp24_;
	gint _tmp25_;
	gchar** _tmp26_;
	gint labels_length1;
	gint _labels_size_;
	GtkPropertyExpression* expression = NULL;
	GtkPropertyExpression* _tmp39_;
	gchar** _tmp40_;
	gint _tmp40__length1;
	GtkStringList* _tmp41_;
	GtkExpression* _tmp42_;
	GtkDropDown* _tmp43_;
	GtkDropDown* _tmp44_;
	GtkDropDown* _tmp45_;
	GtkDropDown* _tmp46_;
	GtkSwitch* _tmp47_;
	GtkSwitch* _tmp48_;
	GtkSwitch* _tmp49_;
	GtkSwitch* _tmp50_;
	GtkEntry* _tmp51_;
	GtkEntry* _tmp52_;
	GtkEntry* _tmp53_;
	GtkEntry* _tmp54_;
	GtkEntry* _tmp55_;
	GtkEntry* _tmp56_;
	gchar* _tmp57_;
	gchar* _tmp58_;
	GtkEntry* _tmp59_;
	GtkEntry* _tmp60_;
	GtkLabel* separator_label = NULL;
	GtkLabel* _tmp61_;
	GtkEntry* _tmp62_;
	GtkEntry* _tmp63_;
	GtkEntry* _tmp64_;
	GtkEntry* _tmp65_;
	GtkEntry* _tmp66_;
	GtkEntry* _tmp67_;
	gchar* _tmp68_;
	gchar* _tmp69_;
	GtkEntry* _tmp70_;
	GtkEntry* _tmp71_;
	GtkButton* _tmp72_;
	GtkButton* _tmp73_;
	GtkButton* _tmp74_;
	GtkButton* _tmp75_;
	GtkBox* _tmp76_;
	GtkBox* _tmp77_;
	GtkBox* _tmp78_;
	GtkEntry* _tmp79_;
	GtkBox* _tmp80_;
	GtkBox* _tmp81_;
	GtkEntry* _tmp82_;
	GtkBox* _tmp83_;
	GtkButton* _tmp84_;
	GtkBox* _tmp85_;
	GtkDropDown* _tmp86_;
	GtkSwitch* _tmp87_;
	GtkSwitch* _tmp88_;
	GtkSwitch* _tmp89_;
	GtkDropDown* _tmp90_;
	GtkEntry* _tmp91_;
	GtkEntry* _tmp92_;
	GtkSwitch* _tmp93_;
	GtkDropDown* _tmp94_;
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (subtitle != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) g_object_new (object_type, NULL);
	self->priv->is_scopebuddy = is_scopebuddy;
	_tmp0_ = gee_array_list_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_OPTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->_children);
	self->priv->_children = (GeeList*) _tmp0_;
	self->priv->committed_width = 3840;
	self->priv->committed_height = 2160;
	_tmp1_ = gee_linked_list_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_CHOICE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->choices);
	self->priv->choices = _tmp1_;
	_tmp2_ = self->priv->choices;
	_tmp3_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_new ("3840 x 2160", 3840, 2160, FALSE, FALSE);
	_tmp4_ = _tmp3_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp2_, _tmp4_);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = self->priv->choices;
	_tmp6_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_new ("2560 x 1440", 2560, 1440, FALSE, FALSE);
	_tmp7_ = _tmp6_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp5_, _tmp7_);
	_g_object_unref0 (_tmp7_);
	_tmp8_ = self->priv->choices;
	_tmp9_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_new ("1920 x 1080", 1920, 1080, FALSE, FALSE);
	_tmp10_ = _tmp9_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp8_, _tmp10_);
	_g_object_unref0 (_tmp10_);
	_tmp11_ = self->priv->choices;
	_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_new ("1600 x 900", 1600, 900, FALSE, FALSE);
	_tmp13_ = _tmp12_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp11_, _tmp13_);
	_g_object_unref0 (_tmp13_);
	_tmp14_ = self->priv->choices;
	_tmp15_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_new ("1280 x 720", 1280, 720, FALSE, FALSE);
	_tmp16_ = _tmp15_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp14_, _tmp16_);
	_g_object_unref0 (_tmp16_);
	if (include_auto) {
		GeeLinkedList* _tmp17_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp18_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp19_;
		_tmp17_ = self->priv->choices;
		_tmp18_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_new (_ ("Auto detect"), 0, 0, TRUE, FALSE);
		_tmp19_ = _tmp18_;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp17_, _tmp19_);
		_g_object_unref0 (_tmp19_);
	}
	_tmp20_ = self->priv->choices;
	_tmp21_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_new (_ ("Custom"), 0, 0, FALSE, TRUE);
	_tmp22_ = _tmp21_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp20_, _tmp22_);
	_g_object_unref0 (_tmp22_);
	_tmp23_ = self->priv->choices;
	_tmp24_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = g_new0 (gchar*, _tmp25_ + 1);
	labels = _tmp26_;
	labels_length1 = _tmp25_;
	_labels_size_ = labels_length1;
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp27_ = FALSE;
			_tmp27_ = TRUE;
			while (TRUE) {
				GeeLinkedList* _tmp29_;
				gint _tmp30_;
				gint _tmp31_;
				gchar** _tmp32_;
				gint _tmp32__length1;
				GeeLinkedList* _tmp33_;
				gpointer _tmp34_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp35_;
				const gchar* _tmp36_;
				const gchar* _tmp37_;
				gchar* _tmp38_;
				if (!_tmp27_) {
					gint _tmp28_;
					_tmp28_ = index;
					index = _tmp28_ + 1;
				}
				_tmp27_ = FALSE;
				_tmp29_ = self->priv->choices;
				_tmp30_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp29_);
				_tmp31_ = _tmp30_;
				if (!(index < _tmp31_)) {
					break;
				}
				_tmp32_ = labels;
				_tmp32__length1 = labels_length1;
				_tmp33_ = self->priv->choices;
				_tmp34_ = gee_abstract_list_get ((GeeAbstractList*) _tmp33_, index);
				_tmp35_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice*) _tmp34_;
				_tmp36_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_label (_tmp35_);
				_tmp37_ = _tmp36_;
				_tmp38_ = g_strdup (_tmp37_);
				_g_free0 (_tmp32_[index]);
				_tmp32_[index] = _tmp38_;
				_g_object_unref0 (_tmp35_);
			}
		}
	}
	_tmp39_ = (GtkPropertyExpression*) gtk_property_expression_new (gtk_string_object_get_type (), NULL, "string");
	expression = _tmp39_;
	_tmp40_ = labels;
	_tmp40__length1 = labels_length1;
	_tmp41_ = gtk_string_list_new (_tmp40_);
	_tmp42_ = _gtk_expression_ref0 ((GtkExpression*) expression);
	_tmp43_ = (GtkDropDown*) gtk_drop_down_new ((GListModel*) _tmp41_, _tmp42_);
	g_object_ref_sink (_tmp43_);
	_tmp44_ = _tmp43_;
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_dropdown (self, _tmp44_);
	_g_object_unref0 (_tmp44_);
	_tmp45_ = self->priv->_dropdown;
	gtk_widget_set_valign ((GtkWidget*) _tmp45_, GTK_ALIGN_CENTER);
	_tmp46_ = self->priv->_dropdown;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp46_, subtitle);
	_tmp47_ = (GtkSwitch*) gtk_switch_new ();
	g_object_ref_sink (_tmp47_);
	_tmp48_ = _tmp47_;
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_toggle (self, _tmp48_);
	_g_object_unref0 (_tmp48_);
	_tmp49_ = self->priv->_toggle;
	gtk_widget_set_valign ((GtkWidget*) _tmp49_, GTK_ALIGN_CENTER);
	_tmp50_ = self->priv->_toggle;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp50_, subtitle);
	_tmp51_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp51_);
	_tmp52_ = _tmp51_;
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_width_entry (self, _tmp52_);
	_g_object_unref0 (_tmp52_);
	_tmp53_ = self->priv->_width_entry;
	proton_plus_utils_text_input_metadata_policy_apply ((GtkWidget*) _tmp53_, PROTON_PLUS_UTILS_TEXT_INPUT_FIELD_KIND_DIGITS);
	_tmp54_ = self->priv->_width_entry;
	gtk_editable_set_width_chars ((GtkEditable*) _tmp54_, 5);
	_tmp55_ = self->priv->_width_entry;
	gtk_editable_set_max_width_chars ((GtkEditable*) _tmp55_, 5);
	_tmp56_ = self->priv->_width_entry;
	_tmp57_ = g_strdup_printf ("%i", self->priv->committed_width);
	_tmp58_ = _tmp57_;
	gtk_editable_set_text ((GtkEditable*) _tmp56_, _tmp58_);
	_g_free0 (_tmp58_);
	_tmp59_ = self->priv->_width_entry;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp59_, subtitle);
	_tmp60_ = self->priv->_width_entry;
	g_signal_connect_object (_tmp60_, "activate", (GCallback) _proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_apply_pending_resolution_gtk_entry_activate, self, 0);
	_tmp61_ = (GtkLabel*) gtk_label_new ("x");
	g_object_ref_sink (_tmp61_);
	separator_label = _tmp61_;
	gtk_widget_add_css_class ((GtkWidget*) separator_label, "dim-label");
	_tmp62_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp62_);
	_tmp63_ = _tmp62_;
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_height_entry (self, _tmp63_);
	_g_object_unref0 (_tmp63_);
	_tmp64_ = self->priv->_height_entry;
	proton_plus_utils_text_input_metadata_policy_apply ((GtkWidget*) _tmp64_, PROTON_PLUS_UTILS_TEXT_INPUT_FIELD_KIND_DIGITS);
	_tmp65_ = self->priv->_height_entry;
	gtk_editable_set_width_chars ((GtkEditable*) _tmp65_, 5);
	_tmp66_ = self->priv->_height_entry;
	gtk_editable_set_max_width_chars ((GtkEditable*) _tmp66_, 5);
	_tmp67_ = self->priv->_height_entry;
	_tmp68_ = g_strdup_printf ("%i", self->priv->committed_height);
	_tmp69_ = _tmp68_;
	gtk_editable_set_text ((GtkEditable*) _tmp67_, _tmp69_);
	_g_free0 (_tmp69_);
	_tmp70_ = self->priv->_height_entry;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp70_, subtitle);
	_tmp71_ = self->priv->_height_entry;
	g_signal_connect_object (_tmp71_, "activate", (GCallback) _proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_apply_pending_resolution_gtk_entry_activate, self, 0);
	_tmp72_ = (GtkButton*) gtk_button_new_with_label (_ ("Set"));
	g_object_ref_sink (_tmp72_);
	_tmp73_ = _tmp72_;
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_apply_button (self, _tmp73_);
	_g_object_unref0 (_tmp73_);
	_tmp74_ = self->priv->_apply_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp74_, subtitle);
	_tmp75_ = self->priv->_apply_button;
	g_signal_connect_object (_tmp75_, "clicked", (GCallback) _proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_apply_pending_resolution_gtk_button_clicked, self, 0);
	_tmp76_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
	g_object_ref_sink (_tmp76_);
	_g_object_unref0 (self->priv->custom_box);
	self->priv->custom_box = _tmp76_;
	_tmp77_ = self->priv->custom_box;
	gtk_widget_set_valign ((GtkWidget*) _tmp77_, GTK_ALIGN_CENTER);
	_tmp78_ = self->priv->custom_box;
	_tmp79_ = self->priv->_width_entry;
	gtk_box_append (_tmp78_, (GtkWidget*) _tmp79_);
	_tmp80_ = self->priv->custom_box;
	gtk_box_append (_tmp80_, (GtkWidget*) separator_label);
	_tmp81_ = self->priv->custom_box;
	_tmp82_ = self->priv->_height_entry;
	gtk_box_append (_tmp81_, (GtkWidget*) _tmp82_);
	_tmp83_ = self->priv->custom_box;
	_tmp84_ = self->priv->_apply_button;
	gtk_box_append (_tmp83_, (GtkWidget*) _tmp84_);
	adw_preferences_row_set_title ((AdwPreferencesRow*) self, title);
	adw_action_row_set_subtitle ((AdwActionRow*) self, subtitle);
	gtk_widget_set_tooltip_text ((GtkWidget*) self, subtitle);
	_tmp85_ = self->priv->custom_box;
	adw_action_row_add_suffix ((AdwActionRow*) self, (GtkWidget*) _tmp85_);
	_tmp86_ = self->priv->_dropdown;
	adw_action_row_add_suffix ((AdwActionRow*) self, (GtkWidget*) _tmp86_);
	_tmp87_ = self->priv->_toggle;
	adw_action_row_add_suffix ((AdwActionRow*) self, (GtkWidget*) _tmp87_);
	_tmp88_ = self->priv->_toggle;
	adw_action_row_set_activatable_widget ((AdwActionRow*) self, (GtkWidget*) _tmp88_);
	_tmp89_ = self->priv->_toggle;
	g_signal_connect_object ((GObject*) _tmp89_, "notify::active", (GCallback) _proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_options_visibility_g_object_notify, self, 0);
	_tmp90_ = self->priv->_dropdown;
	g_signal_connect_object ((GObject*) _tmp90_, "notify::selected", (GCallback) _proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_visibility_g_object_notify, self, 0);
	_tmp91_ = self->priv->_width_entry;
	g_signal_connect_object ((GtkEditable*) _tmp91_, "changed", (GCallback) _proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_state_gtk_editable_changed, self, 0);
	_tmp92_ = self->priv->_height_entry;
	g_signal_connect_object ((GtkEditable*) _tmp92_, "changed", (GCallback) _proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_state_gtk_editable_changed, self, 0);
	_tmp93_ = self->priv->_toggle;
	g_signal_connect_object ((GObject*) _tmp93_, "notify::active", (GCallback) ___lambda117__g_object_notify, self, 0);
	g_signal_connect_object (self, "value-applied", (GCallback) ___lambda118__proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_value_applied, self, 0);
	_tmp94_ = self->priv->_dropdown;
	g_signal_connect_object ((GObject*) _tmp94_, "notify::selected", (GCallback) ___lambda119__g_object_notify, self, 0);
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_options_visibility (self);
	_g_object_unref0 (separator_label);
	_gtk_expression_unref0 (expression);
	labels = (_vala_array_free (labels, labels_length1, (GDestroyNotify) g_free), NULL);
	return self;
}

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)
{
	return proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_FIELD, title, subtitle, include_auto, is_scopebuddy);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_add_child (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                               ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* child)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField * self;
	GeeList* _tmp0_;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) base;
	g_return_if_fail (child != NULL);
	_tmp0_ = self->priv->_children;
	gee_collection_add ((GeeCollection*) _tmp0_, child);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_clear (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField * self;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) base;
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_reset (self);
	{
		GeeList* _child_list = NULL;
		GeeList* _tmp0_;
		gint _child_size = 0;
		GeeList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _child_index = 0;
		_tmp0_ = self->priv->_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);
		}
	}
}

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_launch_option_resolution_field_real_parse_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                                  gchar** tokens,
                                                                                                  gint tokens_length1,
                                                                                                  gboolean* consumed,
                                                                                                  gint consumed_length1)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField * self;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) base;
	if (tokens_length1 != consumed_length1) {
		return;
	}
	if (self->priv->is_scopebuddy) {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp0_ = FALSE;
				_tmp0_ = TRUE;
				while (TRUE) {
					gboolean _tmp2_;
					const gchar* _tmp3_;
					if (!_tmp0_) {
						gint _tmp1_;
						_tmp1_ = i;
						i = _tmp1_ + 1;
					}
					_tmp0_ = FALSE;
					if (!(i < tokens_length1)) {
						break;
					}
					_tmp2_ = consumed[i];
					if (_tmp2_) {
						continue;
					}
					_tmp3_ = tokens[i];
					if (g_strcmp0 (_tmp3_, "SCB_AUTO_RES=1") == 0) {
						proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_auto (self);
						consumed[i] = TRUE;
						return;
					}
				}
			}
		}
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp6_;
				gboolean _tmp7_ = FALSE;
				gboolean _tmp8_ = FALSE;
				const gchar* _tmp9_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				if (!(i < tokens_length1)) {
					break;
				}
				_tmp6_ = consumed[i];
				if (_tmp6_) {
					continue;
				}
				_tmp9_ = tokens[i];
				if (g_strcmp0 (_tmp9_, "-W") == 0) {
					_tmp8_ = (i + 3) < tokens_length1;
				} else {
					_tmp8_ = FALSE;
				}
				if (_tmp8_) {
					const gchar* _tmp10_;
					_tmp10_ = tokens[i + 2];
					_tmp7_ = g_strcmp0 (_tmp10_, "-H") == 0;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					gint width = 0;
					gint height = 0;
					gboolean _tmp11_ = FALSE;
					const gchar* _tmp12_;
					gint _tmp13_ = 0;
					gboolean _tmp14_;
					width = 0;
					height = 0;
					_tmp12_ = tokens[i + 1];
					_tmp14_ = int_try_parse (_tmp12_, &_tmp13_, NULL, (guint) 0);
					width = _tmp13_;
					if (_tmp14_) {
						const gchar* _tmp15_;
						gint _tmp16_ = 0;
						gboolean _tmp17_;
						_tmp15_ = tokens[i + 3];
						_tmp17_ = int_try_parse (_tmp15_, &_tmp16_, NULL, (guint) 0);
						height = _tmp16_;
						_tmp11_ = _tmp17_;
					} else {
						_tmp11_ = FALSE;
					}
					if (_tmp11_) {
						proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_resolution (self, width, height);
						consumed[i] = TRUE;
						consumed[i + 1] = TRUE;
						consumed[i + 2] = TRUE;
						consumed[i + 3] = TRUE;
						break;
					}
				}
			}
		}
	}
	{
		GeeList* _child_list = NULL;
		GeeList* _tmp18_;
		gint _child_size = 0;
		GeeList* _tmp19_;
		gint _tmp20_;
		gint _tmp21_;
		gint _child_index = 0;
		_tmp18_ = self->priv->_children;
		_child_list = _tmp18_;
		_tmp19_ = _child_list;
		_tmp20_ = gee_collection_get_size ((GeeCollection*) _tmp19_);
		_tmp21_ = _tmp20_;
		_child_size = _tmp21_;
		_child_index = -1;
		while (TRUE) {
			gint _tmp22_;
			gint _tmp23_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* child = NULL;
			GeeList* _tmp24_;
			gpointer _tmp25_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp26_;
			_child_index = _child_index + 1;
			_tmp22_ = _child_index;
			_tmp23_ = _child_size;
			if (!(_tmp22_ < _tmp23_)) {
				break;
			}
			_tmp24_ = _child_list;
			_tmp25_ = gee_list_get (_tmp24_, _child_index);
			child = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp25_;
			_tmp26_ = child;
			proton_plus_widgets_games_launch_options_editor_ilaunch_option_parse_tokens (_tmp26_, tokens, (gint) tokens_length1, consumed, (gint) consumed_length1);
			_g_object_unref0 (child);
		}
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_append_command_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                                             GeeLinkedList* segments)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField * self;
	GtkSwitch* _tmp0_;
	gboolean _tmp1_ = FALSE;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) base;
	g_return_if_fail (segments != NULL);
	_tmp0_ = self->priv->_toggle;
	if (!gtk_switch_get_active (_tmp0_)) {
		return;
	}
	if (self->priv->is_scopebuddy) {
		_tmp1_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_is_auto (self);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gee_abstract_collection_add ((GeeAbstractCollection*) segments, "SCB_AUTO_RES=1");
		return;
	}
	if (proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_has_resolution (self)) {
		gint width = 0;
		gint height = 0;
		gint _tmp2_ = 0;
		gint _tmp3_ = 0;
		gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_resolution (self, &_tmp2_, &_tmp3_);
		width = _tmp2_;
		height = _tmp3_;
		_tmp4_ = g_strdup_printf ("-W %d", width);
		_tmp5_ = _tmp4_;
		gee_abstract_collection_add ((GeeAbstractCollection*) segments, _tmp5_);
		_g_free0 (_tmp5_);
		_tmp6_ = g_strdup_printf ("-H %d", height);
		_tmp7_ = _tmp6_;
		gee_abstract_collection_add ((GeeAbstractCollection*) segments, _tmp7_);
		_g_free0 (_tmp7_);
	}
	{
		GeeList* _child_list = NULL;
		GeeList* _tmp8_;
		gint _child_size = 0;
		GeeList* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		gint _child_index = 0;
		_tmp8_ = self->priv->_children;
		_child_list = _tmp8_;
		_tmp9_ = _child_list;
		_tmp10_ = gee_collection_get_size ((GeeCollection*) _tmp9_);
		_tmp11_ = _tmp10_;
		_child_size = _tmp11_;
		_child_index = -1;
		while (TRUE) {
			gint _tmp12_;
			gint _tmp13_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* child = NULL;
			GeeList* _tmp14_;
			gpointer _tmp15_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp16_;
			_child_index = _child_index + 1;
			_tmp12_ = _child_index;
			_tmp13_ = _child_size;
			if (!(_tmp12_ < _tmp13_)) {
				break;
			}
			_tmp14_ = _child_list;
			_tmp15_ = gee_list_get (_tmp14_, _child_index);
			child = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp15_;
			_tmp16_ = child;
			if (proton_plus_widgets_games_launch_options_editor_ilaunch_option_is_active (_tmp16_)) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp17_;
				_tmp17_ = child;
				proton_plus_widgets_games_launch_options_editor_ilaunch_option_append_command_segments (_tmp17_, segments);
			}
			_g_object_unref0 (child);
		}
	}
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_reset (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	GtkSwitch* _tmp0_;
	GtkDropDown* _tmp1_;
	GtkEntry* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GtkEntry* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_toggle;
	gtk_switch_set_active (_tmp0_, FALSE);
	_tmp1_ = self->priv->_dropdown;
	gtk_drop_down_set_selected (_tmp1_, (guint) 0);
	self->priv->committed_width = 3840;
	self->priv->committed_height = 2160;
	_tmp2_ = self->priv->_width_entry;
	_tmp3_ = g_strdup_printf ("%i", self->priv->committed_width);
	_tmp4_ = _tmp3_;
	gtk_editable_set_text ((GtkEditable*) _tmp2_, _tmp4_);
	_g_free0 (_tmp4_);
	_tmp5_ = self->priv->_height_entry;
	_tmp6_ = g_strdup_printf ("%i", self->priv->committed_height);
	_tmp7_ = _tmp6_;
	gtk_editable_set_text ((GtkEditable*) _tmp5_, _tmp7_);
	_g_free0 (_tmp7_);
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_options_visibility (self);
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_auto (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	g_return_if_fail (self != NULL);
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GeeLinkedList* _tmp2_;
				gint _tmp3_;
				gint _tmp4_;
				GeeLinkedList* _tmp5_;
				gpointer _tmp6_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp7_;
				gboolean _tmp8_;
				gboolean _tmp9_;
				gboolean _tmp10_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = index;
					index = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->priv->choices;
				_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
				_tmp4_ = _tmp3_;
				if (!(index < _tmp4_)) {
					break;
				}
				_tmp5_ = self->priv->choices;
				_tmp6_ = gee_abstract_list_get ((GeeAbstractList*) _tmp5_, index);
				_tmp7_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice*) _tmp6_;
				_tmp8_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_is_auto (_tmp7_);
				_tmp9_ = _tmp8_;
				_tmp10_ = _tmp9_;
				_g_object_unref0 (_tmp7_);
				if (_tmp10_) {
					GtkSwitch* _tmp11_;
					GtkDropDown* _tmp12_;
					_tmp11_ = self->priv->_toggle;
					gtk_switch_set_active (_tmp11_, TRUE);
					_tmp12_ = self->priv->_dropdown;
					gtk_drop_down_set_selected (_tmp12_, (guint) index);
					proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_options_visibility (self);
					return;
				}
			}
		}
	}
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_resolution (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                               gint width,
                                                                                               gint height)
{
	g_return_if_fail (self != NULL);
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GeeLinkedList* _tmp2_;
				gint _tmp3_;
				gint _tmp4_;
				gboolean _tmp5_ = FALSE;
				gboolean _tmp6_ = FALSE;
				GeeLinkedList* _tmp7_;
				gpointer _tmp8_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp9_;
				gint _tmp10_;
				gint _tmp11_;
				gboolean _tmp12_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = index;
					index = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->priv->choices;
				_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
				_tmp4_ = _tmp3_;
				if (!(index < _tmp4_)) {
					break;
				}
				_tmp7_ = self->priv->choices;
				_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, index);
				_tmp9_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice*) _tmp8_;
				_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_width (_tmp9_);
				_tmp11_ = _tmp10_;
				_tmp12_ = _tmp11_ == width;
				_g_object_unref0 (_tmp9_);
				if (_tmp12_) {
					GeeLinkedList* _tmp13_;
					gpointer _tmp14_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp15_;
					gint _tmp16_;
					gint _tmp17_;
					_tmp13_ = self->priv->choices;
					_tmp14_ = gee_abstract_list_get ((GeeAbstractList*) _tmp13_, index);
					_tmp15_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice*) _tmp14_;
					_tmp16_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_height (_tmp15_);
					_tmp17_ = _tmp16_;
					_tmp6_ = _tmp17_ == height;
					_g_object_unref0 (_tmp15_);
				} else {
					_tmp6_ = FALSE;
				}
				if (_tmp6_) {
					GeeLinkedList* _tmp18_;
					gpointer _tmp19_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp20_;
					gboolean _tmp21_;
					gboolean _tmp22_;
					_tmp18_ = self->priv->choices;
					_tmp19_ = gee_abstract_list_get ((GeeAbstractList*) _tmp18_, index);
					_tmp20_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice*) _tmp19_;
					_tmp21_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_is_custom (_tmp20_);
					_tmp22_ = _tmp21_;
					_tmp5_ = !_tmp22_;
					_g_object_unref0 (_tmp20_);
				} else {
					_tmp5_ = FALSE;
				}
				if (_tmp5_) {
					GtkSwitch* _tmp23_;
					GtkDropDown* _tmp24_;
					_tmp23_ = self->priv->_toggle;
					gtk_switch_set_active (_tmp23_, TRUE);
					_tmp24_ = self->priv->_dropdown;
					gtk_drop_down_set_selected (_tmp24_, (guint) index);
					proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_options_visibility (self);
					return;
				}
			}
		}
	}
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp25_ = FALSE;
			_tmp25_ = TRUE;
			while (TRUE) {
				GeeLinkedList* _tmp27_;
				gint _tmp28_;
				gint _tmp29_;
				GeeLinkedList* _tmp30_;
				gpointer _tmp31_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp32_;
				gboolean _tmp33_;
				gboolean _tmp34_;
				gboolean _tmp35_;
				GtkEntry* _tmp36_;
				gchar* _tmp37_;
				gchar* _tmp38_;
				GtkEntry* _tmp39_;
				gchar* _tmp40_;
				gchar* _tmp41_;
				GtkSwitch* _tmp42_;
				GtkDropDown* _tmp43_;
				if (!_tmp25_) {
					gint _tmp26_;
					_tmp26_ = index;
					index = _tmp26_ + 1;
				}
				_tmp25_ = FALSE;
				_tmp27_ = self->priv->choices;
				_tmp28_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp27_);
				_tmp29_ = _tmp28_;
				if (!(index < _tmp29_)) {
					break;
				}
				_tmp30_ = self->priv->choices;
				_tmp31_ = gee_abstract_list_get ((GeeAbstractList*) _tmp30_, index);
				_tmp32_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice*) _tmp31_;
				_tmp33_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_is_custom (_tmp32_);
				_tmp34_ = _tmp33_;
				_tmp35_ = !_tmp34_;
				_g_object_unref0 (_tmp32_);
				if (_tmp35_) {
					continue;
				}
				self->priv->committed_width = width;
				self->priv->committed_height = height;
				_tmp36_ = self->priv->_width_entry;
				_tmp37_ = g_strdup_printf ("%i", self->priv->committed_width);
				_tmp38_ = _tmp37_;
				gtk_editable_set_text ((GtkEditable*) _tmp36_, _tmp38_);
				_g_free0 (_tmp38_);
				_tmp39_ = self->priv->_height_entry;
				_tmp40_ = g_strdup_printf ("%i", self->priv->committed_height);
				_tmp41_ = _tmp40_;
				gtk_editable_set_text ((GtkEditable*) _tmp39_, _tmp41_);
				_g_free0 (_tmp41_);
				_tmp42_ = self->priv->_toggle;
				gtk_switch_set_active (_tmp42_, TRUE);
				_tmp43_ = self->priv->_dropdown;
				gtk_drop_down_set_selected (_tmp43_, (guint) index);
				proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_options_visibility (self);
				return;
			}
		}
	}
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_is_auto (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	gboolean _tmp0_ = FALSE;
	GtkSwitch* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->_toggle;
	if (gtk_switch_get_active (_tmp1_)) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp2_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp3_;
		gboolean _tmp4_;
		gboolean _tmp5_;
		_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_selected_choice (self);
		_tmp3_ = _tmp2_;
		_tmp4_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_is_auto (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp0_ = _tmp5_;
		_g_object_unref0 (_tmp3_);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_has_resolution (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	GtkSwitch* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp3_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_toggle;
	if (!gtk_switch_get_active (_tmp0_)) {
		result = FALSE;
		return result;
	}
	_tmp3_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_selected_choice (self);
	_tmp4_ = _tmp3_;
	_tmp5_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_is_custom (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_;
	_g_object_unref0 (_tmp4_);
	if (_tmp7_) {
		_tmp2_ = TRUE;
	} else {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp8_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		_tmp8_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_selected_choice (self);
		_tmp9_ = _tmp8_;
		_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_width (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp2_ = _tmp11_ > 0;
		_g_object_unref0 (_tmp9_);
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp12_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_selected_choice (self);
		_tmp13_ = _tmp12_;
		_tmp14_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_height (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp1_ = _tmp15_ > 0;
		_g_object_unref0 (_tmp13_);
	}
	result = _tmp1_;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_resolution (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                               gint* width,
                                                                                               gint* height)
{
	gint _vala_width = 0;
	gint _vala_height = 0;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* selected_choice = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp0_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_selected_choice (self);
	selected_choice = _tmp0_;
	_tmp1_ = selected_choice;
	_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_is_custom (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		_vala_width = self->priv->committed_width;
		_vala_height = self->priv->committed_height;
	} else {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		_tmp4_ = selected_choice;
		_tmp5_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_width (_tmp4_);
		_tmp6_ = _tmp5_;
		_vala_width = _tmp6_;
		_tmp7_ = selected_choice;
		_tmp8_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_height (_tmp7_);
		_tmp9_ = _tmp8_;
		_vala_height = _tmp9_;
	}
	_g_object_unref0 (selected_choice);
	if (width) {
		*width = _vala_width;
	}
	if (height) {
		*height = _vala_height;
	}
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice*
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_selected_choice (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	GeeLinkedList* _tmp0_;
	GtkDropDown* _tmp1_;
	gpointer _tmp2_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->choices;
	_tmp1_ = self->priv->_dropdown;
	_tmp2_ = gee_abstract_list_get ((GeeAbstractList*) _tmp0_, (gint) gtk_drop_down_get_selected (_tmp1_));
	result = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice*) _tmp2_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_options_visibility (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	gboolean is_active = FALSE;
	GtkSwitch* _tmp0_;
	GtkDropDown* _tmp1_;
	GtkDropDown* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_toggle;
	is_active = gtk_switch_get_active (_tmp0_);
	_tmp1_ = self->priv->_dropdown;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, is_active);
	_tmp2_ = self->priv->_dropdown;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, is_active);
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_visibility (self);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_visibility (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	gboolean _tmp0_ = FALSE;
	GtkSwitch* _tmp1_;
	GtkBox* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_toggle;
	if (gtk_switch_get_active (_tmp1_)) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp2_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp3_;
		gboolean _tmp4_;
		gboolean _tmp5_;
		_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_selected_choice (self);
		_tmp3_ = _tmp2_;
		_tmp4_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_is_custom (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp0_ = _tmp5_;
		_g_object_unref0 (_tmp3_);
	} else {
		_tmp0_ = FALSE;
	}
	_tmp6_ = self->priv->custom_box;
	gtk_widget_set_visible ((GtkWidget*) _tmp6_, _tmp0_);
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_state (self);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_apply_pending_resolution (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	gint pending_width = 0;
	gint pending_height = 0;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gboolean _tmp2_;
	GtkEntry* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GtkEntry* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_pending_resolution (self, &_tmp0_, &_tmp1_);
	pending_width = _tmp0_;
	pending_height = _tmp1_;
	if (!_tmp2_) {
		return;
	}
	self->priv->committed_width = pending_width;
	self->priv->committed_height = pending_height;
	_tmp3_ = self->priv->_width_entry;
	_tmp4_ = g_strdup_printf ("%i", self->priv->committed_width);
	_tmp5_ = _tmp4_;
	gtk_editable_set_text ((GtkEditable*) _tmp3_, _tmp5_);
	_g_free0 (_tmp5_);
	_tmp6_ = self->priv->_height_entry;
	_tmp7_ = g_strdup_printf ("%i", self->priv->committed_height);
	_tmp8_ = _tmp7_;
	gtk_editable_set_text ((GtkEditable*) _tmp6_, _tmp8_);
	_g_free0 (_tmp8_);
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_state (self);
	g_signal_emit (self, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_VALUE_APPLIED_SIGNAL], 0);
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_pending_resolution (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                                       gint* width,
                                                                                                       gint* height)
{
	gint _vala_width = 0;
	gint _vala_height = 0;
	gchar* width_text = NULL;
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* height_text = NULL;
	GtkEntry* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gboolean _tmp6_ = FALSE;
	const gchar* _tmp7_;
	gboolean _tmp9_ = FALSE;
	const gchar* _tmp10_;
	gint _tmp11_ = 0;
	gboolean _tmp12_;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp17_ = FALSE;
	gboolean _tmp18_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_vala_width = self->priv->committed_width;
	_vala_height = self->priv->committed_height;
	_tmp0_ = self->priv->_width_entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = string_strip (_tmp1_);
	width_text = _tmp2_;
	_tmp3_ = self->priv->_height_entry;
	_tmp4_ = gtk_editable_get_text ((GtkEditable*) _tmp3_);
	_tmp5_ = string_strip (_tmp4_);
	height_text = _tmp5_;
	_tmp7_ = width_text;
	if (g_strcmp0 (_tmp7_, "") == 0) {
		_tmp6_ = TRUE;
	} else {
		const gchar* _tmp8_;
		_tmp8_ = height_text;
		_tmp6_ = g_strcmp0 (_tmp8_, "") == 0;
	}
	if (_tmp6_) {
		result = FALSE;
		_g_free0 (height_text);
		_g_free0 (width_text);
		if (width) {
			*width = _vala_width;
		}
		if (height) {
			*height = _vala_height;
		}
		return result;
	}
	_tmp10_ = width_text;
	_tmp12_ = int_try_parse (_tmp10_, &_tmp11_, NULL, (guint) 0);
	_vala_width = _tmp11_;
	if (!_tmp12_) {
		_tmp9_ = TRUE;
	} else {
		const gchar* _tmp13_;
		gint _tmp14_ = 0;
		gboolean _tmp15_;
		_tmp13_ = height_text;
		_tmp15_ = int_try_parse (_tmp13_, &_tmp14_, NULL, (guint) 0);
		_vala_height = _tmp14_;
		_tmp9_ = !_tmp15_;
	}
	if (_tmp9_) {
		result = FALSE;
		_g_free0 (height_text);
		_g_free0 (width_text);
		if (width) {
			*width = _vala_width;
		}
		if (height) {
			*height = _vala_height;
		}
		return result;
	}
	if (_vala_width >= 320) {
		_tmp18_ = _vala_width <= 7680;
	} else {
		_tmp18_ = FALSE;
	}
	if (_tmp18_) {
		_tmp17_ = _vala_height >= 240;
	} else {
		_tmp17_ = FALSE;
	}
	if (_tmp17_) {
		_tmp16_ = _vala_height <= 4320;
	} else {
		_tmp16_ = FALSE;
	}
	result = _tmp16_;
	_g_free0 (height_text);
	_g_free0 (width_text);
	if (width) {
		*width = _vala_width;
	}
	if (height) {
		*height = _vala_height;
	}
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_refresh_custom_state (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	gboolean _tmp0_ = FALSE;
	GtkSwitch* _tmp1_;
	gboolean is_custom = FALSE;
	GtkEntry* _tmp6_;
	GtkEntry* _tmp7_;
	gint pending_width = 0;
	gint pending_height = 0;
	gboolean has_pending_resolution = FALSE;
	gint _tmp8_ = 0;
	gint _tmp9_ = 0;
	gboolean _tmp10_;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	GtkButton* _tmp14_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_toggle;
	if (gtk_switch_get_active (_tmp1_)) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp2_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionChoice* _tmp3_;
		gboolean _tmp4_;
		gboolean _tmp5_;
		_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_selected_choice (self);
		_tmp3_ = _tmp2_;
		_tmp4_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_choice_get_is_custom (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp0_ = _tmp5_;
		_g_object_unref0 (_tmp3_);
	} else {
		_tmp0_ = FALSE;
	}
	is_custom = _tmp0_;
	_tmp6_ = self->priv->_width_entry;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp6_, is_custom);
	_tmp7_ = self->priv->_height_entry;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp7_, is_custom);
	_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_pending_resolution (self, &_tmp8_, &_tmp9_);
	pending_width = _tmp8_;
	pending_height = _tmp9_;
	has_pending_resolution = _tmp10_;
	if (is_custom) {
		_tmp12_ = has_pending_resolution;
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		gboolean _tmp13_ = FALSE;
		if (pending_width != self->priv->committed_width) {
			_tmp13_ = TRUE;
		} else {
			_tmp13_ = pending_height != self->priv->committed_height;
		}
		_tmp11_ = _tmp13_;
	} else {
		_tmp11_ = FALSE;
	}
	_tmp14_ = self->priv->_apply_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp14_, _tmp11_);
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_is_active (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField * self;
	GtkSwitch* _tmp0_;
	gboolean result;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) base;
	_tmp0_ = self->priv->_toggle;
	result = gtk_switch_get_active (_tmp0_);
	return result;
}

GtkSwitch*
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_toggle (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	GtkSwitch* result;
	GtkSwitch* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_toggle;
	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_launch_option_resolution_field_set_toggle (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                           GtkSwitch* value)
{
	GtkSwitch* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_toggle (self);
	if (old_value != value) {
		GtkSwitch* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_toggle);
		self->priv->_toggle = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_TOGGLE_PROPERTY]);
	}
}

GtkDropDown*
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_dropdown (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	GtkDropDown* result;
	GtkDropDown* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_dropdown;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_dropdown (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                             GtkDropDown* value)
{
	GtkDropDown* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_dropdown (self);
	if (old_value != value) {
		GtkDropDown* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_dropdown);
		self->priv->_dropdown = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_DROPDOWN_PROPERTY]);
	}
}

GtkEntry*
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_width_entry (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	GtkEntry* result;
	GtkEntry* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_width_entry;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_width_entry (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                                GtkEntry* value)
{
	GtkEntry* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_width_entry (self);
	if (old_value != value) {
		GtkEntry* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_width_entry);
		self->priv->_width_entry = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_WIDTH_ENTRY_PROPERTY]);
	}
}

GtkEntry*
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_height_entry (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	GtkEntry* result;
	GtkEntry* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_height_entry;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_height_entry (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                                 GtkEntry* value)
{
	GtkEntry* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_height_entry (self);
	if (old_value != value) {
		GtkEntry* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_height_entry);
		self->priv->_height_entry = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_HEIGHT_ENTRY_PROPERTY]);
	}
}

GtkButton*
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_apply_button (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_apply_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_apply_button (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self,
                                                                                                 GtkButton* value)
{
	GtkButton* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_apply_button (self);
	if (old_value != value) {
		GtkButton* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_apply_button);
		self->priv->_apply_button = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_APPLY_BUTTON_PROPERTY]);
	}
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_get_is_advanced (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base)
{
	gboolean result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) base;
	result = self->priv->_is_advanced;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_set_is_advanced (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                                     gboolean value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self;
	gboolean old_value;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) base;
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_get_is_advanced (base);
	if (old_value != value) {
		self->priv->_is_advanced = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_IS_ADVANCED_PROPERTY]);
	}
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_get_line_type (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) base;
	result = self->priv->_line_type;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_set_line_type (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                                   ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField* self;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType old_value;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField*) base;
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_get_line_type (base);
	if (old_value != value) {
		self->priv->_line_type = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_LINE_TYPE_PROPERTY]);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionFieldClass * klass,
                                                                                           gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_TOGGLE_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_TOGGLE_PROPERTY] = g_param_spec_object ("toggle", "toggle", "toggle", gtk_switch_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_DROPDOWN_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_DROPDOWN_PROPERTY] = g_param_spec_object ("dropdown", "dropdown", "dropdown", gtk_drop_down_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_WIDTH_ENTRY_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_WIDTH_ENTRY_PROPERTY] = g_param_spec_object ("width-entry", "width-entry", "width-entry", gtk_entry_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_HEIGHT_ENTRY_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_HEIGHT_ENTRY_PROPERTY] = g_param_spec_object ("height-entry", "height-entry", "height-entry", gtk_entry_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_APPLY_BUTTON_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_APPLY_BUTTON_PROPERTY] = g_param_spec_object ("apply-button", "apply-button", "apply-button", gtk_button_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_IS_ADVANCED_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_IS_ADVANCED_PROPERTY] = g_param_spec_boolean ("is-advanced", "is-advanced", "is-advanced", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_LINE_TYPE_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_LINE_TYPE_PROPERTY] = g_param_spec_enum ("line-type", "line-type", "line-type", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_LINE_TYPE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_VALUE_APPLIED_SIGNAL] = g_signal_new ("value-applied", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_FIELD, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_CHANGED_SIGNAL] = g_signal_new ("changed", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_FIELD, 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_launch_option_resolution_field_proton_plus_widgets_games_launch_options_editor_ilaunch_option_interface_init (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOptionIface * iface,
                                                                                                                                                              gpointer iface_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_proton_plus_widgets_games_launch_options_editor_ilaunch_option_parent_iface = g_type_interface_peek_parent (iface);
	iface->add_child = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*, ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*)) proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_add_child;
	iface->clear = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*)) proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_clear;
	iface->parse_tokens = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*, gchar**, gint, gboolean*, gint)) proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_parse_tokens;
	iface->append_command_segments = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*, GeeLinkedList*)) proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_append_command_segments;
	iface->is_active = (gboolean (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*)) proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_is_active;
	iface->get_is_advanced = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_get_is_advanced;
	iface->set_is_advanced = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_set_is_advanced;
	iface->get_line_type = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_get_line_type;
	iface->set_line_type = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_real_set_line_type;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField * self,
                                                                                              gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_instance_private (self);
	self->priv->_is_advanced = FALSE;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField);
	_g_object_unref0 (self->priv->_toggle);
	_g_object_unref0 (self->priv->_dropdown);
	_g_object_unref0 (self->priv->_width_entry);
	_g_object_unref0 (self->priv->_height_entry);
	_g_object_unref0 (self->priv->_apply_button);
	_g_object_unref0 (self->priv->custom_box);
	_g_object_unref0 (self->priv->choices);
	_g_object_unref0 (self->priv->_children);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionFieldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_instance_init, NULL };
	static const GInterfaceInfo proton_plus_widgets_games_launch_options_editor_ilaunch_option_info = { (GInterfaceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_proton_plus_widgets_games_launch_options_editor_ilaunch_option_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_type_id = g_type_register_static (adw_action_row_get_type (), "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_type_id, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_OPTION, &proton_plus_widgets_games_launch_options_editor_ilaunch_option_info);
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionFieldPrivate));
	return proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_type_id = proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_property (GObject * object,
                                                                                                   guint property_id,
                                                                                                   GValue * value,
                                                                                                   GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_TOGGLE_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_toggle (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_DROPDOWN_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_dropdown (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_WIDTH_ENTRY_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_width_entry (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_HEIGHT_ENTRY_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_height_entry (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_APPLY_BUTTON_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_get_apply_button (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_IS_ADVANCED_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_launch_options_editor_ilaunch_option_get_is_advanced ((ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_LINE_TYPE_PROPERTY:
		g_value_set_enum (value, proton_plus_widgets_games_launch_options_editor_ilaunch_option_get_line_type ((ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_property (GObject * object,
                                                                                                   guint property_id,
                                                                                                   const GValue * value,
                                                                                                   GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_RESOLUTION_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionResolutionField);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_TOGGLE_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_toggle (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_DROPDOWN_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_dropdown (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_WIDTH_ENTRY_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_width_entry (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_HEIGHT_ENTRY_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_height_entry (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_APPLY_BUTTON_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_resolution_field_set_apply_button (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_IS_ADVANCED_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_ilaunch_option_set_is_advanced ((ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_RESOLUTION_FIELD_LINE_TYPE_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_ilaunch_option_set_line_type ((ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self, g_value_get_enum (value));
		break;
		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;
}

