/* RestoreLocationDialog.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from RestoreLocationDialog.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 <glib-object.h>
#include "deja.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_ACTION_DIALOG (action_dialog_get_type ())
#define ACTION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ACTION_DIALOG, ActionDialog))
#define ACTION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ACTION_DIALOG, ActionDialogClass))
#define IS_ACTION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ACTION_DIALOG))
#define IS_ACTION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ACTION_DIALOG))
#define ACTION_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ACTION_DIALOG, ActionDialogClass))

typedef struct _ActionDialog ActionDialog;
typedef struct _ActionDialogClass ActionDialogClass;
typedef struct _ActionDialogPrivate ActionDialogPrivate;

#define TYPE_RESTORE_LOCATION_DIALOG (restore_location_dialog_get_type ())
#define RESTORE_LOCATION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RESTORE_LOCATION_DIALOG, RestoreLocationDialog))
#define RESTORE_LOCATION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RESTORE_LOCATION_DIALOG, RestoreLocationDialogClass))
#define IS_RESTORE_LOCATION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RESTORE_LOCATION_DIALOG))
#define IS_RESTORE_LOCATION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RESTORE_LOCATION_DIALOG))
#define RESTORE_LOCATION_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RESTORE_LOCATION_DIALOG, RestoreLocationDialogClass))

typedef struct _RestoreLocationDialog RestoreLocationDialog;
typedef struct _RestoreLocationDialogClass RestoreLocationDialogClass;
typedef struct _RestoreLocationDialogPrivate RestoreLocationDialogPrivate;

#define TYPE_DYNAMIC_PREFERENCES_GROUP (dynamic_preferences_group_get_type ())
#define DYNAMIC_PREFERENCES_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DYNAMIC_PREFERENCES_GROUP, DynamicPreferencesGroup))
#define DYNAMIC_PREFERENCES_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DYNAMIC_PREFERENCES_GROUP, DynamicPreferencesGroupClass))
#define IS_DYNAMIC_PREFERENCES_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DYNAMIC_PREFERENCES_GROUP))
#define IS_DYNAMIC_PREFERENCES_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DYNAMIC_PREFERENCES_GROUP))
#define DYNAMIC_PREFERENCES_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DYNAMIC_PREFERENCES_GROUP, DynamicPreferencesGroupClass))

typedef struct _DynamicPreferencesGroup DynamicPreferencesGroup;
typedef struct _DynamicPreferencesGroupClass DynamicPreferencesGroupClass;

#define TYPE_CONFIG_LOCATION_GROUP (config_location_group_get_type ())
#define CONFIG_LOCATION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIG_LOCATION_GROUP, ConfigLocationGroup))
#define CONFIG_LOCATION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIG_LOCATION_GROUP, ConfigLocationGroupClass))
#define IS_CONFIG_LOCATION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIG_LOCATION_GROUP))
#define IS_CONFIG_LOCATION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIG_LOCATION_GROUP))
#define CONFIG_LOCATION_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIG_LOCATION_GROUP, ConfigLocationGroupClass))

typedef struct _ConfigLocationGroup ConfigLocationGroup;
typedef struct _ConfigLocationGroupClass ConfigLocationGroupClass;
enum  {
	RESTORE_LOCATION_DIALOG_0_PROPERTY,
	RESTORE_LOCATION_DIALOG_NUM_PROPERTIES
};
static GParamSpec* restore_location_dialog_properties[RESTORE_LOCATION_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	RESTORE_LOCATION_DIALOG_BROWSE_SIGNAL,
	RESTORE_LOCATION_DIALOG_NUM_SIGNALS
};
static guint restore_location_dialog_signals[RESTORE_LOCATION_DIALOG_NUM_SIGNALS] = {0};

struct _ActionDialog {
	AdwDialog parent_instance;
	ActionDialogPrivate * priv;
};

struct _ActionDialogClass {
	AdwDialogClass parent_class;
	void (*accept) (ActionDialog* self);
};

struct _RestoreLocationDialog {
	ActionDialog parent_instance;
	RestoreLocationDialogPrivate * priv;
};

struct _RestoreLocationDialogClass {
	ActionDialogClass parent_class;
};

struct _RestoreLocationDialogPrivate {
	ConfigLocationGroup* location_group;
};

static gint RestoreLocationDialog_private_offset;
static gpointer restore_location_dialog_parent_class = NULL;

VALA_EXTERN GType action_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ActionDialog, g_object_unref)
VALA_EXTERN GType restore_location_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RestoreLocationDialog, g_object_unref)
VALA_EXTERN GType dynamic_preferences_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DynamicPreferencesGroup, g_object_unref)
VALA_EXTERN GType config_location_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConfigLocationGroup, g_object_unref)
VALA_EXTERN void action_dialog_accept (ActionDialog* self);
static void restore_location_dialog_real_accept (ActionDialog* base);
VALA_EXTERN DejaDupBackend* config_location_group_get_backend (ConfigLocationGroup* self);
VALA_EXTERN RestoreLocationDialog* restore_location_dialog_new (void);
VALA_EXTERN RestoreLocationDialog* restore_location_dialog_construct (GType object_type);
VALA_EXTERN ActionDialog* action_dialog_new (void);
VALA_EXTERN ActionDialog* action_dialog_construct (GType object_type);
static void restore_location_dialog_finalize (GObject * obj);
static GType restore_location_dialog_get_type_once (void);

static inline gpointer
restore_location_dialog_get_instance_private (RestoreLocationDialog* self)
{
	return G_STRUCT_MEMBER_P (self, RestoreLocationDialog_private_offset);
}

static void
restore_location_dialog_real_accept (ActionDialog* base)
{
	RestoreLocationDialog * self;
	ConfigLocationGroup* _tmp0_;
	DejaDupBackend* _tmp1_;
	DejaDupBackend* _tmp2_;
	self = (RestoreLocationDialog*) base;
	_tmp0_ = self->priv->location_group;
	_tmp1_ = config_location_group_get_backend (_tmp0_);
	_tmp2_ = _tmp1_;
	g_signal_emit (self, restore_location_dialog_signals[RESTORE_LOCATION_DIALOG_BROWSE_SIGNAL], 0, _tmp2_);
	_g_object_unref0 (_tmp2_);
}

RestoreLocationDialog*
restore_location_dialog_construct (GType object_type)
{
	RestoreLocationDialog * self = NULL;
	self = (RestoreLocationDialog*) action_dialog_construct (object_type);
	return self;
}

RestoreLocationDialog*
restore_location_dialog_new (void)
{
	return restore_location_dialog_construct (TYPE_RESTORE_LOCATION_DIALOG);
}

static void
restore_location_dialog_class_init (RestoreLocationDialogClass * klass,
                                    gpointer klass_data)
{
	restore_location_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &RestoreLocationDialog_private_offset);
	((ActionDialogClass *) klass)->accept = (void (*) (ActionDialog*)) restore_location_dialog_real_accept;
	G_OBJECT_CLASS (klass)->finalize = restore_location_dialog_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/DejaDup/RestoreLocationDialog.ui");
	restore_location_dialog_signals[RESTORE_LOCATION_DIALOG_BROWSE_SIGNAL] = g_signal_new ("browse", TYPE_RESTORE_LOCATION_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, DEJA_DUP_TYPE_BACKEND);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "location_group", FALSE, RestoreLocationDialog_private_offset + G_STRUCT_OFFSET (RestoreLocationDialogPrivate, location_group));
}

static void
restore_location_dialog_instance_init (RestoreLocationDialog * self,
                                       gpointer klass)
{
	self->priv = restore_location_dialog_get_instance_private (self);
	g_type_ensure (TYPE_CONFIG_LOCATION_GROUP);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
restore_location_dialog_finalize (GObject * obj)
{
	RestoreLocationDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_RESTORE_LOCATION_DIALOG, RestoreLocationDialog);
	G_OBJECT_CLASS (restore_location_dialog_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
restore_location_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (RestoreLocationDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) restore_location_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RestoreLocationDialog), 0, (GInstanceInitFunc) restore_location_dialog_instance_init, NULL };
	GType restore_location_dialog_type_id;
	restore_location_dialog_type_id = g_type_register_static (TYPE_ACTION_DIALOG, "RestoreLocationDialog", &g_define_type_info, 0);
	RestoreLocationDialog_private_offset = g_type_add_instance_private (restore_location_dialog_type_id, sizeof (RestoreLocationDialogPrivate));
	return restore_location_dialog_type_id;
}

GType
restore_location_dialog_get_type (void)
{
	static gsize restore_location_dialog_type_id__once = 0;
	if (g_once_init_enter (&restore_location_dialog_type_id__once)) {
		GType restore_location_dialog_type_id;
		restore_location_dialog_type_id = restore_location_dialog_get_type_once ();
		g_once_init_leave (&restore_location_dialog_type_id__once, restore_location_dialog_type_id);
	}
	return restore_location_dialog_type_id__once;
}

