/* mangohud-visual-page.c generated by valac 0.56.19, the Vala compiler
 * generated from mangohud-visual-page.vala, do not modify */

#include "protonplus_core.h"
#include <adwaita.h>
#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>
#include <gdk/gdk.h>
#include <float.h>
#include <math.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_MANGO_HUD_VISUAL_PAGE_0_PROPERTY,
	PROTON_PLUS_WIDGETS_MANGO_HUD_VISUAL_PAGE_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_mango_hud_visual_page_properties[PROTON_PLUS_WIDGETS_MANGO_HUD_VISUAL_PAGE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

struct _ProtonPlusWidgetsMangoHudVisualPagePrivate {
	AdwEntryRow* hud_title_row;
	AdwComboRow* orientation_row;
	AdwComboRow* border_row;
	GtkColorDialogButton* bg_color_btn;
	GtkColorDialogButton* font_color_btn;
	AdwEntryRow* font_size_row;
	AdwComboRow* position_row;
	AdwComboRow* columns_row;
	AdwComboRow* toggle_hud_row;
	AdwSwitchRow* compact_row;
	AdwSwitchRow* no_display_row;
};

static gint ProtonPlusWidgetsMangoHudVisualPage_private_offset;
static gpointer proton_plus_widgets_mango_hud_visual_page_parent_class = NULL;

static void __lambda241_ (ProtonPlusWidgetsMangoHudVisualPage* self,
                   const gchar* val);
static void ___lambda241__proton_plus_widgets_mango_hud_page_set_value_func_str (const gchar* val,
                                                                          gpointer self);
static void __lambda242_ (ProtonPlusWidgetsMangoHudVisualPage* self,
                   gint val);
static void ___lambda242__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                          gpointer self);
static void __lambda243_ (ProtonPlusWidgetsMangoHudVisualPage* self,
                   gint val);
static void ___lambda243__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                          gpointer self);
static void __lambda244_ (ProtonPlusWidgetsMangoHudVisualPage* self);
static void ___lambda244__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void __lambda245_ (ProtonPlusWidgetsMangoHudVisualPage* self,
                   const gchar* val);
static void ___lambda245__proton_plus_widgets_mango_hud_page_set_value_func_str (const gchar* val,
                                                                          gpointer self);
static void __lambda246_ (ProtonPlusWidgetsMangoHudVisualPage* self,
                   const gchar* val);
static void ___lambda246__proton_plus_widgets_mango_hud_page_set_value_func_str (const gchar* val,
                                                                          gpointer self);
static void __lambda247_ (ProtonPlusWidgetsMangoHudVisualPage* self,
                   gint val);
static void ___lambda247__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                          gpointer self);
static void proton_plus_widgets_mango_hud_visual_page_refresh_position_row (ProtonPlusWidgetsMangoHudVisualPage* self);
static void __lambda248_ (ProtonPlusWidgetsMangoHudVisualPage* self,
                   gint val);
static void ___lambda248__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                          gpointer self);
static void __lambda249_ (ProtonPlusWidgetsMangoHudVisualPage* self,
                   gint val);
static void ___lambda249__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                          gpointer self);
static void proton_plus_widgets_mango_hud_visual_page_refresh_toggle_hud_row (ProtonPlusWidgetsMangoHudVisualPage* self);
static void __lambda250_ (ProtonPlusWidgetsMangoHudVisualPage* self,
                   gboolean val);
static void ___lambda250__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                      gpointer self);
static void __lambda251_ (ProtonPlusWidgetsMangoHudVisualPage* self,
                   gboolean val);
static void ___lambda251__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                      gpointer self);
static void proton_plus_widgets_mango_hud_visual_page_real_refresh (ProtonPlusWidgetsMangoHudPage* base);
static void proton_plus_widgets_mango_hud_visual_page_finalize (GObject * obj);
static GType proton_plus_widgets_mango_hud_visual_page_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 inline gpointer
proton_plus_widgets_mango_hud_visual_page_get_instance_private (ProtonPlusWidgetsMangoHudVisualPage* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsMangoHudVisualPage_private_offset);
}

static void
__lambda241_ (ProtonPlusWidgetsMangoHudVisualPage* self,
              const gchar* val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	g_return_if_fail (val != NULL);
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_hud_title (_tmp1_, val);
}

static void
___lambda241__proton_plus_widgets_mango_hud_page_set_value_func_str (const gchar* val,
                                                                     gpointer self)
{
	__lambda241_ ((ProtonPlusWidgetsMangoHudVisualPage*) self, val);
}

static void
__lambda242_ (ProtonPlusWidgetsMangoHudVisualPage* self,
              gint val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_horizontal (_tmp1_, val == 1);
}

static void
___lambda242__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                     gpointer self)
{
	__lambda242_ ((ProtonPlusWidgetsMangoHudVisualPage*) self, val);
}

static void
__lambda243_ (ProtonPlusWidgetsMangoHudVisualPage* self,
              gint val)
{
	gint _tmp0_ = 0;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	ProtonPlusUtilsMangoHudManager* _tmp2_;
	if (val == 1) {
		_tmp0_ = 10;
	} else {
		_tmp0_ = 0;
	}
	_tmp1_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp2_ = _tmp1_;
	proton_plus_utils_mango_hud_manager_set_round_corners (_tmp2_, _tmp0_);
}

static void
___lambda243__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                     gpointer self)
{
	__lambda243_ ((ProtonPlusWidgetsMangoHudVisualPage*) self, val);
}

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

static gfloat
float_parse (const gchar* str)
{
	gfloat result;
	g_return_val_if_fail (str != NULL, -1.0F);
	result = strtof (str, NULL);
	return result;
}

static void
__lambda244_ (ProtonPlusWidgetsMangoHudVisualPage* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GdkRGBA rgba = {0};
	GtkColorDialogButton* _tmp5_;
	GdkRGBA _tmp6_ = {0};
	ProtonPlusUtilsMangoHudManager* _tmp7_;
	ProtonPlusUtilsMangoHudManager* _tmp8_;
	GdkRGBA _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	ProtonPlusUtilsMangoHudManager* _tmp12_;
	ProtonPlusUtilsMangoHudManager* _tmp13_;
	GdkRGBA _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	_tmp1_ = proton_plus_widgets_mango_hud_page_get_is_updating ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusUtilsMangoHudManager* _tmp3_;
		ProtonPlusUtilsMangoHudManager* _tmp4_;
		_tmp3_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ == NULL;
	}
	if (_tmp0_) {
		return;
	}
	_tmp5_ = self->priv->bg_color_btn;
	g_object_get ((GObject*) _tmp5_, "rgba", &_tmp6_, NULL);
	rgba = _tmp6_;
	_tmp7_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp8_ = _tmp7_;
	_tmp9_ = rgba;
	_tmp10_ = proton_plus_widgets_mango_hud_page_rgba_to_hex ((ProtonPlusWidgetsMangoHudPage*) self, &_tmp9_);
	_tmp11_ = _tmp10_;
	proton_plus_utils_mango_hud_manager_set_background_color (_tmp8_, _tmp11_);
	_g_free0 (_tmp11_);
	_tmp12_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp13_ = _tmp12_;
	_tmp14_ = rgba;
	_tmp15_ = g_strdup_printf ("%.1f", (gdouble) _tmp14_.alpha);
	_tmp16_ = _tmp15_;
	proton_plus_utils_mango_hud_manager_set_background_alpha (_tmp13_, _tmp16_);
	_g_free0 (_tmp16_);
	g_signal_emit_by_name ((ProtonPlusWidgetsMangoHudPage*) self, "changed");
}

static void
___lambda244__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda244_ ((ProtonPlusWidgetsMangoHudVisualPage*) self);
}

static void
__lambda245_ (ProtonPlusWidgetsMangoHudVisualPage* self,
              const gchar* val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	g_return_if_fail (val != NULL);
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_text_color (_tmp1_, val);
}

static void
___lambda245__proton_plus_widgets_mango_hud_page_set_value_func_str (const gchar* val,
                                                                     gpointer self)
{
	__lambda245_ ((ProtonPlusWidgetsMangoHudVisualPage*) self, val);
}

static void
__lambda246_ (ProtonPlusWidgetsMangoHudVisualPage* self,
              const gchar* val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	g_return_if_fail (val != NULL);
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_font_size (_tmp1_, val);
}

static void
___lambda246__proton_plus_widgets_mango_hud_page_set_value_func_str (const gchar* val,
                                                                     gpointer self)
{
	__lambda246_ ((ProtonPlusWidgetsMangoHudVisualPage*) self, val);
}

static void
__lambda247_ (ProtonPlusWidgetsMangoHudVisualPage* self,
              gint val)
{
	switch (val) {
		case 0:
		{
			ProtonPlusUtilsMangoHudManager* _tmp0_;
			ProtonPlusUtilsMangoHudManager* _tmp1_;
			_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp1_ = _tmp0_;
			proton_plus_utils_mango_hud_manager_set_position (_tmp1_, "top-left");
			break;
		}
		case 1:
		{
			ProtonPlusUtilsMangoHudManager* _tmp2_;
			ProtonPlusUtilsMangoHudManager* _tmp3_;
			_tmp2_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp3_ = _tmp2_;
			proton_plus_utils_mango_hud_manager_set_position (_tmp3_, "top-right");
			break;
		}
		case 2:
		{
			ProtonPlusUtilsMangoHudManager* _tmp4_;
			ProtonPlusUtilsMangoHudManager* _tmp5_;
			_tmp4_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp5_ = _tmp4_;
			proton_plus_utils_mango_hud_manager_set_position (_tmp5_, "bottom-left");
			break;
		}
		case 3:
		{
			ProtonPlusUtilsMangoHudManager* _tmp6_;
			ProtonPlusUtilsMangoHudManager* _tmp7_;
			_tmp6_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp7_ = _tmp6_;
			proton_plus_utils_mango_hud_manager_set_position (_tmp7_, "bottom-right");
			break;
		}
		default:
		break;
	}
}

static void
___lambda247__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                     gpointer self)
{
	__lambda247_ ((ProtonPlusWidgetsMangoHudVisualPage*) self, val);
}

static void
__lambda248_ (ProtonPlusWidgetsMangoHudVisualPage* self,
              gint val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_table_columns (_tmp1_, val + 1);
}

static void
___lambda248__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                     gpointer self)
{
	__lambda248_ ((ProtonPlusWidgetsMangoHudVisualPage*) self, val);
}

static void
__lambda249_ (ProtonPlusWidgetsMangoHudVisualPage* self,
              gint val)
{
	switch (val) {
		case 0:
		{
			ProtonPlusUtilsMangoHudManager* _tmp0_;
			ProtonPlusUtilsMangoHudManager* _tmp1_;
			_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp1_ = _tmp0_;
			proton_plus_utils_mango_hud_manager_set_toggle_hud (_tmp1_, "Shift_R+F12");
			break;
		}
		case 1:
		{
			ProtonPlusUtilsMangoHudManager* _tmp2_;
			ProtonPlusUtilsMangoHudManager* _tmp3_;
			_tmp2_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp3_ = _tmp2_;
			proton_plus_utils_mango_hud_manager_set_toggle_hud (_tmp3_, "Shift_R+F1");
			break;
		}
		case 2:
		{
			ProtonPlusUtilsMangoHudManager* _tmp4_;
			ProtonPlusUtilsMangoHudManager* _tmp5_;
			_tmp4_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp5_ = _tmp4_;
			proton_plus_utils_mango_hud_manager_set_toggle_hud (_tmp5_, "Shift_R+F2");
			break;
		}
		case 3:
		{
			ProtonPlusUtilsMangoHudManager* _tmp6_;
			ProtonPlusUtilsMangoHudManager* _tmp7_;
			_tmp6_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp7_ = _tmp6_;
			proton_plus_utils_mango_hud_manager_set_toggle_hud (_tmp7_, "Shift_R+F3");
			break;
		}
		case 4:
		{
			ProtonPlusUtilsMangoHudManager* _tmp8_;
			ProtonPlusUtilsMangoHudManager* _tmp9_;
			_tmp8_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp9_ = _tmp8_;
			proton_plus_utils_mango_hud_manager_set_toggle_hud (_tmp9_, "Shift_R+F4");
			break;
		}
		case 5:
		{
			ProtonPlusUtilsMangoHudManager* _tmp10_;
			ProtonPlusUtilsMangoHudManager* _tmp11_;
			_tmp10_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
			_tmp11_ = _tmp10_;
			proton_plus_utils_mango_hud_manager_set_toggle_hud (_tmp11_, "");
			break;
		}
		default:
		break;
	}
}

static void
___lambda249__proton_plus_widgets_mango_hud_page_set_value_func_int (gint val,
                                                                     gpointer self)
{
	__lambda249_ ((ProtonPlusWidgetsMangoHudVisualPage*) self, val);
}

static void
__lambda250_ (ProtonPlusWidgetsMangoHudVisualPage* self,
              gboolean val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_compact (_tmp1_, val);
}

static void
___lambda250__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                 gpointer self)
{
	__lambda250_ ((ProtonPlusWidgetsMangoHudVisualPage*) self, val);
}

static void
__lambda251_ (ProtonPlusWidgetsMangoHudVisualPage* self,
              gboolean val)
{
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	proton_plus_utils_mango_hud_manager_set_no_display (_tmp1_, val);
}

static void
___lambda251__proton_plus_widgets_mango_hud_page_set_value_func (gboolean val,
                                                                 gpointer self)
{
	__lambda251_ ((ProtonPlusWidgetsMangoHudVisualPage*) self, val);
}

ProtonPlusWidgetsMangoHudVisualPage*
proton_plus_widgets_mango_hud_visual_page_construct (GType object_type,
                                                     ProtonPlusUtilsMangoHudManager* config)
{
	ProtonPlusWidgetsMangoHudVisualPage * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	AdwEntryRow* _tmp2_;
	AdwEntryRow* _tmp3_;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	gint _tmp6_ = 0;
	gboolean _tmp7_;
	gboolean _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar** _tmp11_;
	gchar** _tmp12_;
	gint _tmp12__length1;
	AdwComboRow* _tmp13_;
	gint _tmp14_ = 0;
	gint _tmp15_;
	gint _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar** _tmp19_;
	gchar** _tmp20_;
	gint _tmp20__length1;
	AdwComboRow* _tmp21_;
	GtkColorDialog* color_dialog = NULL;
	GtkColorDialog* _tmp22_;
	GtkColorDialog* color_dialog_alpha = NULL;
	GtkColorDialog* _tmp23_ = NULL;
	GtkColorDialog* _tmp24_;
	GtkColorDialog* _tmp25_;
	GtkColorDialogButton* _tmp26_;
	GtkColorDialogButton* _tmp27_;
	GdkRGBA bg_rgba = {0};
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	GdkRGBA _tmp30_ = {0};
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	GtkColorDialogButton* _tmp33_;
	GdkRGBA _tmp34_;
	AdwActionRow* bg_color_row = NULL;
	gchar* _tmp35_;
	AdwActionRow* _tmp36_ = NULL;
	AdwActionRow* _tmp37_;
	GtkImage* _tmp38_;
	GtkImage* _tmp39_;
	AdwActionRow* _tmp40_;
	GtkColorDialogButton* _tmp41_;
	GtkColorDialogButton* _tmp42_;
	GtkColorDialog* _tmp43_;
	const gchar* _tmp44_;
	const gchar* _tmp45_;
	GtkColorDialogButton* _tmp46_;
	const gchar* _tmp47_;
	const gchar* _tmp48_;
	AdwEntryRow* _tmp49_;
	AdwEntryRow* _tmp50_;
	GtkColorDialogButton* _tmp51_;
	gchar* _tmp52_;
	gchar* _tmp53_;
	gchar* _tmp54_;
	gchar* _tmp55_;
	gchar** _tmp56_;
	gchar** _tmp57_;
	gint _tmp57__length1;
	AdwComboRow* _tmp58_;
	gint _tmp59_ = 0;
	gint _tmp60_;
	gint _tmp61_;
	gchar* _tmp64_;
	gchar* _tmp65_;
	gchar* _tmp66_;
	gchar* _tmp67_;
	gchar* _tmp68_;
	gchar* _tmp69_;
	gchar** _tmp70_;
	gchar** _tmp71_;
	gint _tmp71__length1;
	AdwComboRow* _tmp72_;
	gchar* _tmp73_;
	gchar* _tmp74_;
	gchar* _tmp75_;
	gchar* _tmp76_;
	gchar* _tmp77_;
	gchar* _tmp78_;
	gchar** _tmp79_;
	gchar** _tmp80_;
	gint _tmp80__length1;
	AdwComboRow* _tmp81_;
	gboolean _tmp82_;
	gboolean _tmp83_;
	AdwSwitchRow* _tmp84_;
	gboolean _tmp85_;
	gboolean _tmp86_;
	AdwSwitchRow* _tmp87_;
	AdwComboRow* _tmp88_;
	GtkWidget* _tmp89_;
	AdwComboRow* _tmp90_;
	GtkWidget* _tmp91_;
	AdwActionRow* _tmp92_;
	GtkWidget* _tmp93_;
	AdwEntryRow* _tmp94_;
	GtkWidget* _tmp95_;
	AdwComboRow* _tmp96_;
	GtkWidget* _tmp97_;
	AdwComboRow* _tmp98_;
	GtkWidget* _tmp99_;
	AdwComboRow* _tmp100_;
	GtkWidget* _tmp101_;
	AdwSwitchRow* _tmp102_;
	GtkWidget* _tmp103_;
	AdwSwitchRow* _tmp104_;
	GtkWidget* _tmp105_;
	GtkWidget** _tmp106_;
	GtkWidget** _tmp107_;
	gint _tmp107__length1;
	GtkFlowBox* _tmp108_;
	GtkFlowBox* _tmp109_;
	g_return_val_if_fail (config != NULL, NULL);
	self = (ProtonPlusWidgetsMangoHudVisualPage*) proton_plus_widgets_mango_hud_page_construct (object_type, config);
	_tmp0_ = proton_plus_utils_mango_hud_manager_get_hud_title (config);
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_widgets_mango_hud_page_create_entry ((ProtonPlusWidgetsMangoHudPage*) self, _ ("HUD Title"), _tmp1_, ___lambda241__proton_plus_widgets_mango_hud_page_set_value_func_str, self, PROTON_PLUS_UTILS_TEXT_INPUT_FIELD_KIND_FREE_FORM);
	_g_object_unref0 (self->priv->hud_title_row);
	self->priv->hud_title_row = _tmp2_;
	_tmp3_ = self->priv->hud_title_row;
	_tmp4_ = proton_plus_widgets_mango_hud_page_create_row_card ((ProtonPlusWidgetsMangoHudPage*) self, (GtkListBoxRow*) _tmp3_);
	_tmp5_ = _tmp4_;
	proton_plus_widgets_mango_hud_page_add_group_to_page ((ProtonPlusWidgetsMangoHudPage*) self, (GtkBox*) self, NULL, _tmp5_, "heading");
	_g_object_unref0 (_tmp5_);
	_tmp7_ = proton_plus_utils_mango_hud_manager_get_horizontal (config);
	_tmp8_ = _tmp7_;
	if (_tmp8_) {
		_tmp6_ = 1;
	} else {
		_tmp6_ = 0;
	}
	_tmp9_ = g_strdup (_ ("Vertical"));
	_tmp10_ = g_strdup (_ ("Horizontal"));
	_tmp11_ = g_new0 (gchar*, 2 + 1);
	_tmp11_[0] = _tmp9_;
	_tmp11_[1] = _tmp10_;
	_tmp12_ = _tmp11_;
	_tmp12__length1 = 2;
	_tmp13_ = proton_plus_widgets_mango_hud_page_create_combo ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Orientation"), _tmp12_, (gint) 2, _tmp6_, "object-flip-horizontal-symbolic", ___lambda242__proton_plus_widgets_mango_hud_page_set_value_func_int, self);
	_g_object_unref0 (self->priv->orientation_row);
	self->priv->orientation_row = _tmp13_;
	_tmp12_ = (_vala_array_free (_tmp12_, _tmp12__length1, (GDestroyNotify) g_free), NULL);
	_tmp15_ = proton_plus_utils_mango_hud_manager_get_round_corners (config);
	_tmp16_ = _tmp15_;
	if (_tmp16_ > 0) {
		_tmp14_ = 1;
	} else {
		_tmp14_ = 0;
	}
	_tmp17_ = g_strdup (_ ("Squared"));
	_tmp18_ = g_strdup (_ ("Rounded"));
	_tmp19_ = g_new0 (gchar*, 2 + 1);
	_tmp19_[0] = _tmp17_;
	_tmp19_[1] = _tmp18_;
	_tmp20_ = _tmp19_;
	_tmp20__length1 = 2;
	_tmp21_ = proton_plus_widgets_mango_hud_page_create_combo ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Borders"), _tmp20_, (gint) 2, _tmp14_, "view-grid-symbolic", ___lambda243__proton_plus_widgets_mango_hud_page_set_value_func_int, self);
	_g_object_unref0 (self->priv->border_row);
	self->priv->border_row = _tmp21_;
	_tmp20_ = (_vala_array_free (_tmp20_, _tmp20__length1, (GDestroyNotify) g_free), NULL);
	_tmp22_ = gtk_color_dialog_new ();
	color_dialog = _tmp22_;
	_tmp23_ = gtk_color_dialog_new ();
	gtk_color_dialog_set_with_alpha (_tmp23_, TRUE);
	color_dialog_alpha = _tmp23_;
	_tmp24_ = color_dialog_alpha;
	_tmp25_ = _g_object_ref0 (_tmp24_);
	_tmp26_ = (GtkColorDialogButton*) gtk_color_dialog_button_new (_tmp25_);
	g_object_ref_sink (_tmp26_);
	_g_object_unref0 (self->priv->bg_color_btn);
	self->priv->bg_color_btn = _tmp26_;
	_tmp27_ = self->priv->bg_color_btn;
	gtk_widget_set_valign ((GtkWidget*) _tmp27_, GTK_ALIGN_CENTER);
	_tmp28_ = proton_plus_utils_mango_hud_manager_get_background_color (config);
	_tmp29_ = _tmp28_;
	proton_plus_widgets_mango_hud_page_hex_to_rgba ((ProtonPlusWidgetsMangoHudPage*) self, _tmp29_, "#ffffff", &_tmp30_);
	bg_rgba = _tmp30_;
	_tmp31_ = proton_plus_utils_mango_hud_manager_get_background_alpha (config);
	_tmp32_ = _tmp31_;
	bg_rgba.alpha = float_parse (_tmp32_);
	_tmp33_ = self->priv->bg_color_btn;
	_tmp34_ = bg_rgba;
	gtk_color_dialog_button_set_rgba (_tmp33_, &_tmp34_);
	_tmp35_ = g_strdup (_ ("Background Color"));
	_tmp36_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp36_, _tmp35_);
	_g_free0 (_tmp35_);
	g_object_ref_sink (_tmp36_);
	bg_color_row = _tmp36_;
	_tmp37_ = bg_color_row;
	_tmp38_ = (GtkImage*) gtk_image_new_from_icon_name ("fill-color-symbolic");
	g_object_ref_sink (_tmp38_);
	_tmp39_ = _tmp38_;
	adw_action_row_add_prefix (_tmp37_, (GtkWidget*) _tmp39_);
	_g_object_unref0 (_tmp39_);
	_tmp40_ = bg_color_row;
	_tmp41_ = self->priv->bg_color_btn;
	adw_action_row_add_suffix (_tmp40_, (GtkWidget*) _tmp41_);
	_tmp42_ = self->priv->bg_color_btn;
	g_signal_connect_object ((GObject*) _tmp42_, "notify::rgba", (GCallback) ___lambda244__g_object_notify, self, 0);
	_tmp43_ = color_dialog;
	_tmp44_ = proton_plus_utils_mango_hud_manager_get_text_color (config);
	_tmp45_ = _tmp44_;
	_tmp46_ = proton_plus_widgets_mango_hud_page_create_color_button ((ProtonPlusWidgetsMangoHudPage*) self, _tmp43_, _tmp45_, ___lambda245__proton_plus_widgets_mango_hud_page_set_value_func_str, self);
	_g_object_unref0 (self->priv->font_color_btn);
	self->priv->font_color_btn = _tmp46_;
	_tmp47_ = proton_plus_utils_mango_hud_manager_get_font_size (config);
	_tmp48_ = _tmp47_;
	_tmp49_ = proton_plus_widgets_mango_hud_page_create_entry ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Font Size"), _tmp48_, ___lambda246__proton_plus_widgets_mango_hud_page_set_value_func_str, self, PROTON_PLUS_UTILS_TEXT_INPUT_FIELD_KIND_NUMERIC);
	_g_object_unref0 (self->priv->font_size_row);
	self->priv->font_size_row = _tmp49_;
	_tmp50_ = self->priv->font_size_row;
	_tmp51_ = self->priv->font_color_btn;
	adw_entry_row_add_suffix (_tmp50_, (GtkWidget*) _tmp51_);
	_tmp52_ = g_strdup (_ ("Top Left"));
	_tmp53_ = g_strdup (_ ("Top Right"));
	_tmp54_ = g_strdup (_ ("Bottom Left"));
	_tmp55_ = g_strdup (_ ("Bottom Right"));
	_tmp56_ = g_new0 (gchar*, 4 + 1);
	_tmp56_[0] = _tmp52_;
	_tmp56_[1] = _tmp53_;
	_tmp56_[2] = _tmp54_;
	_tmp56_[3] = _tmp55_;
	_tmp57_ = _tmp56_;
	_tmp57__length1 = 4;
	_tmp58_ = proton_plus_widgets_mango_hud_page_create_combo ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Position"), _tmp57_, (gint) 4, 0, "view-fullscreen-symbolic", ___lambda247__proton_plus_widgets_mango_hud_page_set_value_func_int, self);
	_g_object_unref0 (self->priv->position_row);
	self->priv->position_row = _tmp58_;
	_tmp57_ = (_vala_array_free (_tmp57_, _tmp57__length1, (GDestroyNotify) g_free), NULL);
	proton_plus_widgets_mango_hud_visual_page_refresh_position_row (self);
	_tmp60_ = proton_plus_utils_mango_hud_manager_get_table_columns (config);
	_tmp61_ = _tmp60_;
	if (_tmp61_ > 0) {
		gint _tmp62_;
		gint _tmp63_;
		_tmp62_ = proton_plus_utils_mango_hud_manager_get_table_columns (config);
		_tmp63_ = _tmp62_;
		_tmp59_ = _tmp63_ - 1;
	} else {
		_tmp59_ = 0;
	}
	_tmp64_ = g_strdup ("1");
	_tmp65_ = g_strdup ("2");
	_tmp66_ = g_strdup ("3");
	_tmp67_ = g_strdup ("4");
	_tmp68_ = g_strdup ("5");
	_tmp69_ = g_strdup ("6");
	_tmp70_ = g_new0 (gchar*, 6 + 1);
	_tmp70_[0] = _tmp64_;
	_tmp70_[1] = _tmp65_;
	_tmp70_[2] = _tmp66_;
	_tmp70_[3] = _tmp67_;
	_tmp70_[4] = _tmp68_;
	_tmp70_[5] = _tmp69_;
	_tmp71_ = _tmp70_;
	_tmp71__length1 = 6;
	_tmp72_ = proton_plus_widgets_mango_hud_page_create_combo ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Columns"), _tmp71_, (gint) 6, _tmp59_, "view-column-symbolic", ___lambda248__proton_plus_widgets_mango_hud_page_set_value_func_int, self);
	_g_object_unref0 (self->priv->columns_row);
	self->priv->columns_row = _tmp72_;
	_tmp71_ = (_vala_array_free (_tmp71_, _tmp71__length1, (GDestroyNotify) g_free), NULL);
	_tmp73_ = g_strdup ("Shift_R+F12");
	_tmp74_ = g_strdup ("Shift_R+F1");
	_tmp75_ = g_strdup ("Shift_R+F2");
	_tmp76_ = g_strdup ("Shift_R+F3");
	_tmp77_ = g_strdup ("Shift_R+F4");
	_tmp78_ = g_strdup (_ ("None"));
	_tmp79_ = g_new0 (gchar*, 6 + 1);
	_tmp79_[0] = _tmp73_;
	_tmp79_[1] = _tmp74_;
	_tmp79_[2] = _tmp75_;
	_tmp79_[3] = _tmp76_;
	_tmp79_[4] = _tmp77_;
	_tmp79_[5] = _tmp78_;
	_tmp80_ = _tmp79_;
	_tmp80__length1 = 6;
	_tmp81_ = proton_plus_widgets_mango_hud_page_create_combo ((ProtonPlusWidgetsMangoHudPage*) self, _ ("HUD Toggle Key"), _tmp80_, (gint) 6, 0, "preferences-desktop-keyboard-shortcuts-symbolic", ___lambda249__proton_plus_widgets_mango_hud_page_set_value_func_int, self);
	_g_object_unref0 (self->priv->toggle_hud_row);
	self->priv->toggle_hud_row = _tmp81_;
	_tmp80_ = (_vala_array_free (_tmp80_, _tmp80__length1, (GDestroyNotify) g_free), NULL);
	proton_plus_widgets_mango_hud_visual_page_refresh_toggle_hud_row (self);
	_tmp82_ = proton_plus_utils_mango_hud_manager_get_compact (config);
	_tmp83_ = _tmp82_;
	_tmp84_ = proton_plus_widgets_mango_hud_page_create_switch ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Compact HUD"), _tmp83_, ___lambda250__proton_plus_widgets_mango_hud_page_set_value_func, self, "view-compact-symbolic");
	_g_object_unref0 (self->priv->compact_row);
	self->priv->compact_row = _tmp84_;
	_tmp85_ = proton_plus_utils_mango_hud_manager_get_no_display (config);
	_tmp86_ = _tmp85_;
	_tmp87_ = proton_plus_widgets_mango_hud_page_create_switch ((ProtonPlusWidgetsMangoHudPage*) self, _ ("Hide by default"), _tmp86_, ___lambda251__proton_plus_widgets_mango_hud_page_set_value_func, self, "eye-not-looking-symbolic");
	_g_object_unref0 (self->priv->no_display_row);
	self->priv->no_display_row = _tmp87_;
	_tmp88_ = self->priv->orientation_row;
	_tmp89_ = _g_object_ref0 ((GtkWidget*) _tmp88_);
	_tmp90_ = self->priv->border_row;
	_tmp91_ = _g_object_ref0 ((GtkWidget*) _tmp90_);
	_tmp92_ = bg_color_row;
	_tmp93_ = _g_object_ref0 ((GtkWidget*) _tmp92_);
	_tmp94_ = self->priv->font_size_row;
	_tmp95_ = _g_object_ref0 ((GtkWidget*) _tmp94_);
	_tmp96_ = self->priv->position_row;
	_tmp97_ = _g_object_ref0 ((GtkWidget*) _tmp96_);
	_tmp98_ = self->priv->columns_row;
	_tmp99_ = _g_object_ref0 ((GtkWidget*) _tmp98_);
	_tmp100_ = self->priv->toggle_hud_row;
	_tmp101_ = _g_object_ref0 ((GtkWidget*) _tmp100_);
	_tmp102_ = self->priv->compact_row;
	_tmp103_ = _g_object_ref0 ((GtkWidget*) _tmp102_);
	_tmp104_ = self->priv->no_display_row;
	_tmp105_ = _g_object_ref0 ((GtkWidget*) _tmp104_);
	_tmp106_ = g_new0 (GtkWidget*, 9 + 1);
	_tmp106_[0] = _tmp89_;
	_tmp106_[1] = _tmp91_;
	_tmp106_[2] = _tmp93_;
	_tmp106_[3] = _tmp95_;
	_tmp106_[4] = _tmp97_;
	_tmp106_[5] = _tmp99_;
	_tmp106_[6] = _tmp101_;
	_tmp106_[7] = _tmp103_;
	_tmp106_[8] = _tmp105_;
	_tmp107_ = _tmp106_;
	_tmp107__length1 = 9;
	_tmp108_ = proton_plus_widgets_mango_hud_page_add_flow_group ((ProtonPlusWidgetsMangoHudPage*) self, (GtkBox*) self, NULL, _tmp107_, (gint) 9, "caption");
	_tmp109_ = _tmp108_;
	_g_object_unref0 (_tmp109_);
	_tmp107_ = (_vala_array_free (_tmp107_, _tmp107__length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (bg_color_row);
	_g_object_unref0 (color_dialog_alpha);
	_g_object_unref0 (color_dialog);
	return self;
}

ProtonPlusWidgetsMangoHudVisualPage*
proton_plus_widgets_mango_hud_visual_page_new (ProtonPlusUtilsMangoHudManager* config)
{
	return proton_plus_widgets_mango_hud_visual_page_construct (PROTON_PLUS_WIDGETS_MANGO_HUD_TYPE_VISUAL_PAGE, config);
}

static void
proton_plus_widgets_mango_hud_visual_page_refresh_position_row (ProtonPlusWidgetsMangoHudVisualPage* self)
{
	gint pos_index = 0;
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GQuark _tmp6_ = 0U;
	static GQuark _tmp5_label0 = 0;
	static GQuark _tmp5_label1 = 0;
	static GQuark _tmp5_label2 = 0;
	static GQuark _tmp5_label3 = 0;
	AdwComboRow* _tmp7_;
	g_return_if_fail (self != NULL);
	pos_index = 0;
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_utils_mango_hud_manager_get_position (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp6_ = (NULL == _tmp4_) ? 0 : g_quark_from_string (_tmp4_);
	if (_tmp6_ == ((0 != _tmp5_label0) ? _tmp5_label0 : (_tmp5_label0 = g_quark_from_static_string ("top-left")))) {
		switch (0) {
			default:
			{
				pos_index = 0;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label1) ? _tmp5_label1 : (_tmp5_label1 = g_quark_from_static_string ("top-right")))) {
		switch (0) {
			default:
			{
				pos_index = 1;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label2) ? _tmp5_label2 : (_tmp5_label2 = g_quark_from_static_string ("bottom-left")))) {
		switch (0) {
			default:
			{
				pos_index = 2;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label3) ? _tmp5_label3 : (_tmp5_label3 = g_quark_from_static_string ("bottom-right")))) {
		switch (0) {
			default:
			{
				pos_index = 3;
				break;
			}
		}
	}
	_tmp7_ = self->priv->position_row;
	adw_combo_row_set_selected (_tmp7_, (guint) pos_index);
}

static void
proton_plus_widgets_mango_hud_visual_page_refresh_toggle_hud_row (ProtonPlusWidgetsMangoHudVisualPage* self)
{
	gint toggle_index = 0;
	ProtonPlusUtilsMangoHudManager* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GQuark _tmp6_ = 0U;
	static GQuark _tmp5_label0 = 0;
	static GQuark _tmp5_label1 = 0;
	static GQuark _tmp5_label2 = 0;
	static GQuark _tmp5_label3 = 0;
	static GQuark _tmp5_label4 = 0;
	static GQuark _tmp5_label5 = 0;
	AdwComboRow* _tmp7_;
	g_return_if_fail (self != NULL);
	toggle_index = 5;
	_tmp0_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_utils_mango_hud_manager_get_toggle_hud (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp6_ = (NULL == _tmp4_) ? 0 : g_quark_from_string (_tmp4_);
	if (_tmp6_ == ((0 != _tmp5_label0) ? _tmp5_label0 : (_tmp5_label0 = g_quark_from_static_string ("Shift_R+F12")))) {
		switch (0) {
			default:
			{
				toggle_index = 0;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label1) ? _tmp5_label1 : (_tmp5_label1 = g_quark_from_static_string ("Shift_R+F1")))) {
		switch (0) {
			default:
			{
				toggle_index = 1;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label2) ? _tmp5_label2 : (_tmp5_label2 = g_quark_from_static_string ("Shift_R+F2")))) {
		switch (0) {
			default:
			{
				toggle_index = 2;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label3) ? _tmp5_label3 : (_tmp5_label3 = g_quark_from_static_string ("Shift_R+F3")))) {
		switch (0) {
			default:
			{
				toggle_index = 3;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label4) ? _tmp5_label4 : (_tmp5_label4 = g_quark_from_static_string ("Shift_R+F4")))) {
		switch (0) {
			default:
			{
				toggle_index = 4;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label5) ? _tmp5_label5 : (_tmp5_label5 = g_quark_from_static_string ("")))) {
		switch (0) {
			default:
			{
				toggle_index = 5;
				break;
			}
		}
	}
	_tmp7_ = self->priv->toggle_hud_row;
	adw_combo_row_set_selected (_tmp7_, (guint) toggle_index);
}

static void
proton_plus_widgets_mango_hud_visual_page_real_refresh (ProtonPlusWidgetsMangoHudPage* base)
{
	ProtonPlusWidgetsMangoHudVisualPage * self;
	AdwEntryRow* _tmp0_;
	ProtonPlusUtilsMangoHudManager* _tmp1_;
	ProtonPlusUtilsMangoHudManager* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gint _tmp5_ = 0;
	ProtonPlusUtilsMangoHudManager* _tmp6_;
	ProtonPlusUtilsMangoHudManager* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	AdwComboRow* _tmp10_;
	gint _tmp11_ = 0;
	ProtonPlusUtilsMangoHudManager* _tmp12_;
	ProtonPlusUtilsMangoHudManager* _tmp13_;
	gint _tmp14_;
	gint _tmp15_;
	AdwComboRow* _tmp16_;
	GdkRGBA bg_rgba_ref = {0};
	ProtonPlusUtilsMangoHudManager* _tmp17_;
	ProtonPlusUtilsMangoHudManager* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	GdkRGBA _tmp21_ = {0};
	ProtonPlusUtilsMangoHudManager* _tmp22_;
	ProtonPlusUtilsMangoHudManager* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	GtkColorDialogButton* _tmp26_;
	GdkRGBA _tmp27_;
	GtkColorDialogButton* _tmp28_;
	ProtonPlusUtilsMangoHudManager* _tmp29_;
	ProtonPlusUtilsMangoHudManager* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	GdkRGBA _tmp33_ = {0};
	AdwEntryRow* _tmp34_;
	ProtonPlusUtilsMangoHudManager* _tmp35_;
	ProtonPlusUtilsMangoHudManager* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	gint _tmp39_ = 0;
	ProtonPlusUtilsMangoHudManager* _tmp40_;
	ProtonPlusUtilsMangoHudManager* _tmp41_;
	gint _tmp42_;
	gint _tmp43_;
	AdwComboRow* _tmp48_;
	AdwSwitchRow* _tmp49_;
	ProtonPlusUtilsMangoHudManager* _tmp50_;
	ProtonPlusUtilsMangoHudManager* _tmp51_;
	gboolean _tmp52_;
	gboolean _tmp53_;
	AdwSwitchRow* _tmp54_;
	ProtonPlusUtilsMangoHudManager* _tmp55_;
	ProtonPlusUtilsMangoHudManager* _tmp56_;
	gboolean _tmp57_;
	gboolean _tmp58_;
	self = (ProtonPlusWidgetsMangoHudVisualPage*) base;
	proton_plus_widgets_mango_hud_page_set_is_updating ((ProtonPlusWidgetsMangoHudPage*) self, TRUE);
	_tmp0_ = self->priv->hud_title_row;
	_tmp1_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = proton_plus_utils_mango_hud_manager_get_hud_title (_tmp2_);
	_tmp4_ = _tmp3_;
	gtk_editable_set_text ((GtkEditable*) _tmp0_, _tmp4_);
	_tmp6_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp7_ = _tmp6_;
	_tmp8_ = proton_plus_utils_mango_hud_manager_get_horizontal (_tmp7_);
	_tmp9_ = _tmp8_;
	if (_tmp9_) {
		_tmp5_ = 1;
	} else {
		_tmp5_ = 0;
	}
	_tmp10_ = self->priv->orientation_row;
	adw_combo_row_set_selected (_tmp10_, (guint) _tmp5_);
	_tmp12_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp13_ = _tmp12_;
	_tmp14_ = proton_plus_utils_mango_hud_manager_get_round_corners (_tmp13_);
	_tmp15_ = _tmp14_;
	if (_tmp15_ > 0) {
		_tmp11_ = 1;
	} else {
		_tmp11_ = 0;
	}
	_tmp16_ = self->priv->border_row;
	adw_combo_row_set_selected (_tmp16_, (guint) _tmp11_);
	_tmp17_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp18_ = _tmp17_;
	_tmp19_ = proton_plus_utils_mango_hud_manager_get_background_color (_tmp18_);
	_tmp20_ = _tmp19_;
	proton_plus_widgets_mango_hud_page_hex_to_rgba ((ProtonPlusWidgetsMangoHudPage*) self, _tmp20_, "#ffffff", &_tmp21_);
	bg_rgba_ref = _tmp21_;
	_tmp22_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp23_ = _tmp22_;
	_tmp24_ = proton_plus_utils_mango_hud_manager_get_background_alpha (_tmp23_);
	_tmp25_ = _tmp24_;
	bg_rgba_ref.alpha = float_parse (_tmp25_);
	_tmp26_ = self->priv->bg_color_btn;
	_tmp27_ = bg_rgba_ref;
	gtk_color_dialog_button_set_rgba (_tmp26_, &_tmp27_);
	_tmp28_ = self->priv->font_color_btn;
	_tmp29_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp30_ = _tmp29_;
	_tmp31_ = proton_plus_utils_mango_hud_manager_get_text_color (_tmp30_);
	_tmp32_ = _tmp31_;
	proton_plus_widgets_mango_hud_page_hex_to_rgba ((ProtonPlusWidgetsMangoHudPage*) self, _tmp32_, "#ffffff", &_tmp33_);
	gtk_color_dialog_button_set_rgba (_tmp28_, &_tmp33_);
	_tmp34_ = self->priv->font_size_row;
	_tmp35_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp36_ = _tmp35_;
	_tmp37_ = proton_plus_utils_mango_hud_manager_get_font_size (_tmp36_);
	_tmp38_ = _tmp37_;
	gtk_editable_set_text ((GtkEditable*) _tmp34_, _tmp38_);
	proton_plus_widgets_mango_hud_visual_page_refresh_position_row (self);
	_tmp40_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp41_ = _tmp40_;
	_tmp42_ = proton_plus_utils_mango_hud_manager_get_table_columns (_tmp41_);
	_tmp43_ = _tmp42_;
	if (_tmp43_ > 0) {
		ProtonPlusUtilsMangoHudManager* _tmp44_;
		ProtonPlusUtilsMangoHudManager* _tmp45_;
		gint _tmp46_;
		gint _tmp47_;
		_tmp44_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
		_tmp45_ = _tmp44_;
		_tmp46_ = proton_plus_utils_mango_hud_manager_get_table_columns (_tmp45_);
		_tmp47_ = _tmp46_;
		_tmp39_ = _tmp47_ - 1;
	} else {
		_tmp39_ = 0;
	}
	_tmp48_ = self->priv->columns_row;
	adw_combo_row_set_selected (_tmp48_, (guint) _tmp39_);
	proton_plus_widgets_mango_hud_visual_page_refresh_toggle_hud_row (self);
	_tmp49_ = self->priv->compact_row;
	_tmp50_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp51_ = _tmp50_;
	_tmp52_ = proton_plus_utils_mango_hud_manager_get_compact (_tmp51_);
	_tmp53_ = _tmp52_;
	adw_switch_row_set_active (_tmp49_, _tmp53_);
	_tmp54_ = self->priv->no_display_row;
	_tmp55_ = proton_plus_widgets_mango_hud_page_get_config ((ProtonPlusWidgetsMangoHudPage*) self);
	_tmp56_ = _tmp55_;
	_tmp57_ = proton_plus_utils_mango_hud_manager_get_no_display (_tmp56_);
	_tmp58_ = _tmp57_;
	adw_switch_row_set_active (_tmp54_, _tmp58_);
	proton_plus_widgets_mango_hud_page_set_is_updating ((ProtonPlusWidgetsMangoHudPage*) self, FALSE);
}

static void
proton_plus_widgets_mango_hud_visual_page_class_init (ProtonPlusWidgetsMangoHudVisualPageClass * klass,
                                                      gpointer klass_data)
{
	proton_plus_widgets_mango_hud_visual_page_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsMangoHudVisualPage_private_offset);
	((ProtonPlusWidgetsMangoHudPageClass *) klass)->refresh = (void (*) (ProtonPlusWidgetsMangoHudPage*)) proton_plus_widgets_mango_hud_visual_page_real_refresh;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_mango_hud_visual_page_finalize;
}

static void
proton_plus_widgets_mango_hud_visual_page_instance_init (ProtonPlusWidgetsMangoHudVisualPage * self,
                                                         gpointer klass)
{
	self->priv = proton_plus_widgets_mango_hud_visual_page_get_instance_private (self);
}

static void
proton_plus_widgets_mango_hud_visual_page_finalize (GObject * obj)
{
	ProtonPlusWidgetsMangoHudVisualPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_MANGO_HUD_TYPE_VISUAL_PAGE, ProtonPlusWidgetsMangoHudVisualPage);
	_g_object_unref0 (self->priv->hud_title_row);
	_g_object_unref0 (self->priv->orientation_row);
	_g_object_unref0 (self->priv->border_row);
	_g_object_unref0 (self->priv->bg_color_btn);
	_g_object_unref0 (self->priv->font_color_btn);
	_g_object_unref0 (self->priv->font_size_row);
	_g_object_unref0 (self->priv->position_row);
	_g_object_unref0 (self->priv->columns_row);
	_g_object_unref0 (self->priv->toggle_hud_row);
	_g_object_unref0 (self->priv->compact_row);
	_g_object_unref0 (self->priv->no_display_row);
	G_OBJECT_CLASS (proton_plus_widgets_mango_hud_visual_page_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_mango_hud_visual_page_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsMangoHudVisualPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_mango_hud_visual_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsMangoHudVisualPage), 0, (GInstanceInitFunc) proton_plus_widgets_mango_hud_visual_page_instance_init, NULL };
	GType proton_plus_widgets_mango_hud_visual_page_type_id;
	proton_plus_widgets_mango_hud_visual_page_type_id = g_type_register_static (PROTON_PLUS_WIDGETS_MANGO_HUD_TYPE_PAGE, "ProtonPlusWidgetsMangoHudVisualPage", &g_define_type_info, 0);
	ProtonPlusWidgetsMangoHudVisualPage_private_offset = g_type_add_instance_private (proton_plus_widgets_mango_hud_visual_page_type_id, sizeof (ProtonPlusWidgetsMangoHudVisualPagePrivate));
	return proton_plus_widgets_mango_hud_visual_page_type_id;
}

GType
proton_plus_widgets_mango_hud_visual_page_get_type (void)
{
	static volatile gsize proton_plus_widgets_mango_hud_visual_page_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_mango_hud_visual_page_type_id__once)) {
		GType proton_plus_widgets_mango_hud_visual_page_type_id;
		proton_plus_widgets_mango_hud_visual_page_type_id = proton_plus_widgets_mango_hud_visual_page_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_mango_hud_visual_page_type_id__once, proton_plus_widgets_mango_hud_visual_page_type_id);
	}
	return proton_plus_widgets_mango_hud_visual_page_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;
}

