/* launch-command-plan.c generated by valac 0.56.19, the Vala compiler
 * generated from launch-command-plan.vala, do not modify */

#include "protonplus_core.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.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_ENVIRONMENT_ASSIGNMENT_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_ENVIRONMENT_ASSIGNMENT_KEY_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_ENVIRONMENT_ASSIGNMENT_RAW_ASSIGNMENT_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_ENVIRONMENT_ASSIGNMENT_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_ENVIRONMENT_ASSIGNMENT_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_ID_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_EXECUTABLE_TOKENS_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_ARGUMENT_TOKENS_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_DELIMITER_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_NESTING_PRIORITY_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_NUM_PROPERTIES];
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_GAME_ARGUMENTS_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_RETAIN_PLACEHOLDER_FOR_ARGUMENTS_ONLY_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_command_plan_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_NUM_PROPERTIES];

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignmentPrivate {
	gchar* _key;
	gchar* _raw_assignment;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocationPrivate {
	gchar* _id;
	gchar** _executable_tokens;
	gint _executable_tokens_length1;
	gint __executable_tokens_size_;
	gchar** _argument_tokens;
	gint _argument_tokens_length1;
	gint __argument_tokens_size_;
	gchar* _delimiter;
	gint _nesting_priority;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlanPrivate {
	gchar** _game_arguments;
	gint _game_arguments_length1;
	gint __game_arguments_size_;
	gboolean _retain_placeholder_for_arguments_only;
};

static gint ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_parent_class = NULL;
static gint ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_parent_class = NULL;
static gint ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_command_plan_parent_class = NULL;

static void proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_property (GObject * object,
                                                                                                       guint property_id,
                                                                                                       GValue * value,
                                                                                                       GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_set_property (GObject * object,
                                                                                                       guint property_id,
                                                                                                       const GValue * value,
                                                                                                       GParamSpec * pspec);
static gchar** _vala_array_dup2 (gchar** self,
                          gssize length);
static gchar** _vala_array_dup3 (gchar** self,
                          gssize length);
static void proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_property (GObject * object,
                                                                                                   guint property_id,
                                                                                                   GValue * value,
                                                                                                   GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_set_property (GObject * object,
                                                                                                   guint property_id,
                                                                                                   const GValue * value,
                                                                                                   GParamSpec * pspec);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment** _vala_array_dup4 (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment** self,
                                                                                         gssize length);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation** _vala_array_dup5 (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation** self,
                                                                                     gssize length);
static void proton_plus_widgets_games_launch_options_editor_launch_command_plan_set_game_arguments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan* self,
                                                                                             gchar** value,
                                                                                             gint value_length1);
static void proton_plus_widgets_games_launch_options_editor_launch_command_plan_set_retain_placeholder_for_arguments_only (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan* self,
                                                                                                                    gboolean value);
static gchar** _vala_array_dup6 (gchar** self,
                          gssize length);
static void proton_plus_widgets_games_launch_options_editor_launch_command_plan_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_command_plan_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_command_plan_get_property (GObject * object,
                                                                                             guint property_id,
                                                                                             GValue * value,
                                                                                             GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_command_plan_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
proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment_private_offset);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment*
proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_construct (GType object_type,
                                                                                         const gchar* key,
                                                                                         const gchar* raw_assignment)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment * self = NULL;
	g_return_val_if_fail (key != NULL, NULL);
	g_return_val_if_fail (raw_assignment != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment*) g_object_new (object_type, "key", key, "raw-assignment", raw_assignment, NULL);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment*
proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_new (const gchar* key,
                                                                                   const gchar* raw_assignment)
{
	return proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_ENVIRONMENT_ASSIGNMENT, key, raw_assignment);
}

const gchar*
proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_key (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_key;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_set_key (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment* self,
                                                                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_key (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_key);
		self->priv->_key = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_ENVIRONMENT_ASSIGNMENT_KEY_PROPERTY]);
	}
}

const gchar*
proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_raw_assignment (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_raw_assignment;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_set_raw_assignment (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment* self,
                                                                                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_raw_assignment (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_raw_assignment);
		self->priv->_raw_assignment = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_ENVIRONMENT_ASSIGNMENT_RAW_ASSIGNMENT_PROPERTY]);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignmentClass * klass,
                                                                                          gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_ENVIRONMENT_ASSIGNMENT_KEY_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_ENVIRONMENT_ASSIGNMENT_KEY_PROPERTY] = g_param_spec_string ("key", "key", "key", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_ENVIRONMENT_ASSIGNMENT_RAW_ASSIGNMENT_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_ENVIRONMENT_ASSIGNMENT_RAW_ASSIGNMENT_PROPERTY] = g_param_spec_string ("raw-assignment", "raw-assignment", "raw-assignment", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment * self,
                                                                                             gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_ENVIRONMENT_ASSIGNMENT, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment);
	_g_free0 (self->priv->_key);
	_g_free0 (self->priv->_raw_assignment);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignmentClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignmentPrivate));
	return proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_type_id = proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_property (GObject * object,
                                                                                                  guint property_id,
                                                                                                  GValue * value,
                                                                                                  GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_ENVIRONMENT_ASSIGNMENT, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_ENVIRONMENT_ASSIGNMENT_KEY_PROPERTY:
		g_value_set_string (value, proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_key (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_ENVIRONMENT_ASSIGNMENT_RAW_ASSIGNMENT_PROPERTY:
		g_value_set_string (value, proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_get_raw_assignment (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_environment_assignment_set_property (GObject * object,
                                                                                                  guint property_id,
                                                                                                  const GValue * value,
                                                                                                  GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_ENVIRONMENT_ASSIGNMENT, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_ENVIRONMENT_ASSIGNMENT_KEY_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_set_key (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_ENVIRONMENT_ASSIGNMENT_RAW_ASSIGNMENT_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_environment_assignment_set_raw_assignment (self, g_value_get_string (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_wrapper_invocation_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation_private_offset);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation*
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_construct (GType object_type,
                                                                                     const gchar* id,
                                                                                     gchar** executable_tokens,
                                                                                     gint executable_tokens_length1,
                                                                                     gchar** argument_tokens,
                                                                                     gint argument_tokens_length1,
                                                                                     const gchar* delimiter,
                                                                                     gint nesting_priority)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation * self = NULL;
	g_return_val_if_fail (id != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation*) g_object_new (object_type, "id", id, "executable-tokens", executable_tokens, "argument-tokens", argument_tokens, "delimiter", delimiter, "nesting-priority", nesting_priority, NULL);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation*
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_new (const gchar* id,
                                                                               gchar** executable_tokens,
                                                                               gint executable_tokens_length1,
                                                                               gchar** argument_tokens,
                                                                               gint argument_tokens_length1,
                                                                               const gchar* delimiter,
                                                                               gint nesting_priority)
{
	return proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_WRAPPER_INVOCATION, id, executable_tokens, executable_tokens_length1, argument_tokens, argument_tokens_length1, delimiter, nesting_priority);
}

const gchar*
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_id (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_set_id (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation* self,
                                                                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_id);
		self->priv->_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_ID_PROPERTY]);
	}
}

gchar**
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_executable_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation* self,
                                                                                                 gint* result_length1)
{
	gchar** result;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint _tmp1__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_executable_tokens;
	_tmp0__length1 = self->priv->_executable_tokens_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

static gchar**
_vala_array_dup2 (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
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_set_executable_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation* self,
                                                                                                 gchar** value,
                                                                                                 gint value_length1)
{
	gchar** old_value;
	gint old_value_length;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_executable_tokens (self, &old_value_length);
	if (old_value != value) {
		gchar** _tmp0_;
		gint _tmp0__length1;
		_tmp0_ = (value != NULL) ? _vala_array_dup2 (value, value_length1) : value;
		_tmp0__length1 = value_length1;
		self->priv->_executable_tokens = (_vala_array_free (self->priv->_executable_tokens, self->priv->_executable_tokens_length1, (GDestroyNotify) g_free), NULL);
		self->priv->_executable_tokens = _tmp0_;
		self->priv->_executable_tokens_length1 = _tmp0__length1;
		self->priv->__executable_tokens_size_ = self->priv->_executable_tokens_length1;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_EXECUTABLE_TOKENS_PROPERTY]);
	}
}

gchar**
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_argument_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation* self,
                                                                                               gint* result_length1)
{
	gchar** result;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint _tmp1__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_argument_tokens;
	_tmp0__length1 = self->priv->_argument_tokens_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

static gchar**
_vala_array_dup3 (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
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_set_argument_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation* self,
                                                                                               gchar** value,
                                                                                               gint value_length1)
{
	gchar** old_value;
	gint old_value_length;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_argument_tokens (self, &old_value_length);
	if (old_value != value) {
		gchar** _tmp0_;
		gint _tmp0__length1;
		_tmp0_ = (value != NULL) ? _vala_array_dup3 (value, value_length1) : value;
		_tmp0__length1 = value_length1;
		self->priv->_argument_tokens = (_vala_array_free (self->priv->_argument_tokens, self->priv->_argument_tokens_length1, (GDestroyNotify) g_free), NULL);
		self->priv->_argument_tokens = _tmp0_;
		self->priv->_argument_tokens_length1 = _tmp0__length1;
		self->priv->__argument_tokens_size_ = self->priv->_argument_tokens_length1;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_ARGUMENT_TOKENS_PROPERTY]);
	}
}

const gchar*
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_delimiter (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_delimiter;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_set_delimiter (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation* self,
                                                                                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_delimiter (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_delimiter);
		self->priv->_delimiter = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_DELIMITER_PROPERTY]);
	}
}

gint
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_nesting_priority (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_nesting_priority;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_set_nesting_priority (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation* self,
                                                                                                gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_nesting_priority (self);
	if (old_value != value) {
		self->priv->_nesting_priority = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_NESTING_PRIORITY_PROPERTY]);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocationClass * klass,
                                                                                      gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_ID_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_EXECUTABLE_TOKENS_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_EXECUTABLE_TOKENS_PROPERTY] = g_param_spec_boxed ("executable-tokens", "executable-tokens", "executable-tokens", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_ARGUMENT_TOKENS_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_ARGUMENT_TOKENS_PROPERTY] = g_param_spec_boxed ("argument-tokens", "argument-tokens", "argument-tokens", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_DELIMITER_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_DELIMITER_PROPERTY] = g_param_spec_string ("delimiter", "delimiter", "delimiter", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_NESTING_PRIORITY_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_NESTING_PRIORITY_PROPERTY] = g_param_spec_int ("nesting-priority", "nesting-priority", "nesting-priority", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation * self,
                                                                                         gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_WRAPPER_INVOCATION, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation);
	_g_free0 (self->priv->_id);
	self->priv->_executable_tokens = (_vala_array_free (self->priv->_executable_tokens, self->priv->_executable_tokens_length1, (GDestroyNotify) g_free), NULL);
	self->priv->_argument_tokens = (_vala_array_free (self->priv->_argument_tokens, self->priv->_argument_tokens_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (self->priv->_delimiter);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocationPrivate));
	return proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_type_id = proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_property (GObject * object,
                                                                                              guint property_id,
                                                                                              GValue * value,
                                                                                              GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_WRAPPER_INVOCATION, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_ID_PROPERTY:
		g_value_set_string (value, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_id (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_EXECUTABLE_TOKENS_PROPERTY:
		{
			int length;
			g_value_set_boxed (value, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_executable_tokens (self, &length));
		}
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_ARGUMENT_TOKENS_PROPERTY:
		{
			int length;
			g_value_set_boxed (value, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_argument_tokens (self, &length));
		}
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_DELIMITER_PROPERTY:
		g_value_set_string (value, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_delimiter (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_NESTING_PRIORITY_PROPERTY:
		g_value_set_int (value, proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_get_nesting_priority (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_wrapper_invocation_set_property (GObject * object,
                                                                                              guint property_id,
                                                                                              const GValue * value,
                                                                                              GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_WRAPPER_INVOCATION, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_ID_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_set_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_EXECUTABLE_TOKENS_PROPERTY:
		{
			gpointer boxed;
			boxed = g_value_get_boxed (value);
			proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_set_executable_tokens (self, boxed, (boxed == NULL) ? 0 : g_strv_length (boxed));
		}
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_ARGUMENT_TOKENS_PROPERTY:
		{
			gpointer boxed;
			boxed = g_value_get_boxed (value);
			proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_set_argument_tokens (self, boxed, (boxed == NULL) ? 0 : g_strv_length (boxed));
		}
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_DELIMITER_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_set_delimiter (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_WRAPPER_INVOCATION_NESTING_PRIORITY_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_wrapper_invocation_set_nesting_priority (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_command_plan_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan_private_offset);
}

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

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

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

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan*
proton_plus_widgets_games_launch_options_editor_launch_command_plan_construct (GType object_type,
                                                                               ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment** environment_assignments,
                                                                               gint environment_assignments_length1,
                                                                               ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation** wrappers,
                                                                               gint wrappers_length1,
                                                                               gchar** game_arguments,
                                                                               gint game_arguments_length1,
                                                                               gboolean retain_placeholder_for_arguments_only)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan * self = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment** _tmp0_;
	gint _tmp0__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation** _tmp1_;
	gint _tmp1__length1;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan*) g_object_new (object_type, NULL);
	_tmp0_ = (environment_assignments != NULL) ? _vala_array_dup4 (environment_assignments, environment_assignments_length1) : environment_assignments;
	_tmp0__length1 = environment_assignments_length1;
	self->environment_assignments = (_vala_array_free (self->environment_assignments, self->environment_assignments_length1, (GDestroyNotify) g_object_unref), NULL);
	self->environment_assignments = _tmp0_;
	self->environment_assignments_length1 = _tmp0__length1;
	_tmp1_ = (wrappers != NULL) ? _vala_array_dup5 (wrappers, wrappers_length1) : wrappers;
	_tmp1__length1 = wrappers_length1;
	self->wrappers = (_vala_array_free (self->wrappers, self->wrappers_length1, (GDestroyNotify) g_object_unref), NULL);
	self->wrappers = _tmp1_;
	self->wrappers_length1 = _tmp1__length1;
	proton_plus_widgets_games_launch_options_editor_launch_command_plan_set_game_arguments (self, game_arguments, game_arguments_length1);
	proton_plus_widgets_games_launch_options_editor_launch_command_plan_set_retain_placeholder_for_arguments_only (self, retain_placeholder_for_arguments_only);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan*
proton_plus_widgets_games_launch_options_editor_launch_command_plan_new (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchEnvironmentAssignment** environment_assignments,
                                                                         gint environment_assignments_length1,
                                                                         ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperInvocation** wrappers,
                                                                         gint wrappers_length1,
                                                                         gchar** game_arguments,
                                                                         gint game_arguments_length1,
                                                                         gboolean retain_placeholder_for_arguments_only)
{
	return proton_plus_widgets_games_launch_options_editor_launch_command_plan_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_PLAN, environment_assignments, environment_assignments_length1, wrappers, wrappers_length1, game_arguments, game_arguments_length1, retain_placeholder_for_arguments_only);
}

gchar**
proton_plus_widgets_games_launch_options_editor_launch_command_plan_get_game_arguments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan* self,
                                                                                        gint* result_length1)
{
	gchar** result;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint _tmp1__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_game_arguments;
	_tmp0__length1 = self->priv->_game_arguments_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

static gchar**
_vala_array_dup6 (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
proton_plus_widgets_games_launch_options_editor_launch_command_plan_set_game_arguments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan* self,
                                                                                        gchar** value,
                                                                                        gint value_length1)
{
	gchar** old_value;
	gint old_value_length;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_command_plan_get_game_arguments (self, &old_value_length);
	if (old_value != value) {
		gchar** _tmp0_;
		gint _tmp0__length1;
		_tmp0_ = (value != NULL) ? _vala_array_dup6 (value, value_length1) : value;
		_tmp0__length1 = value_length1;
		self->priv->_game_arguments = (_vala_array_free (self->priv->_game_arguments, self->priv->_game_arguments_length1, (GDestroyNotify) g_free), NULL);
		self->priv->_game_arguments = _tmp0_;
		self->priv->_game_arguments_length1 = _tmp0__length1;
		self->priv->__game_arguments_size_ = self->priv->_game_arguments_length1;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_command_plan_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_GAME_ARGUMENTS_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_plan_get_retain_placeholder_for_arguments_only (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_retain_placeholder_for_arguments_only;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_plan_set_retain_placeholder_for_arguments_only (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan* self,
                                                                                                               gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_command_plan_get_retain_placeholder_for_arguments_only (self);
	if (old_value != value) {
		self->priv->_retain_placeholder_for_arguments_only = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_command_plan_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_RETAIN_PLACEHOLDER_FOR_ARGUMENTS_ONLY_PROPERTY]);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_plan_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlanClass * klass,
                                                                                gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_command_plan_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_command_plan_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_command_plan_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_command_plan_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_GAME_ARGUMENTS_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_command_plan_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_GAME_ARGUMENTS_PROPERTY] = g_param_spec_boxed ("game-arguments", "game-arguments", "game-arguments", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_RETAIN_PLACEHOLDER_FOR_ARGUMENTS_ONLY_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_command_plan_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_RETAIN_PLACEHOLDER_FOR_ARGUMENTS_ONLY_PROPERTY] = g_param_spec_boolean ("retain-placeholder-for-arguments-only", "retain-placeholder-for-arguments-only", "retain-placeholder-for-arguments-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_plan_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan * self,
                                                                                   gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_launch_command_plan_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_plan_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_PLAN, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan);
	self->environment_assignments = (_vala_array_free (self->environment_assignments, self->environment_assignments_length1, (GDestroyNotify) g_object_unref), NULL);
	self->wrappers = (_vala_array_free (self->wrappers, self->wrappers_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->_game_arguments = (_vala_array_free (self->priv->_game_arguments, self->priv->_game_arguments_length1, (GDestroyNotify) g_free), NULL);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_command_plan_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_command_plan_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlanClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_command_plan_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_command_plan_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_command_plan_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_command_plan_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_launch_command_plan_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlanPrivate));
	return proton_plus_widgets_games_launch_options_editor_launch_command_plan_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_command_plan_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_command_plan_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_command_plan_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_command_plan_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_command_plan_type_id = proton_plus_widgets_games_launch_options_editor_launch_command_plan_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_command_plan_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_command_plan_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_command_plan_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_command_plan_get_property (GObject * object,
                                                                                        guint property_id,
                                                                                        GValue * value,
                                                                                        GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_PLAN, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_GAME_ARGUMENTS_PROPERTY:
		{
			int length;
			g_value_set_boxed (value, proton_plus_widgets_games_launch_options_editor_launch_command_plan_get_game_arguments (self, &length));
		}
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_RETAIN_PLACEHOLDER_FOR_ARGUMENTS_ONLY_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_launch_options_editor_launch_command_plan_get_retain_placeholder_for_arguments_only (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_command_plan_set_property (GObject * object,
                                                                                        guint property_id,
                                                                                        const GValue * value,
                                                                                        GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_PLAN, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandPlan);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_GAME_ARGUMENTS_PROPERTY:
		{
			gpointer boxed;
			boxed = g_value_get_boxed (value);
			proton_plus_widgets_games_launch_options_editor_launch_command_plan_set_game_arguments (self, boxed, (boxed == NULL) ? 0 : g_strv_length (boxed));
		}
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PLAN_RETAIN_PLACEHOLDER_FOR_ARGUMENTS_ONLY_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_command_plan_set_retain_placeholder_for_arguments_only (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);
}

