/* proton-options-group.c generated by valac 0.56.19, the Vala compiler
 * generated from proton-options-group.vala, do not modify */

#include "protonplus_core.h"
#include <adwaita.h>
#include <glib-object.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.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

#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;
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_PROTON_OPTIONS_GROUP_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_PROTON_OPTIONS_GROUP_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_PROTON_OPTIONS_GROUP_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroupPrivate {
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _proton_priority_high_tile;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _proton_use_wow64_tile;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _proton_force_large_address_aware_tile;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _proton_logs_tile;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _proton_optiscaler_tile;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _proton_discord_bridge_tile;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _proton_use_d7vk_tile;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides* _dll_overrides_pair_editor;
};

static gint ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_parent_class = 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_groups_base_options_group_create_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup* self,
                                                                                                                                                  const gchar* title,
                                                                                                                                                  const gchar* subtitle,
                                                                                                                                                  gchar** tokens,
                                                                                                                                                  gint tokens_length1,
                                                                                                                                                  gboolean is_advanced,
                                                                                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType type,
                                                                                                                                                  const gchar* id);
static void proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_priority_high_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                                ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value);
static void proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_use_wow64_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                            ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value);
static void proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_force_large_address_aware_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                                            ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value);
static void proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_logs_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                       ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value);
static void proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_optiscaler_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                             ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value);
static void proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_discord_bridge_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value);
static void proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_use_d7vk_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                           ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value);
static void proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_dll_overrides_pair_editor (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                                ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides* value);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides* proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_dll_overrides_pair_editor (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self);
static void __lambda118_ (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                   ProtonPlusWidgetsGamesLaunchOptionsEditorCustomExpanderRow* row);
static void ___lambda118__proton_plus_widgets_games_launch_options_editor_custom_expander_row_changed (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomExpanderRow* _sender,
                                                                                                gpointer self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_proton_priority_high_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_proton_use_wow64_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_proton_force_large_address_aware_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_proton_logs_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_proton_optiscaler_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_proton_discord_bridge_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_proton_use_d7vk_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self);
static void proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_property (GObject * object,
                                                                                                     guint property_id,
                                                                                                     GValue * value,
                                                                                                     GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_property (GObject * object,
                                                                                                     guint property_id,
                                                                                                     const GValue * value,
                                                                                                     GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup_private_offset);
}

static void
__lambda118_ (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
              ProtonPlusWidgetsGamesLaunchOptionsEditorCustomExpanderRow* row)
{
	g_return_if_fail (row != NULL);
	g_signal_emit_by_name ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup*) self, "changed");
}

static void
___lambda118__proton_plus_widgets_games_launch_options_editor_custom_expander_row_changed (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomExpanderRow* _sender,
                                                                                           gpointer self)
{
	__lambda118_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup*) self, _sender);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup*
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_construct (GType object_type,
                                                                                       ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* launch_option_handlers,
                                                                                       ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* presentation_registry)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup * self = NULL;
	gchar* _tmp0_;
	gchar** _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp3_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp4_;
	gchar* _tmp5_;
	gchar** _tmp6_;
	gchar** _tmp7_;
	gint _tmp7__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp8_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp9_;
	gchar* _tmp10_;
	gchar** _tmp11_;
	gchar** _tmp12_;
	gint _tmp12__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp13_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp14_;
	gchar* _tmp15_;
	gchar** _tmp16_;
	gchar** _tmp17_;
	gint _tmp17__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp18_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp19_;
	gchar* _tmp20_;
	gchar** _tmp21_;
	gchar** _tmp22_;
	gint _tmp22__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp23_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp24_;
	gchar* _tmp25_;
	gchar** _tmp26_;
	gchar** _tmp27_;
	gint _tmp27__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp28_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp29_;
	gchar* _tmp30_;
	gchar** _tmp31_;
	gchar** _tmp32_;
	gint _tmp32__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp33_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp34_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides* _tmp35_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides* _tmp36_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides* _tmp37_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp38_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp39_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp40_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp41_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp42_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp43_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp44_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides* _tmp45_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides* _tmp46_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides* _tmp47_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides* _tmp48_;
	g_return_val_if_fail (launch_option_handlers != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup*) proton_plus_widgets_games_launch_options_editor_groups_base_options_group_construct (object_type, launch_option_handlers, FALSE, presentation_registry, TRUE);
	adw_preferences_group_set_title ((AdwPreferencesGroup*) self, _ ("Proton options"));
	adw_preferences_group_set_description ((AdwPreferencesGroup*) self, _ ("Extra Proton settings and launch behaviors."));
	_tmp0_ = g_strdup ("PROTON_PRIORITY_HIGH=1");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp2__length1 = 1;
	_tmp3_ = proton_plus_widgets_games_launch_options_editor_groups_base_options_group_create_tile ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup*) self, _ ("High process priority"), _ ("Gives the game a higher CPU priority which can improve performance in " \
"some cases."), _tmp2_, (gint) 1, FALSE, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_ENVIRONMENT, "high-process-priority");
	_tmp4_ = _tmp3_;
	proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_priority_high_tile (self, _tmp4_);
	_g_object_unref0 (_tmp4_);
	_tmp2_ = (_vala_array_free (_tmp2_, _tmp2__length1, (GDestroyNotify) g_free), NULL);
	_tmp5_ = g_strdup ("PROTON_USE_WOW64=1");
	_tmp6_ = g_new0 (gchar*, 1 + 1);
	_tmp6_[0] = _tmp5_;
	_tmp7_ = _tmp6_;
	_tmp7__length1 = 1;
	_tmp8_ = proton_plus_widgets_games_launch_options_editor_groups_base_options_group_create_tile ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup*) self, _ ("WoW64 mode"), _ ("Enables WoW64 support for 32-bit games on 64-bit Proton builds. This c" \
"an improve compatibility for some older games."), _tmp7_, (gint) 1, FALSE, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_ENVIRONMENT, "wow64");
	_tmp9_ = _tmp8_;
	proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_use_wow64_tile (self, _tmp9_);
	_g_object_unref0 (_tmp9_);
	_tmp7_ = (_vala_array_free (_tmp7_, _tmp7__length1, (GDestroyNotify) g_free), NULL);
	_tmp10_ = g_strdup ("PROTON_FORCE_LARGE_ADDRESS_AWARE=1");
	_tmp11_ = g_new0 (gchar*, 1 + 1);
	_tmp11_[0] = _tmp10_;
	_tmp12_ = _tmp11_;
	_tmp12__length1 = 1;
	_tmp13_ = proton_plus_widgets_games_launch_options_editor_groups_base_options_group_create_tile ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup*) self, _ ("Large address awareness for 32-bit games"), _ ("Forces 32-bit games to use large address aware which can improve perfo" \
"rmance and stability."), _tmp12_, (gint) 1, FALSE, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_ENVIRONMENT, "large-address-aware");
	_tmp14_ = _tmp13_;
	proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_force_large_address_aware_tile (self, _tmp14_);
	_g_object_unref0 (_tmp14_);
	_tmp12_ = (_vala_array_free (_tmp12_, _tmp12__length1, (GDestroyNotify) g_free), NULL);
	_tmp15_ = g_strdup ("PROTON_LOG=1");
	_tmp16_ = g_new0 (gchar*, 1 + 1);
	_tmp16_[0] = _tmp15_;
	_tmp17_ = _tmp16_;
	_tmp17__length1 = 1;
	_tmp18_ = proton_plus_widgets_games_launch_options_editor_groups_base_options_group_create_tile ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup*) self, _ ("Proton debug log"), _ ("Enables logging for Proton which can help with troubleshooting game is" \
"sues. Logs are saved in the game's compatibility data folder."), _tmp17_, (gint) 1, FALSE, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_ENVIRONMENT, "proton-debug-log");
	_tmp19_ = _tmp18_;
	proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_logs_tile (self, _tmp19_);
	_g_object_unref0 (_tmp19_);
	_tmp17_ = (_vala_array_free (_tmp17_, _tmp17__length1, (GDestroyNotify) g_free), NULL);
	_tmp20_ = g_strdup ("PROTON_USE_OPTISCALER=1");
	_tmp21_ = g_new0 (gchar*, 1 + 1);
	_tmp21_[0] = _tmp20_;
	_tmp22_ = _tmp21_;
	_tmp22__length1 = 1;
	_tmp23_ = proton_plus_widgets_games_launch_options_editor_groups_base_options_group_create_tile ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup*) self, _ ("OptiScaler integration"), _ ("Enables the Proton OptiScaler which can improve performance and image " \
"quality for some games (Available from version 11-1)."), _tmp22_, (gint) 1, FALSE, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_ENVIRONMENT, "optiscaler");
	_tmp24_ = _tmp23_;
	proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_optiscaler_tile (self, _tmp24_);
	_g_object_unref0 (_tmp24_);
	_tmp22_ = (_vala_array_free (_tmp22_, _tmp22__length1, (GDestroyNotify) g_free), NULL);
	_tmp25_ = g_strdup ("PROTON_DISCORD_BRIDGE=1");
	_tmp26_ = g_new0 (gchar*, 1 + 1);
	_tmp26_[0] = _tmp25_;
	_tmp27_ = _tmp26_;
	_tmp27__length1 = 1;
	_tmp28_ = proton_plus_widgets_games_launch_options_editor_groups_base_options_group_create_tile ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup*) self, _ ("Discord bridge"), _ ("Enables the Proton Discord Bridge which can improve integration with D" \
"iscord for some games (Available from version 11-1)."), _tmp27_, (gint) 1, FALSE, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_ENVIRONMENT, "discord-bridge");
	_tmp29_ = _tmp28_;
	proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_discord_bridge_tile (self, _tmp29_);
	_g_object_unref0 (_tmp29_);
	_tmp27_ = (_vala_array_free (_tmp27_, _tmp27__length1, (GDestroyNotify) g_free), NULL);
	_tmp30_ = g_strdup ("PROTON_USE_D7VK=1");
	_tmp31_ = g_new0 (gchar*, 1 + 1);
	_tmp31_[0] = _tmp30_;
	_tmp32_ = _tmp31_;
	_tmp32__length1 = 1;
	_tmp33_ = proton_plus_widgets_games_launch_options_editor_groups_base_options_group_create_tile ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup*) self, _ ("Use D7VK"), _ ("Enables the use of D7VK which can improve performance and compatibilit" \
"y for some Direct3D 9 games (Available from version 11-1)."), _tmp32_, (gint) 1, FALSE, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_ENVIRONMENT, "d7vk");
	_tmp34_ = _tmp33_;
	proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_use_d7vk_tile (self, _tmp34_);
	_g_object_unref0 (_tmp34_);
	_tmp32_ = (_vala_array_free (_tmp32_, _tmp32__length1, (GDestroyNotify) g_free), NULL);
	_tmp35_ = proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_new ();
	g_object_ref_sink (_tmp35_);
	_tmp36_ = _tmp35_;
	proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_dll_overrides_pair_editor (self, _tmp36_);
	_g_object_unref0 (_tmp36_);
	_tmp37_ = self->priv->_dll_overrides_pair_editor;
	g_signal_connect_object ((ProtonPlusWidgetsGamesLaunchOptionsEditorCustomExpanderRow*) _tmp37_, "changed", (GCallback) ___lambda118__proton_plus_widgets_games_launch_options_editor_custom_expander_row_changed, self, 0);
	_tmp38_ = self->priv->_proton_priority_high_tile;
	adw_preferences_group_add ((AdwPreferencesGroup*) self, (GtkWidget*) _tmp38_);
	_tmp39_ = self->priv->_proton_use_wow64_tile;
	adw_preferences_group_add ((AdwPreferencesGroup*) self, (GtkWidget*) _tmp39_);
	_tmp40_ = self->priv->_proton_force_large_address_aware_tile;
	adw_preferences_group_add ((AdwPreferencesGroup*) self, (GtkWidget*) _tmp40_);
	_tmp41_ = self->priv->_proton_logs_tile;
	adw_preferences_group_add ((AdwPreferencesGroup*) self, (GtkWidget*) _tmp41_);
	_tmp42_ = self->priv->_proton_optiscaler_tile;
	adw_preferences_group_add ((AdwPreferencesGroup*) self, (GtkWidget*) _tmp42_);
	_tmp43_ = self->priv->_proton_discord_bridge_tile;
	adw_preferences_group_add ((AdwPreferencesGroup*) self, (GtkWidget*) _tmp43_);
	_tmp44_ = self->priv->_proton_use_d7vk_tile;
	adw_preferences_group_add ((AdwPreferencesGroup*) self, (GtkWidget*) _tmp44_);
	_tmp45_ = self->priv->_dll_overrides_pair_editor;
	adw_preferences_group_add ((AdwPreferencesGroup*) self, (GtkWidget*) _tmp45_);
	_tmp46_ = self->priv->_dll_overrides_pair_editor;
	proton_plus_widgets_games_launch_options_editor_launch_options_list_add (launch_option_handlers, (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp46_);
	_tmp47_ = self->priv->_dll_overrides_pair_editor;
	_tmp48_ = self->priv->_dll_overrides_pair_editor;
	proton_plus_widgets_games_launch_options_editor_groups_base_options_group_register_option ((ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsBaseOptionsGroup*) self, "dll-overrides", (GtkWidget*) _tmp47_, (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp48_);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup*
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_new (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* launch_option_handlers,
                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* presentation_registry)
{
	return proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_TYPE_PROTON_OPTIONS_GROUP, launch_option_handlers, presentation_registry);
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile*
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_proton_priority_high_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_proton_priority_high_tile;
	result = _tmp0_;
	return result;
}

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

static void
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_priority_high_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                           ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_proton_priority_high_tile);
	self->priv->_proton_priority_high_tile = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile*
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_proton_use_wow64_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_proton_use_wow64_tile;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_use_wow64_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                       ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_proton_use_wow64_tile);
	self->priv->_proton_use_wow64_tile = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile*
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_proton_force_large_address_aware_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_proton_force_large_address_aware_tile;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_force_large_address_aware_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                                       ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_proton_force_large_address_aware_tile);
	self->priv->_proton_force_large_address_aware_tile = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile*
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_proton_logs_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_proton_logs_tile;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_logs_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_proton_logs_tile);
	self->priv->_proton_logs_tile = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile*
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_proton_optiscaler_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_proton_optiscaler_tile;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_optiscaler_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                        ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_proton_optiscaler_tile);
	self->priv->_proton_optiscaler_tile = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile*
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_proton_discord_bridge_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_proton_discord_bridge_tile;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_discord_bridge_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                            ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_proton_discord_bridge_tile);
	self->priv->_proton_discord_bridge_tile = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile*
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_proton_use_d7vk_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_proton_use_d7vk_tile;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_proton_use_d7vk_tile (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                      ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionTile* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_proton_use_d7vk_tile);
	self->priv->_proton_use_d7vk_tile = _tmp0_;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides*
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_dll_overrides_pair_editor (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_dll_overrides_pair_editor;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_dll_overrides_pair_editor (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup* self,
                                                                                                           ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_dll_overrides_pair_editor);
	self->priv->_dll_overrides_pair_editor = _tmp0_;
}

static void
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroupClass * klass,
                                                                                        gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_finalize;
}

static void
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup * self,
                                                                                           gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_TYPE_PROTON_OPTIONS_GROUP, ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup);
	_g_object_unref0 (self->priv->_proton_priority_high_tile);
	_g_object_unref0 (self->priv->_proton_use_wow64_tile);
	_g_object_unref0 (self->priv->_proton_force_large_address_aware_tile);
	_g_object_unref0 (self->priv->_proton_logs_tile);
	_g_object_unref0 (self->priv->_proton_optiscaler_tile);
	_g_object_unref0 (self->priv->_proton_discord_bridge_tile);
	_g_object_unref0 (self->priv->_proton_use_d7vk_tile);
	_g_object_unref0 (self->priv->_dll_overrides_pair_editor);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_type_id;
	proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_type_id = g_type_register_static (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_TYPE_BASE_OPTIONS_GROUP, "ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroupPrivate));
	return proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_type_id;
		proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_type_id = proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_type_id__once, proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_get_property (GObject * object,
                                                                                                guint property_id,
                                                                                                GValue * value,
                                                                                                GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_TYPE_PROTON_OPTIONS_GROUP, ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_groups_proton_options_group_set_property (GObject * object,
                                                                                                guint property_id,
                                                                                                const GValue * value,
                                                                                                GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_GROUPS_TYPE_PROTON_OPTIONS_GROUP, ProtonPlusWidgetsGamesLaunchOptionsEditorGroupsProtonOptionsGroup);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

