/* launch-options-editor-vkd3d-log-level.c generated by valac 0.56.19, the Vala compiler
 * generated from launch-options-editor-vkd3d-log-level.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_VK_D3_DLOG_LEVEL_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_VK_D3_DLOG_LEVEL_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_VK_D3_DLOG_LEVEL_NUM_PROPERTIES];

static gpointer proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_parent_class = NULL;

static GType proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_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);

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionVKD3DLogLevel*
proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_construct (GType object_type)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionVKD3DLogLevel * self = NULL;
	gchar** display_opts = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar** _tmp7_;
	gint display_opts_length1;
	gint _display_opts_size_;
	gchar** value_opts = NULL;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar** _tmp15_;
	gint value_opts_length1;
	gint _value_opts_size_;
	_tmp0_ = g_strdup (_ ("System Default"));
	_tmp1_ = g_strdup ("None (Mute logs)");
	_tmp2_ = g_strdup ("Error (Critical only)");
	_tmp3_ = g_strdup ("Warning (Errors & Warns)");
	_tmp4_ = g_strdup ("Fixme (Missing features)");
	_tmp5_ = g_strdup ("Info (General details)");
	_tmp6_ = g_strdup ("Trace (Verbose/Debug)");
	_tmp7_ = g_new0 (gchar*, 7 + 1);
	_tmp7_[0] = _tmp0_;
	_tmp7_[1] = _tmp1_;
	_tmp7_[2] = _tmp2_;
	_tmp7_[3] = _tmp3_;
	_tmp7_[4] = _tmp4_;
	_tmp7_[5] = _tmp5_;
	_tmp7_[6] = _tmp6_;
	display_opts = _tmp7_;
	display_opts_length1 = 7;
	_display_opts_size_ = display_opts_length1;
	_tmp8_ = g_strdup ("");
	_tmp9_ = g_strdup ("none");
	_tmp10_ = g_strdup ("err");
	_tmp11_ = g_strdup ("warn");
	_tmp12_ = g_strdup ("fixme");
	_tmp13_ = g_strdup ("info");
	_tmp14_ = g_strdup ("trace");
	_tmp15_ = g_new0 (gchar*, 7 + 1);
	_tmp15_[0] = _tmp8_;
	_tmp15_[1] = _tmp9_;
	_tmp15_[2] = _tmp10_;
	_tmp15_[3] = _tmp11_;
	_tmp15_[4] = _tmp12_;
	_tmp15_[5] = _tmp13_;
	_tmp15_[6] = _tmp14_;
	value_opts = _tmp15_;
	value_opts_length1 = 7;
	_value_opts_size_ = value_opts_length1;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionVKD3DLogLevel*) proton_plus_widgets_games_launch_options_editor_launch_option_env_combo_construct (object_type, "VKD3D_LOG_LEVEL", _ ("VKD3D Logging Level"), _ ("Adjust how much debugging information VKD3D prints to the terminal."), display_opts, (gint) display_opts_length1, value_opts, (gint) value_opts_length1);
	value_opts = (_vala_array_free (value_opts, value_opts_length1, (GDestroyNotify) g_free), NULL);
	display_opts = (_vala_array_free (display_opts, display_opts_length1, (GDestroyNotify) g_free), NULL);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionVKD3DLogLevel*
proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_new (void)
{
	return proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_VK_D3_DLOG_LEVEL);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionVKD3DLogLevelClass * klass,
                                                                                           gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_parent_class = g_type_class_peek_parent (klass);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionVKD3DLogLevel * self,
                                                                                              gpointer klass)
{
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionVKD3DLogLevelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionVKD3DLogLevel), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_type_id = g_type_register_static (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ENV_COMBO, "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionVKD3DLogLevel", &g_define_type_info, 0);
	return proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_type_id = proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_option_vk_d3_dlog_level_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;
}

