/* firmware-row.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from firmware-row.vala, do not modify */

/* This file is part of GNOME Boxes. License: LGPLv2+*/

#include <handy.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define BOXES_TYPE_FIRMWARE_ROW (boxes_firmware_row_get_type ())
#define BOXES_FIRMWARE_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_FIRMWARE_ROW, BoxesFirmwareRow))
#define BOXES_FIRMWARE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_FIRMWARE_ROW, BoxesFirmwareRowClass))
#define BOXES_IS_FIRMWARE_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_FIRMWARE_ROW))
#define BOXES_IS_FIRMWARE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_FIRMWARE_ROW))
#define BOXES_FIRMWARE_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_FIRMWARE_ROW, BoxesFirmwareRowClass))

typedef struct _BoxesFirmwareRow BoxesFirmwareRow;
typedef struct _BoxesFirmwareRowClass BoxesFirmwareRowClass;
typedef struct _BoxesFirmwareRowPrivate BoxesFirmwareRowPrivate;
enum  {
	BOXES_FIRMWARE_ROW_0_PROPERTY,
	BOXES_FIRMWARE_ROW_IS_UEFI_PROPERTY,
	BOXES_FIRMWARE_ROW_NUM_PROPERTIES
};
static GParamSpec* boxes_firmware_row_properties[BOXES_FIRMWARE_ROW_NUM_PROPERTIES];

struct _BoxesFirmwareRow {
	HdyActionRow parent_instance;
	BoxesFirmwareRowPrivate * priv;
};

struct _BoxesFirmwareRowClass {
	HdyActionRowClass parent_class;
};

struct _BoxesFirmwareRowPrivate {
	GtkRadioButton* uefi_button;
};

static gint BoxesFirmwareRow_private_offset;
static gpointer boxes_firmware_row_parent_class = NULL;

VALA_EXTERN GType boxes_firmware_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesFirmwareRow, g_object_unref)
VALA_EXTERN BoxesFirmwareRow* boxes_firmware_row_new (void);
VALA_EXTERN BoxesFirmwareRow* boxes_firmware_row_construct (GType object_type);
VALA_EXTERN gboolean boxes_firmware_row_get_is_uefi (BoxesFirmwareRow* self);
static void boxes_firmware_row_finalize (GObject * obj);
static GType boxes_firmware_row_get_type_once (void);
static void _vala_boxes_firmware_row_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec);

static inline gpointer
boxes_firmware_row_get_instance_private (BoxesFirmwareRow* self)
{
	return G_STRUCT_MEMBER_P (self, BoxesFirmwareRow_private_offset);
}

BoxesFirmwareRow*
boxes_firmware_row_construct (GType object_type)
{
	BoxesFirmwareRow * self = NULL;
	self = (BoxesFirmwareRow*) g_object_new (object_type, NULL);
	return self;
}

BoxesFirmwareRow*
boxes_firmware_row_new (void)
{
	return boxes_firmware_row_construct (BOXES_TYPE_FIRMWARE_ROW);
}

gboolean
boxes_firmware_row_get_is_uefi (BoxesFirmwareRow* self)
{
	gboolean result;
	GtkRadioButton* _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->uefi_button;
	result = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp0_);
	return result;
}

static void
boxes_firmware_row_class_init (BoxesFirmwareRowClass * klass,
                               gpointer klass_data)
{
	boxes_firmware_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BoxesFirmwareRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_firmware_row_get_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_firmware_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_FIRMWARE_ROW_IS_UEFI_PROPERTY, boxes_firmware_row_properties[BOXES_FIRMWARE_ROW_IS_UEFI_PROPERTY] = g_param_spec_boolean ("is-uefi", "is-uefi", "is-uefi", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Boxes/ui/assistant/firmware-row.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "uefi_button", FALSE, BoxesFirmwareRow_private_offset + G_STRUCT_OFFSET (BoxesFirmwareRowPrivate, uefi_button));
}

static void
boxes_firmware_row_instance_init (BoxesFirmwareRow * self,
                                  gpointer klass)
{
	self->priv = boxes_firmware_row_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
boxes_firmware_row_finalize (GObject * obj)
{
	BoxesFirmwareRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_FIRMWARE_ROW, BoxesFirmwareRow);
	G_OBJECT_CLASS (boxes_firmware_row_parent_class)->finalize (obj);
}

static GType
boxes_firmware_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BoxesFirmwareRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_firmware_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesFirmwareRow), 0, (GInstanceInitFunc) boxes_firmware_row_instance_init, NULL };
	GType boxes_firmware_row_type_id;
	boxes_firmware_row_type_id = g_type_register_static (hdy_action_row_get_type (), "BoxesFirmwareRow", &g_define_type_info, 0);
	BoxesFirmwareRow_private_offset = g_type_add_instance_private (boxes_firmware_row_type_id, sizeof (BoxesFirmwareRowPrivate));
	return boxes_firmware_row_type_id;
}

GType
boxes_firmware_row_get_type (void)
{
	static volatile gsize boxes_firmware_row_type_id__once = 0;
	if (g_once_init_enter (&boxes_firmware_row_type_id__once)) {
		GType boxes_firmware_row_type_id;
		boxes_firmware_row_type_id = boxes_firmware_row_get_type_once ();
		g_once_init_leave (&boxes_firmware_row_type_id__once, boxes_firmware_row_type_id);
	}
	return boxes_firmware_row_type_id__once;
}

static void
_vala_boxes_firmware_row_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec)
{
	BoxesFirmwareRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_FIRMWARE_ROW, BoxesFirmwareRow);
	switch (property_id) {
		case BOXES_FIRMWARE_ROW_IS_UEFI_PROPERTY:
		g_value_set_boolean (value, boxes_firmware_row_get_is_uefi (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

