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

#include <adwaita.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
#include "protonplus_core.h"
#include <gdk/gdk.h>
#include <gee.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_ARGUMENT_ROW (proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_type ())
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_ROW, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_ROW, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRowClass))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_LAUNCH_OPTION_ARGUMENT_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_ROW))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_LAUNCH_OPTION_ARGUMENT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_ROW))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_ROW, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRowClass))

typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow;
typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRowClass ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRowClass;
typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRowPrivate ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRowPrivate;
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_SOURCE_INDEX_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_VALUE_APPLIED_SIGNAL,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_REMOVE_REQUESTED_SIGNAL,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_NUM_SIGNALS
};
static guint proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_NUM_SIGNALS] = {0};
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_LINE_TYPE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_IS_ADVANCED_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_NUM_PROPERTIES];
typedef struct _Block30Data Block30Data;
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_CHANGED_SIGNAL,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_NUM_SIGNALS
};
static guint proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_NUM_SIGNALS] = {0};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow {
	AdwEntryRow parent_instance;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRowPrivate * priv;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRowClass {
	AdwEntryRowClass parent_class;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRowPrivate {
	gchar* committed_text;
	gint _source_index;
	GtkButton* apply_button;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentListPrivate {
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType _line_type;
	gboolean _is_advanced;
	GeeArrayList* rows;
	AdwActionRow* add_action_row;
	gboolean refreshing;
	gchar* loaded_source;
};

struct _Block30Data {
	int _ref_count_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* row;
};

static gint ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_parent_class = NULL;
static gint ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_parent_class = NULL;
static ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOptionIface * proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_proton_plus_widgets_games_launch_options_editor_ilaunch_option_parent_iface = NULL;

VALA_EXTERN GType proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_new (const gchar* value,
                                                                                                                                                  gint source_index);
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_construct (GType object_type,
                                                                                                                                                        const gchar* value,
                                                                                                                                                        gint source_index);
static void proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_apply_pending_text (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self);
static void _proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_apply_pending_text_gtk_button_clicked (GtkButton* _sender,
                                                                                                                        gpointer self);
static void __lambda102_ (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self);
static void ___lambda102__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static gboolean __lambda103_ (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self,
                       guint keyval,
                       guint keycode,
                       GdkModifierType state);
static gboolean ___lambda103__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                             guint keyval,
                                                             guint keycode,
                                                             GdkModifierType state,
                                                             gpointer self);
static void _proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_apply_pending_text_gtk_list_box_row_activate (GtkListBoxRow* _sender,
                                                                                                                               gpointer self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_refresh_apply_state (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self);
static void _proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_refresh_apply_state_gtk_editable_changed (GtkEditable* _sender,
                                                                                                                           gpointer self);
VALA_EXTERN gchar* proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_committed_text (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self);
VALA_EXTERN gint proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_source_index (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_set_source_index (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self,
                                                                                                  gint value);
static void proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_property (GObject * object,
                                                                                                    guint property_id,
                                                                                                    GValue * value,
                                                                                                    GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_set_property (GObject * object,
                                                                                                    guint property_id,
                                                                                                    const GValue * value,
                                                                                                    GParamSpec * pspec);
static void proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_add_empty_argument (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self);
static void _proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_add_empty_argument_gtk_button_clicked (GtkButton* _sender,
                                                                                                                         gpointer self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_add_action_row_to_end (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_remove_all_rows (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_append_argument (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self,
                                                                                                                                                               const gchar* value,
                                                                                                                                                               gint source_index);
static Block30Data* block30_data_ref (Block30Data* _data30_);
static void block30_data_unref (void * _userdata_);
static void __lambda104_ (Block30Data* _data30_);
static void proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_remove_argument (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self,
                                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* row);
static void ___lambda104__proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_value_applied (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* _sender,
                                                                                                             gpointer self);
static void __lambda105_ (Block30Data* _data30_);
static void ___lambda105__proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_remove_requested (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* _sender,
                                                                                                                gpointer self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_add_child (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* child);
static void proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_parse_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                                    gchar** tokens,
                                                                                                    gint tokens_length1,
                                                                                                    gboolean* consumed,
                                                                                                    gint consumed_length1);
static void proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_clear (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base);
static void proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_append_command_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                                               GeeLinkedList* segments);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_is_active (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base);
static void proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_property (GObject * object,
                                                                                                     guint property_id,
                                                                                                     GValue * value,
                                                                                                     GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_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_argument_row_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow_private_offset);
}

static void
_proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_apply_pending_text_gtk_button_clicked (GtkButton* _sender,
                                                                                                                   gpointer self)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_apply_pending_text ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow*) self);
}

static void
__lambda102_ (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self)
{
	g_signal_emit (self, proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_REMOVE_REQUESTED_SIGNAL], 0);
}

static void
___lambda102__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda102_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow*) self);
}

static gboolean
__lambda103_ (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self,
              guint keyval,
              guint keycode,
              GdkModifierType state)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	if (keyval == GDK_KEY_Return) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = keyval == GDK_KEY_KP_Enter;
	}
	if (_tmp0_) {
		proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_apply_pending_text (self);
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda103__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                    guint keyval,
                                                    guint keycode,
                                                    GdkModifierType state,
                                                    gpointer self)
{
	gboolean result;
	result = __lambda103_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow*) self, keyval, keycode, state);
	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_argument_row_apply_pending_text_gtk_list_box_row_activate (GtkListBoxRow* _sender,
                                                                                                                          gpointer self)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_apply_pending_text ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow*) self);
}

static void
_proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_refresh_apply_state_gtk_editable_changed (GtkEditable* _sender,
                                                                                                                      gpointer self)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_refresh_apply_state ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow*) self);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow*
proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_construct (GType object_type,
                                                                                      const gchar* value,
                                                                                      gint source_index)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	GtkButton* _tmp3_ = NULL;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	GtkButton* _tmp6_;
	GtkButton* remove_button = NULL;
	gchar* _tmp7_;
	gchar** _tmp8_;
	GtkButton* _tmp9_ = NULL;
	GtkEventControllerKey* keys = NULL;
	GtkEventControllerKey* _tmp10_;
	GtkEventController* _tmp11_;
	g_return_val_if_fail (value != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow*) g_object_new (object_type, "title", _ ("Argument"), "source-index", source_index, NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->committed_text);
	self->priv->committed_text = _tmp0_;
	gtk_editable_set_text ((GtkEditable*) self, value);
	proton_plus_utils_text_input_metadata_policy_apply ((GtkWidget*) self, PROTON_PLUS_UTILS_TEXT_INPUT_FIELD_KIND_COMMAND);
	gtk_widget_set_tooltip_text ((GtkWidget*) self, _ ("One exact shell argument. Quotes and escapes are preserved."));
	_tmp1_ = g_strdup ("flat");
	_tmp2_ = g_new0 (gchar*, 1 + 1);
	_tmp2_[0] = _tmp1_;
	_tmp3_ = (GtkButton*) gtk_button_new_from_icon_name ("object-select-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp3_, _tmp2_);
	_tmp2_ = (_vala_array_free (_tmp2_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->apply_button);
	self->priv->apply_button = _tmp3_;
	_tmp4_ = self->priv->apply_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp4_, _ ("Apply argument edit"));
	_tmp5_ = self->priv->apply_button;
	g_signal_connect_object (_tmp5_, "clicked", (GCallback) _proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_apply_pending_text_gtk_button_clicked, self, 0);
	_tmp6_ = self->priv->apply_button;
	adw_entry_row_add_suffix ((AdwEntryRow*) self, (GtkWidget*) _tmp6_);
	_tmp7_ = g_strdup ("flat");
	_tmp8_ = g_new0 (gchar*, 1 + 1);
	_tmp8_[0] = _tmp7_;
	_tmp9_ = (GtkButton*) gtk_button_new_from_icon_name ("user-trash-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp9_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp9_, _tmp8_);
	_tmp8_ = (_vala_array_free (_tmp8_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp9_);
	remove_button = _tmp9_;
	gtk_widget_set_tooltip_text ((GtkWidget*) remove_button, _ ("Remove argument"));
	g_signal_connect_object (remove_button, "clicked", (GCallback) ___lambda102__gtk_button_clicked, self, 0);
	adw_entry_row_add_suffix ((AdwEntryRow*) self, (GtkWidget*) remove_button);
	_tmp10_ = (GtkEventControllerKey*) gtk_event_controller_key_new ();
	keys = _tmp10_;
	gtk_event_controller_set_propagation_phase ((GtkEventController*) keys, GTK_PHASE_CAPTURE);
	g_signal_connect_object (keys, "key-pressed", (GCallback) ___lambda103__gtk_event_controller_key_key_pressed, self, 0);
	_tmp11_ = _g_object_ref0 ((GtkEventController*) keys);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp11_);
	g_signal_connect_object ((GtkListBoxRow*) self, "activate", (GCallback) _proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_apply_pending_text_gtk_list_box_row_activate, self, 0);
	g_signal_connect_object ((GtkEditable*) self, "changed", (GCallback) _proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_refresh_apply_state_gtk_editable_changed, self, 0);
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_refresh_apply_state (self);
	_g_object_unref0 (keys);
	_g_object_unref0 (remove_button);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow*
proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_new (const gchar* value,
                                                                                gint source_index)
{
	return proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_ROW, value, source_index);
}

gchar*
proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_committed_text (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->committed_text;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_apply_pending_text (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_editable_get_text ((GtkEditable*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->committed_text;
	if (g_strcmp0 (_tmp1_, _tmp2_) == 0) {
		return;
	}
	_tmp3_ = gtk_editable_get_text ((GtkEditable*) self);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strdup (_tmp4_);
	_g_free0 (self->priv->committed_text);
	self->priv->committed_text = _tmp5_;
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_refresh_apply_state (self);
	g_signal_emit (self, proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_VALUE_APPLIED_SIGNAL], 0);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_refresh_apply_state (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self)
{
	GtkButton* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->apply_button;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->committed_text;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, g_strcmp0 (_tmp2_, _tmp3_) != 0);
}

gint
proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_source_index (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_source_index;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_set_source_index (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* self,
                                                                                             gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_source_index (self);
	if (old_value != value) {
		self->priv->_source_index = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_SOURCE_INDEX_PROPERTY]);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRowClass * klass,
                                                                                       gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_SOURCE_INDEX_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_SOURCE_INDEX_PROPERTY] = g_param_spec_int ("source-index", "source-index", "source-index", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_VALUE_APPLIED_SIGNAL] = g_signal_new ("value-applied", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_ROW, 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_argument_row_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_REMOVE_REQUESTED_SIGNAL] = g_signal_new ("remove-requested", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_ROW, 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_argument_row_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow * self,
                                                                                          gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_ROW, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow);
	_g_free0 (self->priv->committed_text);
	_g_object_unref0 (self->priv->apply_button);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_type_id = g_type_register_static (adw_entry_row_get_type (), "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRowPrivate));
	return proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_type_id = proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_property (GObject * object,
                                                                                               guint property_id,
                                                                                               GValue * value,
                                                                                               GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_ROW, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_SOURCE_INDEX_PROPERTY:
		g_value_set_int (value, proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_source_index (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_argument_row_set_property (GObject * object,
                                                                                               guint property_id,
                                                                                               const GValue * value,
                                                                                               GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_ROW, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_ROW_SOURCE_INDEX_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_set_source_index (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList_private_offset);
}

static void
_proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_add_empty_argument_gtk_button_clicked (GtkButton* _sender,
                                                                                                                    gpointer self)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_add_empty_argument ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList*) self);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList*
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_construct (GType object_type,
                                                                                       const gchar* title,
                                                                                       const gchar* subtitle)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList * self = NULL;
	GeeArrayList* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	AdwActionRow* _tmp3_ = NULL;
	AdwActionRow* _tmp4_;
	AdwActionRow* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	AdwActionRow* _tmp8_;
	GtkButton* add_button = NULL;
	gchar* _tmp9_;
	gchar** _tmp10_;
	GtkButton* _tmp11_ = NULL;
	AdwActionRow* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	AdwActionRow* _tmp15_;
	AdwActionRow* _tmp16_;
	AdwActionRow* _tmp17_;
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (subtitle != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList*) g_object_new (object_type, "title", title, "subtitle", subtitle, "expanded", FALSE, NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) self, subtitle);
	_tmp0_ = gee_array_list_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->rows);
	self->priv->rows = _tmp0_;
	_tmp1_ = g_strdup (_ ("Add custom argument"));
	_tmp2_ = g_strdup (_ ("Add one argument per list entry."));
	_tmp3_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp3_, _tmp1_);
	_g_free0 (_tmp1_);
	adw_action_row_set_subtitle (_tmp3_, _tmp2_);
	_g_free0 (_tmp2_);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->add_action_row);
	self->priv->add_action_row = _tmp3_;
	_tmp4_ = self->priv->add_action_row;
	_tmp5_ = self->priv->add_action_row;
	_tmp6_ = adw_action_row_get_subtitle (_tmp5_);
	_tmp7_ = _tmp6_;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp4_, _tmp7_);
	_tmp8_ = self->priv->add_action_row;
	gtk_widget_set_focusable ((GtkWidget*) _tmp8_, FALSE);
	_tmp9_ = g_strdup ("flat");
	_tmp10_ = g_new0 (gchar*, 1 + 1);
	_tmp10_[0] = _tmp9_;
	_tmp11_ = (GtkButton*) gtk_button_new_from_icon_name ("list-add-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp11_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp11_, _tmp10_);
	_tmp10_ = (_vala_array_free (_tmp10_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp11_);
	add_button = _tmp11_;
	_tmp12_ = self->priv->add_action_row;
	_tmp13_ = adw_preferences_row_get_title ((AdwPreferencesRow*) _tmp12_);
	_tmp14_ = _tmp13_;
	gtk_widget_set_tooltip_text ((GtkWidget*) add_button, _tmp14_);
	g_signal_connect_object (add_button, "clicked", (GCallback) _proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_add_empty_argument_gtk_button_clicked, self, 0);
	_tmp15_ = self->priv->add_action_row;
	adw_action_row_add_suffix (_tmp15_, (GtkWidget*) add_button);
	_tmp16_ = self->priv->add_action_row;
	gtk_widget_add_css_class ((GtkWidget*) _tmp16_, "property");
	_tmp17_ = self->priv->add_action_row;
	gtk_widget_set_visible ((GtkWidget*) _tmp17_, TRUE);
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_add_action_row_to_end (self);
	_g_object_unref0 (add_button);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList*
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_new (const gchar* title,
                                                                                 const gchar* subtitle)
{
	return proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_LIST, title, subtitle);
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_load_from_parse_result (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self,
                                                                                                    ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gint* indexes = NULL;
	gint _tmp3_ = 0;
	gint* _tmp4_;
	gint indexes_length1;
	gint _indexes_size_;
	gint* _tmp5_;
	gint _tmp5__length1;
	GeeArrayList* _tmp14_;
	gint _tmp15_;
	gint _tmp16_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (parsed != NULL);
	self->priv->refreshing = TRUE;
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_original_input (parsed);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (self->priv->loaded_source);
	self->priv->loaded_source = _tmp2_;
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_remove_all_rows (self);
	_tmp4_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_custom_game_argument_indexes (parsed, &_tmp3_);
	indexes = _tmp4_;
	indexes_length1 = _tmp3_;
	_indexes_size_ = indexes_length1;
	_tmp5_ = indexes;
	_tmp5__length1 = indexes_length1;
	{
		gint* index_collection = NULL;
		gint index_collection_length1 = 0;
		gint _index_collection_size_ = 0;
		gint index_it = 0;
		index_collection = _tmp5_;
		index_collection_length1 = _tmp5__length1;
		for (index_it = 0; index_it < index_collection_length1; index_it = index_it + 1) {
			gint index = 0;
			index = index_collection[index_it];
			{
				GeeArrayList* _tmp6_;
				GeeArrayList* _tmp7_;
				gpointer _tmp8_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp9_;
				const gchar* _tmp10_;
				const gchar* _tmp11_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* _tmp12_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* _tmp13_;
				_tmp6_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (parsed);
				_tmp7_ = _tmp6_;
				_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, index);
				_tmp9_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp8_;
				_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (_tmp9_);
				_tmp11_ = _tmp10_;
				_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_append_argument (self, _tmp11_, index);
				_tmp13_ = _tmp12_;
				_g_object_unref0 (_tmp13_);
				_g_object_unref0 (_tmp9_);
			}
		}
	}
	_tmp14_ = self->priv->rows;
	_tmp15_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp14_);
	_tmp16_ = _tmp15_;
	adw_expander_row_set_expanded ((AdwExpanderRow*) self, _tmp16_ > 0);
	self->priv->refreshing = FALSE;
	indexes = (g_free (indexes), NULL);
}

gchar**
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_raw_arguments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self,
                                                                                               gint* result_length1)
{
	GeeArrayList* values = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp14_;
	gint _tmp15_ = 0;
	gpointer* _tmp16_;
	gchar** _tmp17_;
	gint _tmp17__length1;
	gchar** result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	values = _tmp0_;
	{
		GeeArrayList* _row_list = NULL;
		GeeArrayList* _tmp1_;
		gint _row_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _row_index = 0;
		_tmp1_ = self->priv->rows;
		_row_list = _tmp1_;
		_tmp2_ = _row_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_row_size = _tmp4_;
		_row_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* row = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			gchar* value = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* _tmp9_;
			gchar* _tmp10_;
			const gchar* _tmp11_;
			_row_index = _row_index + 1;
			_tmp5_ = _row_index;
			_tmp6_ = _row_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _row_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _row_index);
			row = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow*) _tmp8_;
			_tmp9_ = row;
			_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_committed_text (_tmp9_);
			value = _tmp10_;
			_tmp11_ = value;
			if (g_strcmp0 (_tmp11_, "") != 0) {
				GeeArrayList* _tmp12_;
				const gchar* _tmp13_;
				_tmp12_ = values;
				_tmp13_ = value;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp12_, _tmp13_);
			}
			_g_free0 (value);
			_g_object_unref0 (row);
		}
	}
	_tmp14_ = values;
	_tmp16_ = gee_collection_to_array ((GeeCollection*) _tmp14_, &_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp17__length1 = _tmp15_;
	if (result_length1) {
		*result_length1 = _tmp17__length1;
	}
	result = _tmp17_;
	_g_object_unref0 (values);
	return result;
}

gint*
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_source_indexes (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self,
                                                                                                gint* result_length1)
{
	GeeArrayList* indexes = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp17_;
	gint _tmp18_ = 0;
	gpointer* _tmp19_;
	gint* _tmp20_;
	gint _tmp20__length1;
	gint* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_array_list_new (G_TYPE_INT, NULL, NULL, NULL, NULL, NULL);
	indexes = _tmp0_;
	{
		GeeArrayList* _row_list = NULL;
		GeeArrayList* _tmp1_;
		gint _row_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _row_index = 0;
		_tmp1_ = self->priv->rows;
		_row_list = _tmp1_;
		_tmp2_ = _row_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_row_size = _tmp4_;
		_row_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* row = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* _tmp9_;
			gchar* _tmp10_;
			gchar* _tmp11_;
			gboolean _tmp12_;
			_row_index = _row_index + 1;
			_tmp5_ = _row_index;
			_tmp6_ = _row_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _row_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _row_index);
			row = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow*) _tmp8_;
			_tmp9_ = row;
			_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_committed_text (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = g_strcmp0 (_tmp11_, "") != 0;
			_g_free0 (_tmp11_);
			if (_tmp12_) {
				GeeArrayList* _tmp13_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* _tmp14_;
				gint _tmp15_;
				gint _tmp16_;
				_tmp13_ = indexes;
				_tmp14_ = row;
				_tmp15_ = proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_source_index (_tmp14_);
				_tmp16_ = _tmp15_;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp13_, (gpointer) ((gintptr) _tmp16_));
			}
			_g_object_unref0 (row);
		}
	}
	_tmp17_ = indexes;
	_tmp19_ = gee_collection_to_array ((GeeCollection*) _tmp17_, &_tmp18_);
	_tmp20_ = _tmp19_;
	_tmp20__length1 = _tmp18_;
	if (result_length1) {
		*result_length1 = _tmp20__length1;
	}
	result = _tmp20_;
	_g_object_unref0 (indexes);
	return result;
}

gchar*
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_loaded_source (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->loaded_source;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

gchar*
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_validation_diagnostic (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self)
{
	gint _tmp0_ = 0;
	gchar** _tmp1_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_raw_arguments (self, &_tmp0_);
	{
		gchar** value_collection = NULL;
		gint value_collection_length1 = 0;
		gint _value_collection_size_ = 0;
		gint value_it = 0;
		value_collection = _tmp1_;
		value_collection_length1 = _tmp0_;
		for (value_it = 0; value_it < value_collection_length1; value_it = value_it + 1) {
			gchar* _tmp2_;
			gchar* value = NULL;
			_tmp2_ = g_strdup (value_collection[value_it]);
			value = _tmp2_;
			{
				GeeArrayList* tokens = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer* _tmp3_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer* _tmp4_;
				const gchar* _tmp5_;
				GeeArrayList* _tmp6_;
				GeeArrayList* _tmp7_;
				gboolean _tmp8_ = FALSE;
				GeeArrayList* _tmp9_;
				gint _tmp10_;
				gint _tmp11_;
				const gchar* _tmp19_;
				_tmp3_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_new ();
				_tmp4_ = _tmp3_;
				_tmp5_ = value;
				_tmp6_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_tokenize (_tmp4_, _tmp5_);
				_tmp7_ = _tmp6_;
				_g_object_unref0 (_tmp4_);
				tokens = _tmp7_;
				_tmp9_ = tokens;
				_tmp10_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp9_);
				_tmp11_ = _tmp10_;
				if (_tmp11_ != 1) {
					_tmp8_ = TRUE;
				} else {
					GeeArrayList* _tmp12_;
					gpointer _tmp13_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp14_;
					const gchar* _tmp15_;
					const gchar* _tmp16_;
					const gchar* _tmp17_;
					_tmp12_ = tokens;
					_tmp13_ = gee_abstract_list_get ((GeeAbstractList*) _tmp12_, 0);
					_tmp14_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp13_;
					_tmp15_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (_tmp14_);
					_tmp16_ = _tmp15_;
					_tmp17_ = value;
					_tmp8_ = g_strcmp0 (_tmp16_, _tmp17_) != 0;
					_g_object_unref0 (_tmp14_);
				}
				if (_tmp8_) {
					gchar* _tmp18_;
					_tmp18_ = g_strdup (_ ("Each custom game argument must be one complete shell argument."));
					result = _tmp18_;
					_g_object_unref0 (tokens);
					_g_free0 (value);
					value_collection = (_vala_array_free (value_collection, value_collection_length1, (GDestroyNotify) g_free), NULL);
					return result;
				}
				_tmp19_ = value;
				if (string_contains (_tmp19_, "%command%")) {
					gchar* _tmp20_;
					_tmp20_ = g_strdup (_ ("Custom game arguments cannot contain %command%."));
					result = _tmp20_;
					_g_object_unref0 (tokens);
					_g_free0 (value);
					value_collection = (_vala_array_free (value_collection, value_collection_length1, (GDestroyNotify) g_free), NULL);
					return result;
				}
				_g_object_unref0 (tokens);
				_g_free0 (value);
			}
		}
		value_collection = (_vala_array_free (value_collection, value_collection_length1, (GDestroyNotify) g_free), NULL);
	}
	result = NULL;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_add_empty_argument (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self)
{
	AdwActionRow* _tmp0_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* row = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->add_action_row;
	adw_expander_row_remove ((AdwExpanderRow*) self, (GtkWidget*) _tmp0_);
	_tmp1_ = proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_append_argument (self, "", -1);
	row = _tmp1_;
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_add_action_row_to_end (self);
	adw_expander_row_set_expanded ((AdwExpanderRow*) self, TRUE);
	gtk_widget_grab_focus ((GtkWidget*) row);
	_g_object_unref0 (row);
}

static Block30Data*
block30_data_ref (Block30Data* _data30_)
{
	g_atomic_int_inc (&_data30_->_ref_count_);
	return _data30_;
}

static void
block30_data_unref (void * _userdata_)
{
	Block30Data* _data30_;
	_data30_ = (Block30Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data30_->_ref_count_)) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self;
		self = _data30_->self;
		_g_object_unref0 (_data30_->row);
		_g_object_unref0 (self);
		g_slice_free (Block30Data, _data30_);
	}
}

static void
__lambda104_ (Block30Data* _data30_)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	self = _data30_->self;
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_committed_text (_data30_->row);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strcmp0 (_tmp1_, "") == 0;
	_g_free0 (_tmp1_);
	if (_tmp2_) {
		proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_remove_argument (self, _data30_->row);
	} else {
		if (!self->priv->refreshing) {
			g_signal_emit (self, proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_CHANGED_SIGNAL], 0);
		}
	}
}

static void
___lambda104__proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_value_applied (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* _sender,
                                                                                                        gpointer self)
{
	__lambda104_ (self);
}

static void
__lambda105_ (Block30Data* _data30_)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self;
	self = _data30_->self;
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_remove_argument (self, _data30_->row);
}

static void
___lambda105__proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_remove_requested (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* _sender,
                                                                                                           gpointer self)
{
	__lambda105_ (self);
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow*
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_append_argument (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self,
                                                                                             const gchar* value,
                                                                                             gint source_index)
{
	Block30Data* _data30_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* _tmp0_;
	GeeArrayList* _tmp1_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* _tmp2_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (value != NULL, NULL);
	_data30_ = g_slice_new0 (Block30Data);
	_data30_->_ref_count_ = 1;
	_data30_->self = g_object_ref (self);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_new (value, source_index);
	g_object_ref_sink (_tmp0_);
	_data30_->row = _tmp0_;
	g_signal_connect_data (_data30_->row, "value-applied", (GCallback) ___lambda104__proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_value_applied, block30_data_ref (_data30_), (GClosureNotify) block30_data_unref, 0);
	g_signal_connect_data (_data30_->row, "remove-requested", (GCallback) ___lambda105__proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_remove_requested, block30_data_ref (_data30_), (GClosureNotify) block30_data_unref, 0);
	_tmp1_ = self->priv->rows;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, _data30_->row);
	adw_expander_row_add_row ((AdwExpanderRow*) self, (GtkWidget*) _data30_->row);
	_tmp2_ = _g_object_ref0 (_data30_->row);
	result = _tmp2_;
	block30_data_unref (_data30_);
	_data30_ = NULL;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_remove_argument (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self,
                                                                                             ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* row)
{
	gboolean had_value = FALSE;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	GeeArrayList* _tmp3_;
	gboolean _tmp4_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_option_argument_row_get_committed_text (row);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strcmp0 (_tmp1_, "") != 0;
	_g_free0 (_tmp1_);
	had_value = _tmp2_;
	adw_expander_row_remove ((AdwExpanderRow*) self, (GtkWidget*) row);
	_tmp3_ = self->priv->rows;
	gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp3_, row);
	if (had_value) {
		_tmp4_ = !self->priv->refreshing;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		g_signal_emit (self, proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_CHANGED_SIGNAL], 0);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_remove_all_rows (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self)
{
	GeeArrayList* _tmp9_;
	g_return_if_fail (self != NULL);
	{
		GeeArrayList* _row_list = NULL;
		GeeArrayList* _tmp0_;
		gint _row_size = 0;
		GeeArrayList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _row_index = 0;
		_tmp0_ = self->priv->rows;
		_row_list = _tmp0_;
		_tmp1_ = _row_list;
		_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_row_size = _tmp3_;
		_row_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* row = NULL;
			GeeArrayList* _tmp6_;
			gpointer _tmp7_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow* _tmp8_;
			_row_index = _row_index + 1;
			_tmp4_ = _row_index;
			_tmp5_ = _row_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _row_list;
			_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _row_index);
			row = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentRow*) _tmp7_;
			_tmp8_ = row;
			adw_expander_row_remove ((AdwExpanderRow*) self, (GtkWidget*) _tmp8_);
			_g_object_unref0 (row);
		}
	}
	_tmp9_ = self->priv->rows;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp9_);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_add_action_row_to_end (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self)
{
	AdwActionRow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->add_action_row;
	adw_expander_row_add_row ((AdwExpanderRow*) self, (GtkWidget*) _tmp0_);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_add_child (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                            ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* child)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList * self;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList*) base;
	g_return_if_fail (child != NULL);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_parse_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                               gchar** tokens,
                                                                                               gint tokens_length1,
                                                                                               gboolean* consumed,
                                                                                               gint consumed_length1)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList * self;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList*) base;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_clear (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList * self;
	gboolean had_arguments = FALSE;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList*) base;
	had_arguments = proton_plus_widgets_games_launch_options_editor_ilaunch_option_is_active ((ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self);
	self->priv->refreshing = TRUE;
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_remove_all_rows (self);
	self->priv->refreshing = FALSE;
	if (had_arguments) {
		g_signal_emit (self, proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_CHANGED_SIGNAL], 0);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_append_command_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                                          GeeLinkedList* segments)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList * self;
	gint _tmp0_ = 0;
	gchar** _tmp1_;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList*) base;
	g_return_if_fail (segments != NULL);
	_tmp1_ = proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_raw_arguments (self, &_tmp0_);
	{
		gchar** argument_collection = NULL;
		gint argument_collection_length1 = 0;
		gint _argument_collection_size_ = 0;
		gint argument_it = 0;
		argument_collection = _tmp1_;
		argument_collection_length1 = _tmp0_;
		for (argument_it = 0; argument_it < argument_collection_length1; argument_it = argument_it + 1) {
			gchar* _tmp2_;
			gchar* argument = NULL;
			_tmp2_ = g_strdup (argument_collection[argument_it]);
			argument = _tmp2_;
			{
				const gchar* _tmp3_;
				_tmp3_ = argument;
				gee_abstract_collection_add ((GeeAbstractCollection*) segments, _tmp3_);
				_g_free0 (argument);
			}
		}
		argument_collection = (_vala_array_free (argument_collection, argument_collection_length1, (GDestroyNotify) g_free), NULL);
	}
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_is_active (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList * self;
	gint _tmp0_ = 0;
	gchar** _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	gboolean _tmp3_;
	gboolean result;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList*) base;
	_tmp1_ = proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_raw_arguments (self, &_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp2__length1 = _tmp0_;
	_tmp3_ = _tmp0_ > 0;
	_tmp2_ = (_vala_array_free (_tmp2_, _tmp2__length1, (GDestroyNotify) g_free), NULL);
	result = _tmp3_;
	return result;
}

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

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_set_line_type (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                                ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType old_value;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList*) base;
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_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_argument_list_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_LINE_TYPE_PROPERTY]);
	}
}

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

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_set_is_advanced (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                                  gboolean value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList* self;
	gboolean old_value;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList*) base;
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_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_argument_list_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_IS_ADVANCED_PROPERTY]);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentListClass * klass,
                                                                                        gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_LINE_TYPE_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_LINE_TYPE_PROPERTY] = g_param_spec_enum ("line-type", "line-type", "line-type", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_LINE_TYPE, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_ARGUMENT, 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_ARGUMENT_LIST_IS_ADVANCED_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_IS_ADVANCED_PROPERTY] = g_param_spec_boolean ("is-advanced", "is-advanced", "is-advanced", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_CHANGED_SIGNAL] = g_signal_new ("changed", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_LIST, 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_argument_list_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_argument_list_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_argument_list_real_add_child;
	iface->parse_tokens = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*, gchar**, gint, gboolean*, gint)) proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_parse_tokens;
	iface->clear = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*)) proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_clear;
	iface->append_command_segments = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*, GeeLinkedList*)) proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_append_command_segments;
	iface->is_active = (gboolean (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*)) proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_is_active;
	iface->get_line_type = proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_get_line_type;
	iface->set_line_type = proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_set_line_type;
	iface->get_is_advanced = proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_get_is_advanced;
	iface->set_is_advanced = proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_real_set_is_advanced;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList * self,
                                                                                           gpointer klass)
{
	gchar* _tmp0_;
	self->priv = proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_instance_private (self);
	self->priv->_line_type = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_ARGUMENT;
	self->priv->_is_advanced = TRUE;
	_tmp0_ = g_strdup ("");
	self->priv->loaded_source = _tmp0_;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_LIST, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList);
	_g_object_unref0 (self->priv->rows);
	_g_object_unref0 (self->priv->add_action_row);
	_g_free0 (self->priv->loaded_source);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentListClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_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_argument_list_proton_plus_widgets_games_launch_options_editor_ilaunch_option_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_type_id = g_type_register_static (adw_expander_row_get_type (), "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_type_id, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_OPTION, &proton_plus_widgets_games_launch_options_editor_ilaunch_option_info);
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentListPrivate));
	return proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_type_id = proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_option_argument_list_get_property (GObject * object,
                                                                                                guint property_id,
                                                                                                GValue * value,
                                                                                                GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_LIST, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_LINE_TYPE_PROPERTY:
		g_value_set_enum (value, proton_plus_widgets_games_launch_options_editor_ilaunch_option_get_line_type ((ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_IS_ADVANCED_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_launch_options_editor_ilaunch_option_get_is_advanced ((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_argument_list_set_property (GObject * object,
                                                                                                guint property_id,
                                                                                                const GValue * value,
                                                                                                GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ARGUMENT_LIST, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionArgumentList);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_LINE_TYPE_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_ilaunch_option_set_line_type ((ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ARGUMENT_LIST_IS_ADVANCED_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_ilaunch_option_set_is_advanced ((ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self, g_value_get_boolean (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;
}

