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

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

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

enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_ENVIRONMENT_VARIABLE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_ENVIRONMENT_VARIABLE_PREFIX_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_IS_ADVANCED_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_LINE_TYPE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_VALUE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_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_ENV_COMBO_CHANGED_SIGNAL,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_NUM_SIGNALS
};
static guint proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_NUM_SIGNALS] = {0};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvComboPrivate {
	gchar* _environment_variable;
	gchar* _environment_variable_prefix;
	gboolean _is_advanced;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType _line_type;
	GeeList* _children;
};

static gint ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_parent_class = NULL;
static ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOptionIface * proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_proton_plus_widgets_games_launch_options_editor_ilaunch_option_parent_iface = NULL;

static gchar** _vala_array_dup25 (gchar** self,
                           gssize length);
static void __lambda109_ (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self);
static void ___lambda109__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_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_env_combo_real_clear (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base);
static void proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_add_child (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                             ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* child);
static void proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_append_command_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self,
                                                                                                           GeeLinkedList* segments);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_is_active (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base);
static void proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_property (GObject * object,
                                                                                                 guint property_id,
                                                                                                 GValue * value,
                                                                                                 GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_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_env_combo_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo_private_offset);
}

static gchar**
_vala_array_dup25 (gchar** self,
                   gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static void
__lambda109_ (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self)
{
	g_signal_emit (self, proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_CHANGED_SIGNAL], 0);
}

static void
___lambda109__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda109_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo*) self);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo*
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_construct (GType object_type,
                                                                                   const gchar* env_var,
                                                                                   const gchar* title_text,
                                                                                   const gchar* subtitle_text,
                                                                                   gchar** display_opts,
                                                                                   gint display_opts_length1,
                                                                                   gchar** value_opts,
                                                                                   gint value_opts_length1)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	GeeArrayList* _tmp3_;
	GtkStringList* string_list = NULL;
	GtkStringList* _tmp4_;
	g_return_val_if_fail (env_var != NULL, NULL);
	g_return_val_if_fail (title_text != NULL, NULL);
	g_return_val_if_fail (subtitle_text != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo*) g_object_new (object_type, NULL);
	proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_set_environment_variable (self, env_var);
	_tmp0_ = g_strconcat (env_var, "=", NULL);
	_tmp1_ = _tmp0_;
	proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_set_environment_variable_prefix (self, _tmp1_);
	_g_free0 (_tmp1_);
	_tmp2_ = (value_opts != NULL) ? _vala_array_dup25 (value_opts, value_opts_length1) : value_opts;
	_tmp2__length1 = value_opts_length1;
	self->value_opts = (_vala_array_free (self->value_opts, self->value_opts_length1, (GDestroyNotify) g_free), NULL);
	self->value_opts = _tmp2_;
	self->value_opts_length1 = _tmp2__length1;
	_tmp3_ = 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*) _tmp3_;
	adw_preferences_row_set_title ((AdwPreferencesRow*) self, title_text);
	adw_action_row_set_subtitle ((AdwActionRow*) self, subtitle_text);
	gtk_widget_set_tooltip_text ((GtkWidget*) self, subtitle_text);
	_tmp4_ = gtk_string_list_new (display_opts);
	string_list = _tmp4_;
	adw_combo_row_set_model ((AdwComboRow*) self, (GListModel*) string_list);
	g_signal_connect_object ((GObject*) self, "notify::selected", (GCallback) ___lambda109__g_object_notify, self, 0);
	_g_object_unref0 (string_list);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo*
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_new (const gchar* env_var,
                                                                             const gchar* title_text,
                                                                             const gchar* subtitle_text,
                                                                             gchar** display_opts,
                                                                             gint display_opts_length1,
                                                                             gchar** value_opts,
                                                                             gint value_opts_length1)
{
	return proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ENV_COMBO, env_var, title_text, subtitle_text, display_opts, display_opts_length1, value_opts, value_opts_length1);
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		offset = string_length + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		g_return_val_if_fail (offset <= string_length, NULL);
	}
	if (len < ((glong) 0)) {
		len = string_length - offset;
	}
	g_return_val_if_fail ((offset + len) <= string_length, NULL);
	_tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp3_;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_set_current_value (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self,
                                                                                           const gchar* current_env_string)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (current_env_string != NULL);
	_tmp0_ = self->priv->_environment_variable_prefix;
	if (g_str_has_prefix (current_env_string, _tmp0_)) {
		const gchar* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		_tmp1_ = self->priv->_environment_variable_prefix;
		_tmp2_ = strlen (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = string_substring (current_env_string, (glong) _tmp3_, (glong) -1);
		_tmp5_ = _tmp4_;
		proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_set_value (self, _tmp5_);
		_g_free0 (_tmp5_);
	} else {
		proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_set_value (self, "");
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_parse_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                           gchar** tokens,
                                                                                           gint tokens_length1,
                                                                                           gboolean* consumed,
                                                                                           gint consumed_length1)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo * self;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo*) base;
	if (tokens_length1 != consumed_length1) {
		return;
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gboolean _tmp2_;
				gchar* token = NULL;
				const gchar* _tmp3_;
				gchar* _tmp4_;
				const gchar* _tmp5_;
				const gchar* _tmp6_;
				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];
				_tmp4_ = g_strdup (_tmp3_);
				token = _tmp4_;
				_tmp5_ = token;
				_tmp6_ = self->priv->_environment_variable_prefix;
				if (g_str_has_prefix (_tmp5_, _tmp6_)) {
					const gchar* _tmp7_;
					const gchar* _tmp8_;
					gint _tmp9_;
					gint _tmp10_;
					gchar* _tmp11_;
					gchar* _tmp12_;
					_tmp7_ = token;
					_tmp8_ = self->priv->_environment_variable_prefix;
					_tmp9_ = strlen (_tmp8_);
					_tmp10_ = _tmp9_;
					_tmp11_ = string_substring (_tmp7_, (glong) _tmp10_, (glong) -1);
					_tmp12_ = _tmp11_;
					proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_set_value (self, _tmp12_);
					_g_free0 (_tmp12_);
					consumed[i] = TRUE;
					_g_free0 (token);
					break;
				}
				_g_free0 (token);
			}
		}
	}
	{
		GeeList* _child_list = NULL;
		GeeList* _tmp13_;
		gint _child_size = 0;
		GeeList* _tmp14_;
		gint _tmp15_;
		gint _tmp16_;
		gint _child_index = 0;
		_tmp13_ = self->priv->_children;
		_child_list = _tmp13_;
		_tmp14_ = _child_list;
		_tmp15_ = gee_collection_get_size ((GeeCollection*) _tmp14_);
		_tmp16_ = _tmp15_;
		_child_size = _tmp16_;
		_child_index = -1;
		while (TRUE) {
			gint _tmp17_;
			gint _tmp18_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* child = NULL;
			GeeList* _tmp19_;
			gpointer _tmp20_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp21_;
			_child_index = _child_index + 1;
			_tmp17_ = _child_index;
			_tmp18_ = _child_size;
			if (!(_tmp17_ < _tmp18_)) {
				break;
			}
			_tmp19_ = _child_list;
			_tmp20_ = gee_list_get (_tmp19_, _child_index);
			child = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp20_;
			_tmp21_ = child;
			proton_plus_widgets_games_launch_options_editor_ilaunch_option_parse_tokens (_tmp21_, tokens, (gint) tokens_length1, consumed, (gint) consumed_length1);
			_g_object_unref0 (child);
		}
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_clear (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo * self;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo*) base;
	proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_set_value (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 void
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_add_child (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                        ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* child)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo * self;
	GeeList* _tmp0_;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo*) 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_env_combo_real_append_command_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self,
                                                                                                      GeeLinkedList* segments)
{
	gchar* val = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (segments != NULL);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_value (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	val = _tmp2_;
	_tmp3_ = val;
	if (g_strcmp0 (_tmp3_, "") != 0) {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp4_ = self->priv->_environment_variable_prefix;
		_tmp5_ = val;
		_tmp6_ = g_strconcat (_tmp4_, _tmp5_, NULL);
		_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);
			}
		}
	}
	_g_free0 (val);
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_append_command_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self,
                                                                                                 GeeLinkedList* segments)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvComboClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_GET_CLASS (self);
	if (_klass_->append_command_segments) {
		_klass_->append_command_segments (self, segments);
	}
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_is_active (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo * self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gboolean result;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo*) base;
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_value (self);
	_tmp1_ = _tmp0_;
	result = g_strcmp0 (_tmp1_, "") != 0;
	return result;
}

const gchar*
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_environment_variable (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_environment_variable;
	result = _tmp0_;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_set_environment_variable (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self,
                                                                                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_environment_variable (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_environment_variable);
		self->priv->_environment_variable = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_ENVIRONMENT_VARIABLE_PROPERTY]);
	}
}

const gchar*
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_environment_variable_prefix (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_environment_variable_prefix;
	result = _tmp0_;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_set_environment_variable_prefix (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self,
                                                                                                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_environment_variable_prefix (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_environment_variable_prefix);
		self->priv->_environment_variable_prefix = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_ENVIRONMENT_VARIABLE_PREFIX_PROPERTY]);
	}
}

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

static void
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_set_is_advanced (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                              gboolean value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self;
	gboolean old_value;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo*) base;
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_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_env_combo_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_IS_ADVANCED_PROPERTY]);
	}
}

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

static void
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_set_line_type (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                            ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType old_value;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo*) base;
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_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_env_combo_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_LINE_TYPE_PROPERTY]);
	}
}

const gchar*
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_value (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self)
{
	const gchar* result;
	guint idx = 0U;
	guint _tmp0_;
	guint _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = adw_combo_row_get_selected ((AdwComboRow*) self);
	_tmp1_ = _tmp0_;
	idx = _tmp1_;
	_tmp2_ = self->value_opts;
	_tmp2__length1 = self->value_opts_length1;
	if (idx < ((guint) _tmp2__length1)) {
		gchar** _tmp3_;
		gint _tmp3__length1;
		const gchar* _tmp4_;
		_tmp3_ = self->value_opts;
		_tmp3__length1 = self->value_opts_length1;
		_tmp4_ = _tmp3_[idx];
		result = _tmp4_;
		return result;
	}
	result = "";
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_set_value (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo* self,
                                                                                   const gchar* value)
{
	g_return_if_fail (self != NULL);
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gchar** _tmp2_;
				gint _tmp2__length1;
				gchar** _tmp3_;
				gint _tmp3__length1;
				const gchar* _tmp4_;
				if (!_tmp0_) {
					guint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->value_opts;
				_tmp2__length1 = self->value_opts_length1;
				if (!(i < ((guint) _tmp2__length1))) {
					break;
				}
				_tmp3_ = self->value_opts;
				_tmp3__length1 = self->value_opts_length1;
				_tmp4_ = _tmp3_[i];
				if (g_strcmp0 (_tmp4_, value) == 0) {
					adw_combo_row_set_selected ((AdwComboRow*) self, i);
					return;
				}
			}
		}
	}
	adw_combo_row_set_selected ((AdwComboRow*) self, (guint) 0);
	g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_VALUE_PROPERTY]);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvComboClass * klass,
                                                                                    gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo_private_offset);
	((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvComboClass *) klass)->append_command_segments = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo*, GeeLinkedList*)) proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_append_command_segments;
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_ENVIRONMENT_VARIABLE_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_ENVIRONMENT_VARIABLE_PROPERTY] = g_param_spec_string ("environment-variable", "environment-variable", "environment-variable", NULL, 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_ENV_COMBO_ENVIRONMENT_VARIABLE_PREFIX_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_ENVIRONMENT_VARIABLE_PREFIX_PROPERTY] = g_param_spec_string ("environment-variable-prefix", "environment-variable-prefix", "environment-variable-prefix", NULL, 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_ENV_COMBO_IS_ADVANCED_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_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_ENV_COMBO_LINE_TYPE_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_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_ENVIRONMENT, 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_ENV_COMBO_VALUE_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_VALUE_PROPERTY] = g_param_spec_string ("value", "value", "value", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_CHANGED_SIGNAL] = g_signal_new ("changed", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ENV_COMBO, 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_env_combo_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_env_combo_proton_plus_widgets_games_launch_options_editor_ilaunch_option_parent_iface = g_type_interface_peek_parent (iface);
	iface->parse_tokens = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*, gchar**, gint, gboolean*, gint)) proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_parse_tokens;
	iface->clear = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*)) proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_clear;
	iface->add_child = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*, ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*)) proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_add_child;
	iface->append_command_segments = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*, GeeLinkedList*)) proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_append_command_segments;
	iface->is_active = (gboolean (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*)) proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_is_active;
	iface->get_is_advanced = proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_get_is_advanced;
	iface->set_is_advanced = proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_set_is_advanced;
	iface->get_line_type = proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_get_line_type;
	iface->set_line_type = proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_real_set_line_type;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo * self,
                                                                                       gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_instance_private (self);
	self->priv->_is_advanced = FALSE;
	self->priv->_line_type = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_ENVIRONMENT;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ENV_COMBO, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo);
	_g_free0 (self->priv->_environment_variable);
	_g_free0 (self->priv->_environment_variable_prefix);
	_g_object_unref0 (self->priv->_children);
	self->value_opts = (_vala_array_free (self->value_opts, self->value_opts_length1, (GDestroyNotify) g_free), NULL);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvComboClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_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_env_combo_proton_plus_widgets_games_launch_options_editor_ilaunch_option_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_type_id = g_type_register_static (adw_combo_row_get_type (), "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_type_id, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_OPTION, &proton_plus_widgets_games_launch_options_editor_ilaunch_option_info);
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvComboPrivate));
	return proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_type_id = proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_property (GObject * object,
                                                                                            guint property_id,
                                                                                            GValue * value,
                                                                                            GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ENV_COMBO, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_ENVIRONMENT_VARIABLE_PROPERTY:
		g_value_set_string (value, proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_environment_variable (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_ENVIRONMENT_VARIABLE_PREFIX_PROPERTY:
		g_value_set_string (value, proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_environment_variable_prefix (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_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_ENV_COMBO_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_ENV_COMBO_VALUE_PROPERTY:
		g_value_set_string (value, proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_get_value (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_env_combo_set_property (GObject * object,
                                                                                            guint property_id,
                                                                                            const GValue * value,
                                                                                            GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ENV_COMBO, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEnvCombo);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_ENVIRONMENT_VARIABLE_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_set_environment_variable (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_ENVIRONMENT_VARIABLE_PREFIX_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_set_environment_variable_prefix (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_ENV_COMBO_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_ENV_COMBO_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_ENV_COMBO_VALUE_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_set_value (self, g_value_get_string (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;
}

