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

#include "protonplus_core.h"
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>

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

enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_DLL_OVERRIDES_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_DLL_OVERRIDES_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_DLL_OVERRIDES_NUM_PROPERTIES];
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

static gpointer proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_parent_class = NULL;

static void _g_free0_ (gpointer var);
static GType proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_get_type_once (void);
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 void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides*
proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_construct (GType object_type)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides * self = NULL;
	gchar** default_dlls = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar** _tmp24_;
	gint default_dlls_length1;
	gint _default_dlls_size_;
	gchar** dll_display = NULL;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar** _tmp30_;
	gint dll_display_length1;
	gint _dll_display_size_;
	gchar** dll_values = NULL;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar** _tmp36_;
	gint dll_values_length1;
	gint _dll_values_size_;
	GHashTable* tooltips = NULL;
	GHashFunc _tmp37_;
	GEqualFunc _tmp38_;
	GHashTable* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	gchar* _tmp44_;
	gchar* _tmp45_;
	gchar* _tmp46_;
	gchar* _tmp47_;
	gchar* _tmp48_;
	gchar* _tmp49_;
	gchar* _tmp50_;
	gchar* _tmp51_;
	gchar* _tmp52_;
	gchar* _tmp53_;
	gchar* _tmp54_;
	gchar* _tmp55_;
	gchar* _tmp56_;
	gchar* _tmp57_;
	gchar* _tmp58_;
	gchar* _tmp59_;
	gchar* _tmp60_;
	gchar* _tmp61_;
	gchar* _tmp62_;
	gchar* _tmp63_;
	gchar* _tmp64_;
	gchar* _tmp65_;
	gchar* _tmp66_;
	gchar* _tmp67_;
	gchar* _tmp68_;
	gchar* _tmp69_;
	gchar* _tmp70_;
	gchar* _tmp71_;
	gchar* _tmp72_;
	gchar* _tmp73_;
	gchar* _tmp74_;
	gchar* _tmp75_;
	gchar* _tmp76_;
	gchar* _tmp77_;
	gchar* _tmp78_;
	gchar* _tmp79_;
	gchar* _tmp80_;
	gchar* _tmp81_;
	gchar* _tmp82_;
	gchar* _tmp83_;
	gchar* _tmp84_;
	gchar* _tmp85_;
	gchar* _tmp86_;
	gchar* _tmp87_;
	_tmp0_ = g_strdup ("mscoree");
	_tmp1_ = g_strdup ("d3d9");
	_tmp2_ = g_strdup ("d3d10");
	_tmp3_ = g_strdup ("d3d11");
	_tmp4_ = g_strdup ("d3d12");
	_tmp5_ = g_strdup ("wined3d");
	_tmp6_ = g_strdup ("d3d9ongl");
	_tmp7_ = g_strdup ("d3dcompiler_47");
	_tmp8_ = g_strdup ("dxgi");
	_tmp9_ = g_strdup ("dsound");
	_tmp10_ = g_strdup ("ddraw");
	_tmp11_ = g_strdup ("mshtml");
	_tmp12_ = g_strdup ("xaudio2_7");
	_tmp13_ = g_strdup ("xaudio2_9");
	_tmp14_ = g_strdup ("openal32");
	_tmp15_ = g_strdup ("dinput8");
	_tmp16_ = g_strdup ("winhttp");
	_tmp17_ = g_strdup ("urlmon");
	_tmp18_ = g_strdup ("wininet");
	_tmp19_ = g_strdup ("binkw32");
	_tmp20_ = g_strdup ("bink2w64");
	_tmp21_ = g_strdup ("gdi32");
	_tmp22_ = g_strdup ("usp10");
	_tmp23_ = g_strdup ("comctl32");
	_tmp24_ = g_new0 (gchar*, 24 + 1);
	_tmp24_[0] = _tmp0_;
	_tmp24_[1] = _tmp1_;
	_tmp24_[2] = _tmp2_;
	_tmp24_[3] = _tmp3_;
	_tmp24_[4] = _tmp4_;
	_tmp24_[5] = _tmp5_;
	_tmp24_[6] = _tmp6_;
	_tmp24_[7] = _tmp7_;
	_tmp24_[8] = _tmp8_;
	_tmp24_[9] = _tmp9_;
	_tmp24_[10] = _tmp10_;
	_tmp24_[11] = _tmp11_;
	_tmp24_[12] = _tmp12_;
	_tmp24_[13] = _tmp13_;
	_tmp24_[14] = _tmp14_;
	_tmp24_[15] = _tmp15_;
	_tmp24_[16] = _tmp16_;
	_tmp24_[17] = _tmp17_;
	_tmp24_[18] = _tmp18_;
	_tmp24_[19] = _tmp19_;
	_tmp24_[20] = _tmp20_;
	_tmp24_[21] = _tmp21_;
	_tmp24_[22] = _tmp22_;
	_tmp24_[23] = _tmp23_;
	default_dlls = _tmp24_;
	default_dlls_length1 = 24;
	_default_dlls_size_ = default_dlls_length1;
	_tmp25_ = g_strdup (_ ("Disabled"));
	_tmp26_ = g_strdup ("Native (n)");
	_tmp27_ = g_strdup ("Builtin (b)");
	_tmp28_ = g_strdup ("Native, Builtin (n,b)");
	_tmp29_ = g_strdup ("Builtin, Native (b,n)");
	_tmp30_ = g_new0 (gchar*, 5 + 1);
	_tmp30_[0] = _tmp25_;
	_tmp30_[1] = _tmp26_;
	_tmp30_[2] = _tmp27_;
	_tmp30_[3] = _tmp28_;
	_tmp30_[4] = _tmp29_;
	dll_display = _tmp30_;
	dll_display_length1 = 5;
	_dll_display_size_ = dll_display_length1;
	_tmp31_ = g_strdup ("");
	_tmp32_ = g_strdup ("n");
	_tmp33_ = g_strdup ("b");
	_tmp34_ = g_strdup ("n,b");
	_tmp35_ = g_strdup ("b,n");
	_tmp36_ = g_new0 (gchar*, 5 + 1);
	_tmp36_[0] = _tmp31_;
	_tmp36_[1] = _tmp32_;
	_tmp36_[2] = _tmp33_;
	_tmp36_[3] = _tmp34_;
	_tmp36_[4] = _tmp35_;
	dll_values = _tmp36_;
	dll_values_length1 = 5;
	_dll_values_size_ = dll_values_length1;
	_tmp37_ = g_str_hash;
	_tmp38_ = g_str_equal;
	_tmp39_ = g_hash_table_new_full (_tmp37_, _tmp38_, _g_free0_, _g_free0_);
	tooltips = _tmp39_;
	_tmp40_ = g_strdup ("mscoree");
	_tmp41_ = g_strdup (_ (".NET Framework runtime execution engine"));
	g_hash_table_insert (tooltips, _tmp40_, _tmp41_);
	_tmp42_ = g_strdup ("d3d9");
	_tmp43_ = g_strdup (_ ("Direct3D 9 graphics API (often overridden for mods/wrappers)"));
	g_hash_table_insert (tooltips, _tmp42_, _tmp43_);
	_tmp44_ = g_strdup ("d3d10");
	_tmp45_ = g_strdup (_ ("Direct3D 10 graphics API library"));
	g_hash_table_insert (tooltips, _tmp44_, _tmp45_);
	_tmp46_ = g_strdup ("d3d11");
	_tmp47_ = g_strdup (_ ("Direct3D 11 graphics API library (DXVK)"));
	g_hash_table_insert (tooltips, _tmp46_, _tmp47_);
	_tmp48_ = g_strdup ("d3d12");
	_tmp49_ = g_strdup (_ ("Direct3D 12 graphics API layer (VKD3D)"));
	g_hash_table_insert (tooltips, _tmp48_, _tmp49_);
	_tmp50_ = g_strdup ("wined3d");
	_tmp51_ = g_strdup (_ ("Wine's internal OpenGL-based DirectX translator"));
	g_hash_table_insert (tooltips, _tmp50_, _tmp51_);
	_tmp52_ = g_strdup ("d3d9ongl");
	_tmp53_ = g_strdup (_ ("Special D3D9 to OpenGL translation wrapper"));
	g_hash_table_insert (tooltips, _tmp52_, _tmp53_);
	_tmp54_ = g_strdup ("d3dcompiler_47");
	_tmp55_ = g_strdup (_ ("Microsoft HLSL Shader Compiler (fixes shader crashes)"));
	g_hash_table_insert (tooltips, _tmp54_, _tmp55_);
	_tmp56_ = g_strdup ("dxgi");
	_tmp57_ = g_strdup (_ ("DirectX Graphics Infrastructure (required for ReShade/SpecialK)"));
	g_hash_table_insert (tooltips, _tmp56_, _tmp57_);
	_tmp58_ = g_strdup ("dsound");
	_tmp59_ = g_strdup (_ ("DirectSound library (fixes audio mixing and 3D sound)"));
	g_hash_table_insert (tooltips, _tmp58_, _tmp59_);
	_tmp60_ = g_strdup ("ddraw");
	_tmp61_ = g_strdup (_ ("DirectDraw (critical for older 2D/3D games and patches)"));
	g_hash_table_insert (tooltips, _tmp60_, _tmp61_);
	_tmp62_ = g_strdup ("mshtml");
	_tmp63_ = g_strdup (_ ("MSHTML web rendering engine for built-in game launchers"));
	g_hash_table_insert (tooltips, _tmp62_, _tmp63_);
	_tmp64_ = g_strdup ("xaudio2_7");
	_tmp65_ = g_strdup (_ ("XAudio 2.7 audio library (fixes crackling or missing sound)"));
	g_hash_table_insert (tooltips, _tmp64_, _tmp65_);
	_tmp66_ = g_strdup ("xaudio2_9");
	_tmp67_ = g_strdup (_ ("XAudio 2.9 audio library for modern Windows 10/11 games"));
	g_hash_table_insert (tooltips, _tmp66_, _tmp67_);
	_tmp68_ = g_strdup ("openal32");
	_tmp69_ = g_strdup (_ ("OpenAL 3D Audio library (enables hardware sound acceleration)"));
	g_hash_table_insert (tooltips, _tmp68_, _tmp69_);
	_tmp70_ = g_strdup ("dinput8");
	_tmp71_ = g_strdup (_ ("DirectInput 8 (commonly used to inject scripts/ASI mod loaders)"));
	g_hash_table_insert (tooltips, _tmp70_, _tmp71_);
	_tmp72_ = g_strdup ("winhttp");
	_tmp73_ = g_strdup (_ ("Windows Internet HTTP API (fixes network connectivity in launchers)"));
	g_hash_table_insert (tooltips, _tmp72_, _tmp73_);
	_tmp74_ = g_strdup ("urlmon");
	_tmp75_ = g_strdup (_ ("OLE Monkers library for URL handling and launcher updates"));
	g_hash_table_insert (tooltips, _tmp74_, _tmp75_);
	_tmp76_ = g_strdup ("wininet");
	_tmp77_ = g_strdup (_ ("Windows Internet API layer (fixes online features in game launchers)"));
	g_hash_table_insert (tooltips, _tmp76_, _tmp77_);
	_tmp78_ = g_strdup ("binkw32");
	_tmp79_ = g_strdup (_ ("Bink Video 32-bit decoder (fixes intro movie crashes)"));
	g_hash_table_insert (tooltips, _tmp78_, _tmp79_);
	_tmp80_ = g_strdup ("bink2w64");
	_tmp81_ = g_strdup (_ ("Bink Video 64-bit decoder (fixes intro movie crashes in modern games)"));
	g_hash_table_insert (tooltips, _tmp80_, _tmp81_);
	_tmp82_ = g_strdup ("gdi32");
	_tmp83_ = g_strdup (_ ("Graphics Device Interface (helps with custom fonts and rendering)"));
	g_hash_table_insert (tooltips, _tmp82_, _tmp83_);
	_tmp84_ = g_strdup ("usp10");
	_tmp85_ = g_strdup (_ ("Uniscribe Script Processor (fixes Asian text / custom localization ren" \
"dering)"));
	g_hash_table_insert (tooltips, _tmp84_, _tmp85_);
	_tmp86_ = g_strdup ("comctl32");
	_tmp87_ = g_strdup (_ ("Common Controls Library (needed for custom game launchers)"));
	g_hash_table_insert (tooltips, _tmp86_, _tmp87_);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides*) proton_plus_widgets_games_launch_options_editor_launch_option_custom_pairs_construct (object_type, _ ("Wine DLL Overrides"), _ ("Manage library overrides (builtin/native)"), _ ("Enable DLL Overrides"), _ ("Bypass or prefer specific Windows DLLs"), default_dlls, (gint) default_dlls_length1, dll_display, (gint) dll_display_length1, dll_values, (gint) dll_values_length1, tooltips, ";", "DLL_OVERRIDES");
	_g_hash_table_unref0 (tooltips);
	dll_values = (_vala_array_free (dll_values, dll_values_length1, (GDestroyNotify) g_free), NULL);
	dll_display = (_vala_array_free (dll_display, dll_display_length1, (GDestroyNotify) g_free), NULL);
	default_dlls = (_vala_array_free (default_dlls, default_dlls_length1, (GDestroyNotify) g_free), NULL);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides*
proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_new (void)
{
	return proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_DLL_OVERRIDES);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverridesClass * klass,
                                                                                        gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_parent_class = g_type_class_peek_parent (klass);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides * self,
                                                                                           gpointer klass)
{
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverridesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_type_id = g_type_register_static (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_CUSTOM_PAIRS, "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionDllOverrides", &g_define_type_info, 0);
	return proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_type_id = proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_option_dll_overrides_type_id__once;
}

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

