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

#include "protonplus_core.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <glib-object.h>
#include <adwaita.h>
#include <gtk/gtk.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_WRAPPERS_BASE_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_IS_ADVANCED_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_LINE_TYPE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_ACTIVE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_wrappers_base_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

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

typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile;
typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTileClass ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTileClass;
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_CHANGED_SIGNAL,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_NUM_SIGNALS
};
static guint proton_plus_widgets_games_launch_options_editor_wrappers_base_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_NUM_SIGNALS] = {0};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBasePrivate {
	gboolean _is_advanced;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType _line_type;
	gboolean _active;
};

static gint ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_wrappers_base_parent_class = NULL;
static ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOptionIface * proton_plus_widgets_games_launch_options_editor_wrappers_base_proton_plus_widgets_games_launch_options_editor_ilaunch_option_parent_iface = NULL;

VALA_EXTERN GType proton_plus_widgets_games_launch_options_editor_launch_option_tile_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* proton_plus_widgets_games_launch_options_editor_wrappers_base_create_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                                                                      const gchar* title,
                                                                                                                                      const gchar* subtitle,
                                                                                                                                      gchar** tokens,
                                                                                                                                      gint tokens_length1,
                                                                                                                                      gboolean is_advanced,
                                                                                                                                      ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType type,
                                                                                                                                      const gchar* id);
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* proton_plus_widgets_games_launch_options_editor_launch_option_tile_new (const gchar* title,
                                                                                                                                   const gchar* subtitle,
                                                                                                                                   gchar** tokens,
                                                                                                                                   gint tokens_length1,
                                                                                                                                   gboolean is_advanced,
                                                                                                                                   ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType line_type);
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* proton_plus_widgets_games_launch_options_editor_launch_option_tile_construct (GType object_type,
                                                                                                                                         const gchar* title,
                                                                                                                                         const gchar* subtitle,
                                                                                                                                         gchar** tokens,
                                                                                                                                         gint tokens_length1,
                                                                                                                                         gboolean is_advanced,
                                                                                                                                         ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType line_type);
VALA_EXTERN GtkSwitch* proton_plus_widgets_games_launch_options_editor_launch_option_tile_get_toggle (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* self);
static void __lambda146_ (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self);
static void ___lambda146__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
VALA_EXTERN gint proton_plus_widgets_games_launch_options_editor_wrappers_base_get_wrapper_end_index (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                          gchar** tokens,
                                                                                          gint tokens_length1,
                                                                                          gint wrapper_index,
                                                                                          gboolean* consumed,
                                                                                          gint consumed_length1);
VALA_EXTERN gint proton_plus_widgets_games_launch_options_editor_wrappers_base_get_token_index (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                    gchar** tokens,
                                                                                    gint tokens_length1,
                                                                                    const gchar* token);
VALA_EXTERN gint proton_plus_widgets_games_launch_options_editor_wrappers_base_get_first_present_index (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                            gchar** tokens,
                                                                                            gint tokens_length1,
                                                                                            gchar** candidates,
                                                                                            gint candidates_length1);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_wrappers_base_append_token (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                 GString* output,
                                                                                 const gchar* token);
static void proton_plus_widgets_games_launch_options_editor_wrappers_base_real_add_child (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                   ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* child);
static void proton_plus_widgets_games_launch_options_editor_wrappers_base_real_parse_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                      gchar** tokens,
                                                                                      gint tokens_length1,
                                                                                      gboolean* consumed,
                                                                                      gint consumed_length1);
static void proton_plus_widgets_games_launch_options_editor_wrappers_base_real_clear (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self);
static void proton_plus_widgets_games_launch_options_editor_wrappers_base_real_append_command_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                                 GeeLinkedList* segments);
static gboolean proton_plus_widgets_games_launch_options_editor_wrappers_base_real_is_active (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base);
static void proton_plus_widgets_games_launch_options_editor_wrappers_base_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_wrappers_base_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_wrappers_base_get_property (GObject * object,
                                                                                       guint property_id,
                                                                                       GValue * value,
                                                                                       GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_wrappers_base_set_property (GObject * object,
                                                                                       guint property_id,
                                                                                       const GValue * value,
                                                                                       GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
proton_plus_widgets_games_launch_options_editor_wrappers_base_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase_private_offset);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*
proton_plus_widgets_games_launch_options_editor_wrappers_base_construct (GType object_type,
                                                                         ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* launch_option_handlers,
                                                                         ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* presentation_registry)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase * self = NULL;
	GeeArrayList* _tmp0_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* _tmp1_;
	g_return_val_if_fail (launch_option_handlers != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) g_object_new (object_type, NULL);
	self->launch_option_handlers = launch_option_handlers;
	self->presentation_registry = presentation_registry;
	proton_plus_widgets_games_launch_options_editor_ilaunch_option_set_line_type ((ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_WRAPPER);
	_tmp0_ = gee_array_list_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_OPTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->_children);
	self->_children = (GeeList*) _tmp0_;
	proton_plus_widgets_games_launch_options_editor_ilaunch_option_set_is_advanced ((ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self, FALSE);
	_tmp1_ = self->launch_option_handlers;
	proton_plus_widgets_games_launch_options_editor_launch_options_list_add (_tmp1_, (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self);
	proton_plus_widgets_games_launch_options_editor_wrappers_base_set_active (self, FALSE);
	return self;
}

static void
__lambda146_ (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self)
{
	g_signal_emit (self, proton_plus_widgets_games_launch_options_editor_wrappers_base_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_CHANGED_SIGNAL], 0);
}

static void
___lambda146__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda146_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) self);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile*
proton_plus_widgets_games_launch_options_editor_wrappers_base_create_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                           const gchar* title,
                                                                           const gchar* subtitle,
                                                                           gchar** tokens,
                                                                           gint tokens_length1,
                                                                           gboolean is_advanced,
                                                                           ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType type,
                                                                           const gchar* id)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* tile = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp1_;
	GtkSwitch* _tmp2_;
	GtkSwitch* _tmp3_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp4_;
	gboolean _tmp5_ = FALSE;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (subtitle != NULL, NULL);
	g_return_val_if_fail (id != NULL, NULL);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_option_tile_new (title, subtitle, tokens, tokens_length1, is_advanced, type);
	g_object_ref_sink (_tmp0_);
	tile = _tmp0_;
	_tmp1_ = tile;
	_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_option_tile_get_toggle (_tmp1_);
	_tmp3_ = _tmp2_;
	g_signal_connect_object ((GObject*) _tmp3_, "notify::active", (GCallback) ___lambda146__g_object_notify, self, 0);
	_tmp4_ = tile;
	proton_plus_widgets_games_launch_options_editor_ilaunch_option_add_child ((ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) self, (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp4_);
	if (g_strcmp0 (id, "") != 0) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* _tmp6_;
		_tmp6_ = self->presentation_registry;
		_tmp5_ = _tmp6_ != NULL;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* _tmp7_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp8_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp9_;
		_tmp7_ = self->presentation_registry;
		_tmp8_ = tile;
		_tmp9_ = tile;
		proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_register (_tmp7_, id, (GtkWidget*) _tmp8_, (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp9_, FALSE);
	}
	result = tile;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_wrappers_base_register_option (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                               const gchar* id,
                                                                               GtkWidget* widget,
                                                                               ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (id != NULL);
	g_return_if_fail (widget != NULL);
	_tmp0_ = self->presentation_registry;
	if (_tmp0_ != NULL) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* _tmp1_;
		_tmp1_ = self->presentation_registry;
		proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_register (_tmp1_, id, widget, option, FALSE);
	}
}

gint
proton_plus_widgets_games_launch_options_editor_wrappers_base_get_wrapper_end_index (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                     gchar** tokens,
                                                                                     gint tokens_length1,
                                                                                     gint wrapper_index,
                                                                                     gboolean* consumed,
                                                                                     gint consumed_length1)
{
	gint command_index = 0;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	command_index = proton_plus_widgets_games_launch_options_editor_wrappers_base_get_token_index (self, tokens, (gint) tokens_length1, "%command%");
	if (command_index > wrapper_index) {
		_tmp1_ = command_index > 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		const gchar* _tmp2_;
		_tmp2_ = tokens[command_index - 1];
		_tmp0_ = g_strcmp0 (_tmp2_, "--") == 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		consumed[command_index - 1] = TRUE;
		result = command_index - 1;
		return result;
	}
	result = tokens_length1;
	return result;
}

gint
proton_plus_widgets_games_launch_options_editor_wrappers_base_get_first_present_index (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                       gchar** tokens,
                                                                                       gint tokens_length1,
                                                                                       gchar** candidates,
                                                                                       gint candidates_length1)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = index;
					index = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				if (!(index < tokens_length1)) {
					break;
				}
				{
					gchar** candidate_collection = NULL;
					gint candidate_collection_length1 = 0;
					gint _candidate_collection_size_ = 0;
					gint candidate_it = 0;
					candidate_collection = candidates;
					candidate_collection_length1 = candidates_length1;
					for (candidate_it = 0; candidate_it < candidate_collection_length1; candidate_it = candidate_it + 1) {
						gchar* _tmp2_;
						gchar* candidate = NULL;
						_tmp2_ = g_strdup (candidate_collection[candidate_it]);
						candidate = _tmp2_;
						{
							const gchar* _tmp3_;
							const gchar* _tmp4_;
							_tmp3_ = tokens[index];
							_tmp4_ = candidate;
							if (g_strcmp0 (_tmp3_, _tmp4_) == 0) {
								result = index;
								_g_free0 (candidate);
								return result;
							}
							_g_free0 (candidate);
						}
					}
				}
			}
		}
	}
	result = -1;
	return result;
}

gint
proton_plus_widgets_games_launch_options_editor_wrappers_base_get_token_index (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                               gchar** tokens,
                                                                               gint tokens_length1,
                                                                               const gchar* token)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (token != NULL, -1);
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				const gchar* _tmp2_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = index;
					index = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				if (!(index < tokens_length1)) {
					break;
				}
				_tmp2_ = tokens[index];
				if (g_strcmp0 (_tmp2_, token) == 0) {
					result = index;
					return result;
				}
			}
		}
	}
	result = -1;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_wrappers_base_append_token (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                            GString* output,
                                                                            const gchar* token)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (output != NULL);
	g_return_if_fail (token != NULL);
	if (output->len > ((gssize) 0)) {
		g_string_append (output, " ");
	}
	g_string_append (output, token);
}

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

static void
proton_plus_widgets_games_launch_options_editor_wrappers_base_real_parse_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                 gchar** tokens,
                                                                                 gint tokens_length1,
                                                                                 gboolean* consumed,
                                                                                 gint consumed_length1)
{
	g_critical ("Type `%s' does not implement abstract method `proton_plus_widgets_games_launch_options_editor_wrappers_base_parse_tokens'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
proton_plus_widgets_games_launch_options_editor_wrappers_base_parse_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                            gchar** tokens,
                                                                            gint tokens_length1,
                                                                            gboolean* consumed,
                                                                            gint consumed_length1)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_GET_CLASS (self);
	if (_klass_->parse_tokens) {
		_klass_->parse_tokens (self, tokens, tokens_length1, consumed, consumed_length1);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_base_real_clear (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self)
{
	g_critical ("Type `%s' does not implement abstract method `proton_plus_widgets_games_launch_options_editor_wrappers_base_clear'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
proton_plus_widgets_games_launch_options_editor_wrappers_base_clear (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_GET_CLASS (self);
	if (_klass_->clear) {
		_klass_->clear (self);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_base_real_append_command_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                            GeeLinkedList* segments)
{
	g_critical ("Type `%s' does not implement abstract method `proton_plus_widgets_games_launch_options_editor_wrappers_base_append_command_segments'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
proton_plus_widgets_games_launch_options_editor_wrappers_base_append_command_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                                       GeeLinkedList* segments)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_GET_CLASS (self);
	if (_klass_->append_command_segments) {
		_klass_->append_command_segments (self, segments);
	}
}

static gboolean
proton_plus_widgets_games_launch_options_editor_wrappers_base_real_is_active (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase * self;
	gboolean _tmp0_;
	gboolean result;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) base;
	_tmp0_ = self->priv->_active;
	result = _tmp0_;
	return result;
}

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

static void
proton_plus_widgets_games_launch_options_editor_wrappers_base_real_set_is_advanced (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                    gboolean value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self;
	gboolean old_value;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) base;
	old_value = proton_plus_widgets_games_launch_options_editor_wrappers_base_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_wrappers_base_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_IS_ADVANCED_PROPERTY]);
	}
}

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

static void
proton_plus_widgets_games_launch_options_editor_wrappers_base_real_set_line_type (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* base,
                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType old_value;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*) base;
	old_value = proton_plus_widgets_games_launch_options_editor_wrappers_base_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_wrappers_base_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_LINE_TYPE_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_launch_options_editor_wrappers_base_get_active (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_active;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_wrappers_base_set_active (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase* self,
                                                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_wrappers_base_get_active (self);
	if (old_value != value) {
		self->priv->_active = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_wrappers_base_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_ACTIVE_PROPERTY]);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_base_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBaseClass * klass,
                                                                          gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_wrappers_base_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase_private_offset);
	((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBaseClass *) klass)->parse_tokens = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*, gchar**, gint, gboolean*, gint)) proton_plus_widgets_games_launch_options_editor_wrappers_base_real_parse_tokens;
	((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBaseClass *) klass)->clear = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*)) proton_plus_widgets_games_launch_options_editor_wrappers_base_real_clear;
	((ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBaseClass *) klass)->append_command_segments = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase*, GeeLinkedList*)) proton_plus_widgets_games_launch_options_editor_wrappers_base_real_append_command_segments;
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_wrappers_base_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_wrappers_base_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_wrappers_base_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_IS_ADVANCED_PROPERTY, proton_plus_widgets_games_launch_options_editor_wrappers_base_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_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_WRAPPERS_BASE_LINE_TYPE_PROPERTY, proton_plus_widgets_games_launch_options_editor_wrappers_base_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_LINE_TYPE_PROPERTY] = g_param_spec_enum ("line-type", "line-type", "line-type", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_LINE_TYPE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_ACTIVE_PROPERTY, proton_plus_widgets_games_launch_options_editor_wrappers_base_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_ACTIVE_PROPERTY] = g_param_spec_boolean ("active", "active", "active", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	proton_plus_widgets_games_launch_options_editor_wrappers_base_signals[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_CHANGED_SIGNAL] = g_signal_new ("changed", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_TYPE_BASE, 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_wrappers_base_proton_plus_widgets_games_launch_options_editor_ilaunch_option_interface_init (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOptionIface * iface,
                                                                                                                                             gpointer iface_data)
{
	proton_plus_widgets_games_launch_options_editor_wrappers_base_proton_plus_widgets_games_launch_options_editor_ilaunch_option_parent_iface = g_type_interface_peek_parent (iface);
	iface->add_child = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*, ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*)) proton_plus_widgets_games_launch_options_editor_wrappers_base_real_add_child;
	iface->parse_tokens = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*, gchar**, gint, gboolean*, gint)) proton_plus_widgets_games_launch_options_editor_wrappers_base_parse_tokens;
	iface->clear = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*)) proton_plus_widgets_games_launch_options_editor_wrappers_base_clear;
	iface->append_command_segments = (void (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*, GeeLinkedList*)) proton_plus_widgets_games_launch_options_editor_wrappers_base_append_command_segments;
	iface->is_active = (gboolean (*) (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*)) proton_plus_widgets_games_launch_options_editor_wrappers_base_real_is_active;
	iface->get_is_advanced = proton_plus_widgets_games_launch_options_editor_wrappers_base_real_get_is_advanced;
	iface->set_is_advanced = proton_plus_widgets_games_launch_options_editor_wrappers_base_real_set_is_advanced;
	iface->get_line_type = proton_plus_widgets_games_launch_options_editor_wrappers_base_real_get_line_type;
	iface->set_line_type = proton_plus_widgets_games_launch_options_editor_wrappers_base_real_set_line_type;
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_base_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase * self,
                                                                             gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_wrappers_base_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_wrappers_base_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_TYPE_BASE, ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase);
	_g_object_unref0 (self->_children);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_wrappers_base_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_wrappers_base_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBaseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_wrappers_base_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_wrappers_base_instance_init, NULL };
	static const GInterfaceInfo proton_plus_widgets_games_launch_options_editor_ilaunch_option_info = { (GInterfaceInitFunc) proton_plus_widgets_games_launch_options_editor_wrappers_base_proton_plus_widgets_games_launch_options_editor_ilaunch_option_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_widgets_games_launch_options_editor_wrappers_base_type_id;
	proton_plus_widgets_games_launch_options_editor_wrappers_base_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	g_type_add_interface_static (proton_plus_widgets_games_launch_options_editor_wrappers_base_type_id, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_OPTION, &proton_plus_widgets_games_launch_options_editor_ilaunch_option_info);
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_wrappers_base_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBasePrivate));
	return proton_plus_widgets_games_launch_options_editor_wrappers_base_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_wrappers_base_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_wrappers_base_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_wrappers_base_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_wrappers_base_type_id;
		proton_plus_widgets_games_launch_options_editor_wrappers_base_type_id = proton_plus_widgets_games_launch_options_editor_wrappers_base_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_wrappers_base_type_id__once, proton_plus_widgets_games_launch_options_editor_wrappers_base_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_wrappers_base_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_wrappers_base_get_property (GObject * object,
                                                                                  guint property_id,
                                                                                  GValue * value,
                                                                                  GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_TYPE_BASE, ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_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_WRAPPERS_BASE_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_WRAPPERS_BASE_ACTIVE_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_launch_options_editor_wrappers_base_get_active (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_wrappers_base_set_property (GObject * object,
                                                                                  guint property_id,
                                                                                  const GValue * value,
                                                                                  GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_TYPE_BASE, ProtonPlusWidgetsGamesLaunchOptionsEditorWrappersBase);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_WRAPPERS_BASE_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_WRAPPERS_BASE_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_WRAPPERS_BASE_ACTIVE_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_wrappers_base_set_active (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

