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

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 2 -*-
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 * SPDX-FileCopyrightText: Michael Terry
 */

#include <adwaita.h>
#include <gtk/gtk.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.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 TYPE_HELP_BUTTON (help_button_get_type ())
#define HELP_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HELP_BUTTON, HelpButton))
#define HELP_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HELP_BUTTON, HelpButtonClass))
#define IS_HELP_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HELP_BUTTON))
#define IS_HELP_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HELP_BUTTON))
#define HELP_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HELP_BUTTON, HelpButtonClass))

typedef struct _HelpButton HelpButton;
typedef struct _HelpButtonClass HelpButtonClass;
typedef struct _HelpButtonPrivate HelpButtonPrivate;

#define TYPE_RESTORE_TARGET_WARNING_BUTTON (restore_target_warning_button_get_type ())
#define RESTORE_TARGET_WARNING_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RESTORE_TARGET_WARNING_BUTTON, RestoreTargetWarningButton))
#define RESTORE_TARGET_WARNING_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RESTORE_TARGET_WARNING_BUTTON, RestoreTargetWarningButtonClass))
#define IS_RESTORE_TARGET_WARNING_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RESTORE_TARGET_WARNING_BUTTON))
#define IS_RESTORE_TARGET_WARNING_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RESTORE_TARGET_WARNING_BUTTON))
#define RESTORE_TARGET_WARNING_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RESTORE_TARGET_WARNING_BUTTON, RestoreTargetWarningButtonClass))

typedef struct _RestoreTargetWarningButton RestoreTargetWarningButton;
typedef struct _RestoreTargetWarningButtonClass RestoreTargetWarningButtonClass;
typedef struct _RestoreTargetWarningButtonPrivate RestoreTargetWarningButtonPrivate;
enum  {
	RESTORE_TARGET_WARNING_BUTTON_0_PROPERTY,
	RESTORE_TARGET_WARNING_BUTTON_LABEL_PROPERTY,
	RESTORE_TARGET_WARNING_BUTTON_NUM_PROPERTIES
};
static GParamSpec* restore_target_warning_button_properties[RESTORE_TARGET_WARNING_BUTTON_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

struct _HelpButton {
	AdwBin parent_instance;
	HelpButtonPrivate * priv;
};

struct _HelpButtonClass {
	AdwBinClass parent_class;
};

struct _RestoreTargetWarningButton {
	HelpButton parent_instance;
	RestoreTargetWarningButtonPrivate * priv;
};

struct _RestoreTargetWarningButtonClass {
	HelpButtonClass parent_class;
};

struct _RestoreTargetWarningButtonPrivate {
	gchar* _label;
};

static gint RestoreTargetWarningButton_private_offset;
static gpointer restore_target_warning_button_parent_class = NULL;

VALA_EXTERN GType help_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (HelpButton, g_object_unref)
VALA_EXTERN GType restore_target_warning_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RestoreTargetWarningButton, g_object_unref)
VALA_EXTERN RestoreTargetWarningButton* restore_target_warning_button_new (void);
VALA_EXTERN RestoreTargetWarningButton* restore_target_warning_button_construct (GType object_type);
VALA_EXTERN HelpButton* help_button_new (void);
VALA_EXTERN HelpButton* help_button_construct (GType object_type);
VALA_EXTERN const gchar* restore_target_warning_button_get_label (RestoreTargetWarningButton* self);
VALA_EXTERN void restore_target_warning_button_set_label (RestoreTargetWarningButton* self,
                                              const gchar* value);
static void restore_target_warning_button_finalize (GObject * obj);
static GType restore_target_warning_button_get_type_once (void);
static void _vala_restore_target_warning_button_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_restore_target_warning_button_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);

static inline gpointer
restore_target_warning_button_get_instance_private (RestoreTargetWarningButton* self)
{
	return G_STRUCT_MEMBER_P (self, RestoreTargetWarningButton_private_offset);
}

RestoreTargetWarningButton*
restore_target_warning_button_construct (GType object_type)
{
	RestoreTargetWarningButton * self = NULL;
	self = (RestoreTargetWarningButton*) help_button_construct (object_type);
	return self;
}

RestoreTargetWarningButton*
restore_target_warning_button_new (void)
{
	return restore_target_warning_button_construct (TYPE_RESTORE_TARGET_WARNING_BUTTON);
}

const gchar*
restore_target_warning_button_get_label (RestoreTargetWarningButton* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_label;
	result = _tmp0_;
	return result;
}

void
restore_target_warning_button_set_label (RestoreTargetWarningButton* self,
                                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = restore_target_warning_button_get_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_label);
		self->priv->_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, restore_target_warning_button_properties[RESTORE_TARGET_WARNING_BUTTON_LABEL_PROPERTY]);
	}
}

static void
restore_target_warning_button_class_init (RestoreTargetWarningButtonClass * klass,
                                          gpointer klass_data)
{
	restore_target_warning_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &RestoreTargetWarningButton_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_restore_target_warning_button_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_restore_target_warning_button_set_property;
	G_OBJECT_CLASS (klass)->finalize = restore_target_warning_button_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), RESTORE_TARGET_WARNING_BUTTON_LABEL_PROPERTY, restore_target_warning_button_properties[RESTORE_TARGET_WARNING_BUTTON_LABEL_PROPERTY] = g_param_spec_string ("label", "label", "label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/DejaDup/RestoreTargetWarningButton.ui");
}

static void
restore_target_warning_button_instance_init (RestoreTargetWarningButton * self,
                                             gpointer klass)
{
	self->priv = restore_target_warning_button_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
restore_target_warning_button_finalize (GObject * obj)
{
	RestoreTargetWarningButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_RESTORE_TARGET_WARNING_BUTTON, RestoreTargetWarningButton);
	_g_free0 (self->priv->_label);
	G_OBJECT_CLASS (restore_target_warning_button_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
restore_target_warning_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (RestoreTargetWarningButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) restore_target_warning_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RestoreTargetWarningButton), 0, (GInstanceInitFunc) restore_target_warning_button_instance_init, NULL };
	GType restore_target_warning_button_type_id;
	restore_target_warning_button_type_id = g_type_register_static (TYPE_HELP_BUTTON, "RestoreTargetWarningButton", &g_define_type_info, 0);
	RestoreTargetWarningButton_private_offset = g_type_add_instance_private (restore_target_warning_button_type_id, sizeof (RestoreTargetWarningButtonPrivate));
	return restore_target_warning_button_type_id;
}

GType
restore_target_warning_button_get_type (void)
{
	static gsize restore_target_warning_button_type_id__once = 0;
	if (g_once_init_enter (&restore_target_warning_button_type_id__once)) {
		GType restore_target_warning_button_type_id;
		restore_target_warning_button_type_id = restore_target_warning_button_get_type_once ();
		g_once_init_leave (&restore_target_warning_button_type_id__once, restore_target_warning_button_type_id);
	}
	return restore_target_warning_button_type_id__once;
}

static void
_vala_restore_target_warning_button_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	RestoreTargetWarningButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_RESTORE_TARGET_WARNING_BUTTON, RestoreTargetWarningButton);
	switch (property_id) {
		case RESTORE_TARGET_WARNING_BUTTON_LABEL_PROPERTY:
		g_value_set_string (value, restore_target_warning_button_get_label (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_restore_target_warning_button_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	RestoreTargetWarningButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_RESTORE_TARGET_WARNING_BUTTON, RestoreTargetWarningButton);
	switch (property_id) {
		case RESTORE_TARGET_WARNING_BUTTON_LABEL_PROPERTY:
		restore_target_warning_button_set_label (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

