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

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>
#include "protonplus_core.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_PREVIEW_FIELD (proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_get_type ())
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PREVIEW_FIELD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PREVIEW_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PREVIEW_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PREVIEW_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewFieldClass))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_LAUNCH_OPTION_PREVIEW_FIELD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PREVIEW_FIELD))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_LAUNCH_OPTION_PREVIEW_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PREVIEW_FIELD))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PREVIEW_FIELD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PREVIEW_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewFieldClass))

typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField;
typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewFieldClass ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewFieldClass;
typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewFieldPrivate ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewFieldPrivate;
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PREVIEW_FIELD_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PREVIEW_FIELD_PREVIEW_LABEL_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PREVIEW_FIELD_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PREVIEW_FIELD_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField {
	AdwExpanderRow parent_instance;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewFieldPrivate * priv;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewFieldClass {
	AdwExpanderRowClass parent_class;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewFieldPrivate {
	GtkLabel* _preview_label;
	GtkScrolledWindow* preview_scrolled_window;
	gboolean attention_required;
};

static gint ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_parent_class = NULL;

VALA_EXTERN GType proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField* proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_new (const gchar* title);
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField* proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_construct (GType object_type,
                                                                                                                                                          const gchar* title);
static void proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_set_preview_label (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField* self,
                                                                                                    GtkLabel* value);
VALA_EXTERN GtkLabel* proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_get_preview_label (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField* self);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_set_empty (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField* self,
                                                                                            gboolean empty);
VALA_EXTERN void proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_set_attention_required (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField* self,
                                                                                                         gboolean required,
                                                                                                         const gchar* reason);
static void proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_get_property (GObject * object,
                                                                                                     guint property_id,
                                                                                                     GValue * value,
                                                                                                     GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_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_launch_option_preview_field_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField_private_offset);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField*
proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_construct (GType object_type,
                                                                                       const gchar* title)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	GtkLabel* _tmp5_;
	GtkLabel* _tmp6_;
	GtkLabel* _tmp7_;
	GtkLabel* _tmp8_;
	GtkLabel* _tmp9_;
	GtkLabel* _tmp10_;
	GtkLabel* _tmp11_;
	GtkLabel* _tmp12_;
	GtkLabel* _tmp13_;
	GtkScrolledWindow* _tmp14_;
	GtkScrolledWindow* _tmp15_;
	GtkScrolledWindow* _tmp16_;
	GtkScrolledWindow* _tmp17_;
	GtkLabel* _tmp18_;
	GtkScrolledWindow* _tmp19_;
	GtkScrolledWindow* _tmp20_;
	GtkScrolledWindow* _tmp21_;
	g_return_val_if_fail (title != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField*) g_object_new (object_type, "title", title, "subtitle", _ ("Show the exact command that will be saved to Steam."), "expanded", FALSE, NULL);
	gtk_widget_add_css_class ((GtkWidget*) self, "launch-options-preview");
	_tmp0_ = adw_expander_row_get_subtitle ((AdwExpanderRow*) self);
	_tmp1_ = _tmp0_;
	gtk_widget_set_tooltip_text ((GtkWidget*) self, _tmp1_);
	_tmp2_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp2_);
	_tmp3_ = _tmp2_;
	proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_set_preview_label (self, _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = self->priv->_preview_label;
	gtk_label_set_xalign (_tmp4_, (gfloat) 0);
	_tmp5_ = self->priv->_preview_label;
	gtk_label_set_yalign (_tmp5_, (gfloat) 0);
	_tmp6_ = self->priv->_preview_label;
	gtk_label_set_use_markup (_tmp6_, TRUE);
	_tmp7_ = self->priv->_preview_label;
	gtk_label_set_selectable (_tmp7_, TRUE);
	_tmp8_ = self->priv->_preview_label;
	gtk_widget_set_focusable ((GtkWidget*) _tmp8_, FALSE);
	_tmp9_ = self->priv->_preview_label;
	gtk_label_set_wrap (_tmp9_, TRUE);
	_tmp10_ = self->priv->_preview_label;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp10_, 12);
	_tmp11_ = self->priv->_preview_label;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp11_, 12);
	_tmp12_ = self->priv->_preview_label;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp12_, 12);
	_tmp13_ = self->priv->_preview_label;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp13_, 12);
	_tmp14_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	g_object_ref_sink (_tmp14_);
	_g_object_unref0 (self->priv->preview_scrolled_window);
	self->priv->preview_scrolled_window = _tmp14_;
	_tmp15_ = self->priv->preview_scrolled_window;
	gtk_scrolled_window_set_policy (_tmp15_, GTK_POLICY_NEVER, GTK_POLICY_NEVER);
	_tmp16_ = self->priv->preview_scrolled_window;
	gtk_scrolled_window_set_propagate_natural_height (_tmp16_, TRUE);
	_tmp17_ = self->priv->preview_scrolled_window;
	_tmp18_ = self->priv->_preview_label;
	gtk_scrolled_window_set_child (_tmp17_, (GtkWidget*) _tmp18_);
	_tmp19_ = self->priv->preview_scrolled_window;
	gtk_widget_add_css_class ((GtkWidget*) _tmp19_, "launch-options-preview-surface");
	_tmp20_ = self->priv->preview_scrolled_window;
	gtk_widget_set_overflow ((GtkWidget*) _tmp20_, GTK_OVERFLOW_HIDDEN);
	_tmp21_ = self->priv->preview_scrolled_window;
	adw_expander_row_add_row ((AdwExpanderRow*) self, (GtkWidget*) _tmp21_);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField*
proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_new (const gchar* title)
{
	return proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PREVIEW_FIELD, title);
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_set_empty (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField* self,
                                                                                       gboolean empty)
{
	GtkAlign _tmp0_ = 0;
	GtkLabel* _tmp1_;
	gfloat _tmp2_ = 0.0F;
	GtkLabel* _tmp3_;
	g_return_if_fail (self != NULL);
	if (empty) {
		_tmp0_ = GTK_ALIGN_CENTER;
	} else {
		_tmp0_ = GTK_ALIGN_FILL;
	}
	_tmp1_ = self->priv->_preview_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, _tmp0_);
	if (empty) {
		_tmp2_ = 0.5f;
	} else {
		_tmp2_ = (gfloat) 0;
	}
	_tmp3_ = self->priv->_preview_label;
	gtk_label_set_xalign (_tmp3_, _tmp2_);
	if (empty) {
		GtkLabel* _tmp4_;
		GtkLabel* _tmp5_;
		_tmp4_ = self->priv->_preview_label;
		gtk_widget_add_css_class ((GtkWidget*) _tmp4_, "dim-label");
		_tmp5_ = self->priv->_preview_label;
		gtk_widget_add_css_class ((GtkWidget*) _tmp5_, "launch-options-preview-empty");
	} else {
		GtkLabel* _tmp6_;
		GtkLabel* _tmp7_;
		_tmp6_ = self->priv->_preview_label;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp6_, "dim-label");
		_tmp7_ = self->priv->_preview_label;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp7_, "launch-options-preview-empty");
	}
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_set_attention_required (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField* self,
                                                                                                    gboolean required,
                                                                                                    const gchar* reason)
{
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (reason != NULL);
	if (required) {
		_tmp0_ = !self->priv->attention_required;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		adw_expander_row_set_expanded ((AdwExpanderRow*) self, TRUE);
	}
	self->priv->attention_required = required;
	if (required) {
		const gchar* _tmp2_ = NULL;
		if (g_strcmp0 (reason, "") != 0) {
			_tmp2_ = reason;
		} else {
			_tmp2_ = _ ("Raw or unrecognized content needs attention before saving.");
		}
		_tmp1_ = _tmp2_;
	} else {
		_tmp1_ = _ ("Show the exact command that will be saved to Steam.");
	}
	adw_expander_row_set_subtitle ((AdwExpanderRow*) self, _tmp1_);
	_tmp3_ = adw_expander_row_get_subtitle ((AdwExpanderRow*) self);
	_tmp4_ = _tmp3_;
	gtk_widget_set_tooltip_text ((GtkWidget*) self, _tmp4_);
}

GtkLabel*
proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_get_preview_label (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField* self)
{
	GtkLabel* result;
	GtkLabel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_preview_label;
	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_launch_option_preview_field_set_preview_label (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField* self,
                                                                                               GtkLabel* value)
{
	GtkLabel* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_get_preview_label (self);
	if (old_value != value) {
		GtkLabel* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_preview_label);
		self->priv->_preview_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PREVIEW_FIELD_PREVIEW_LABEL_PROPERTY]);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewFieldClass * klass,
                                                                                        gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PREVIEW_FIELD_PREVIEW_LABEL_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PREVIEW_FIELD_PREVIEW_LABEL_PROPERTY] = g_param_spec_object ("preview-label", "preview-label", "preview-label", gtk_label_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField * self,
                                                                                           gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PREVIEW_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField);
	_g_object_unref0 (self->priv->_preview_label);
	_g_object_unref0 (self->priv->preview_scrolled_window);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewFieldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_type_id = g_type_register_static (adw_expander_row_get_type (), "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewFieldPrivate));
	return proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_type_id = proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_get_property (GObject * object,
                                                                                                guint property_id,
                                                                                                GValue * value,
                                                                                                GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PREVIEW_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PREVIEW_FIELD_PREVIEW_LABEL_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_get_preview_label (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_set_property (GObject * object,
                                                                                                guint property_id,
                                                                                                const GValue * value,
                                                                                                GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PREVIEW_FIELD, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPreviewField);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PREVIEW_FIELD_PREVIEW_LABEL_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_preview_field_set_preview_label (self, g_value_get_object (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;
}

