/* OnlineAccountsView.c generated by valac 0.56.19, the Vala compiler
 * generated from OnlineAccountsView.vala, do not modify */

/*
 * Copyright (c) 2021 elementary, Inc. (https://elementary.io)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authored by: Marius Meisenzahl <mariusmeisenzahl@gmail.com>
 */

#include <adwaita.h>
#include <glib-object.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include <granite-7.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 ONBOARDING_TYPE_ABSTRACT_ONBOARDING_VIEW (onboarding_abstract_onboarding_view_get_type ())
#define ONBOARDING_ABSTRACT_ONBOARDING_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ONBOARDING_TYPE_ABSTRACT_ONBOARDING_VIEW, OnboardingAbstractOnboardingView))
#define ONBOARDING_ABSTRACT_ONBOARDING_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ONBOARDING_TYPE_ABSTRACT_ONBOARDING_VIEW, OnboardingAbstractOnboardingViewClass))
#define ONBOARDING_IS_ABSTRACT_ONBOARDING_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ONBOARDING_TYPE_ABSTRACT_ONBOARDING_VIEW))
#define ONBOARDING_IS_ABSTRACT_ONBOARDING_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ONBOARDING_TYPE_ABSTRACT_ONBOARDING_VIEW))
#define ONBOARDING_ABSTRACT_ONBOARDING_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ONBOARDING_TYPE_ABSTRACT_ONBOARDING_VIEW, OnboardingAbstractOnboardingViewClass))

typedef struct _OnboardingAbstractOnboardingView OnboardingAbstractOnboardingView;
typedef struct _OnboardingAbstractOnboardingViewClass OnboardingAbstractOnboardingViewClass;
typedef struct _OnboardingAbstractOnboardingViewPrivate OnboardingAbstractOnboardingViewPrivate;

#define ONBOARDING_TYPE_ONLINE_ACCOUNTS_VIEW (onboarding_online_accounts_view_get_type ())
#define ONBOARDING_ONLINE_ACCOUNTS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ONBOARDING_TYPE_ONLINE_ACCOUNTS_VIEW, OnboardingOnlineAccountsView))
#define ONBOARDING_ONLINE_ACCOUNTS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ONBOARDING_TYPE_ONLINE_ACCOUNTS_VIEW, OnboardingOnlineAccountsViewClass))
#define ONBOARDING_IS_ONLINE_ACCOUNTS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ONBOARDING_TYPE_ONLINE_ACCOUNTS_VIEW))
#define ONBOARDING_IS_ONLINE_ACCOUNTS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ONBOARDING_TYPE_ONLINE_ACCOUNTS_VIEW))
#define ONBOARDING_ONLINE_ACCOUNTS_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ONBOARDING_TYPE_ONLINE_ACCOUNTS_VIEW, OnboardingOnlineAccountsViewClass))

typedef struct _OnboardingOnlineAccountsView OnboardingOnlineAccountsView;
typedef struct _OnboardingOnlineAccountsViewClass OnboardingOnlineAccountsViewClass;
typedef struct _OnboardingOnlineAccountsViewPrivate OnboardingOnlineAccountsViewPrivate;
enum  {
	ONBOARDING_ONLINE_ACCOUNTS_VIEW_0_PROPERTY,
	ONBOARDING_ONLINE_ACCOUNTS_VIEW_NUM_PROPERTIES
};
static GParamSpec* onboarding_online_accounts_view_properties[ONBOARDING_ONLINE_ACCOUNTS_VIEW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _OnboardingAbstractOnboardingView {
	AdwNavigationPage parent_instance;
	OnboardingAbstractOnboardingViewPrivate * priv;
};

struct _OnboardingAbstractOnboardingViewClass {
	AdwNavigationPageClass parent_class;
};

struct _OnboardingOnlineAccountsView {
	OnboardingAbstractOnboardingView parent_instance;
	OnboardingOnlineAccountsViewPrivate * priv;
};

struct _OnboardingOnlineAccountsViewClass {
	OnboardingAbstractOnboardingViewClass parent_class;
};

static gpointer onboarding_online_accounts_view_parent_class = NULL;

VALA_EXTERN GType onboarding_abstract_onboarding_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OnboardingAbstractOnboardingView, g_object_unref)
VALA_EXTERN GType onboarding_online_accounts_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OnboardingOnlineAccountsView, g_object_unref)
VALA_EXTERN OnboardingOnlineAccountsView* onboarding_online_accounts_view_new (void);
VALA_EXTERN OnboardingOnlineAccountsView* onboarding_online_accounts_view_construct (GType object_type);
static GObject * onboarding_online_accounts_view_constructor (GType type,
                                                       guint n_construct_properties,
                                                       GObjectConstructParam * construct_properties);
VALA_EXTERN GraniteBox* onboarding_abstract_onboarding_view_get_custom_bin (OnboardingAbstractOnboardingView* self);
static GType onboarding_online_accounts_view_get_type_once (void);

OnboardingOnlineAccountsView*
onboarding_online_accounts_view_construct (GType object_type)
{
	OnboardingOnlineAccountsView * self = NULL;
	self = (OnboardingOnlineAccountsView*) g_object_new (object_type, "view-name", "onlineaccounts", "description", _ ("Use Mail, Calendar, and Tasks with an existing online account to sync " \
"emails, events, and tasks with this device."), "icon-name", "io.elementary.settings.onlineaccounts", "title", _ ("Online Accounts"), NULL);
	return self;
}

OnboardingOnlineAccountsView*
onboarding_online_accounts_view_new (void)
{
	return onboarding_online_accounts_view_construct (ONBOARDING_TYPE_ONLINE_ACCOUNTS_VIEW);
}

static GObject *
onboarding_online_accounts_view_constructor (GType type,
                                             guint n_construct_properties,
                                             GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	OnboardingOnlineAccountsView * self;
	GtkLinkButton* settings_link = NULL;
	GtkLinkButton* _tmp0_;
	GraniteBox* _tmp1_;
	GraniteBox* _tmp2_;
	GtkLinkButton* _tmp3_;
	parent_class = G_OBJECT_CLASS (onboarding_online_accounts_view_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ONBOARDING_TYPE_ONLINE_ACCOUNTS_VIEW, OnboardingOnlineAccountsView);
	_tmp0_ = (GtkLinkButton*) gtk_link_button_new_with_label ("settings://accounts/online", _ ("Connect Online Accounts…"));
	g_object_ref_sink (_tmp0_);
	settings_link = _tmp0_;
	_tmp1_ = onboarding_abstract_onboarding_view_get_custom_bin ((OnboardingAbstractOnboardingView*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = settings_link;
	gtk_box_append ((GtkBox*) _tmp2_, (GtkWidget*) _tmp3_);
	_g_object_unref0 (settings_link);
	return obj;
}

static void
onboarding_online_accounts_view_class_init (OnboardingOnlineAccountsViewClass * klass,
                                            gpointer klass_data)
{
	onboarding_online_accounts_view_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->constructor = onboarding_online_accounts_view_constructor;
}

static void
onboarding_online_accounts_view_instance_init (OnboardingOnlineAccountsView * self,
                                               gpointer klass)
{
}

 G_GNUC_NO_INLINE static GType
onboarding_online_accounts_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (OnboardingOnlineAccountsViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) onboarding_online_accounts_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (OnboardingOnlineAccountsView), 0, (GInstanceInitFunc) onboarding_online_accounts_view_instance_init, NULL };
	GType onboarding_online_accounts_view_type_id;
	onboarding_online_accounts_view_type_id = g_type_register_static (ONBOARDING_TYPE_ABSTRACT_ONBOARDING_VIEW, "OnboardingOnlineAccountsView", &g_define_type_info, 0);
	return onboarding_online_accounts_view_type_id;
}

GType
onboarding_online_accounts_view_get_type (void)
{
	static volatile gsize onboarding_online_accounts_view_type_id__once = 0;
	if (g_once_init_enter (&onboarding_online_accounts_view_type_id__once)) {
		GType onboarding_online_accounts_view_type_id;
		onboarding_online_accounts_view_type_id = onboarding_online_accounts_view_get_type_once ();
		g_once_init_leave (&onboarding_online_accounts_view_type_id__once, onboarding_online_accounts_view_type_id);
	}
	return onboarding_online_accounts_view_type_id__once;
}

