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

/*
 *  pamac-vala
 *
 *  Copyright (C) 2020-2023 Guillaume Benoit <guillaume@manjaro.org>
 *
 *  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 get of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.h>

#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 PAMAC_TYPE_UPDATES_DIALOG (pamac_updates_dialog_get_type ())
#define PAMAC_UPDATES_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_UPDATES_DIALOG, PamacUpdatesDialog))
#define PAMAC_UPDATES_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_UPDATES_DIALOG, PamacUpdatesDialogClass))
#define PAMAC_IS_UPDATES_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_UPDATES_DIALOG))
#define PAMAC_IS_UPDATES_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_UPDATES_DIALOG))
#define PAMAC_UPDATES_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_UPDATES_DIALOG, PamacUpdatesDialogClass))

typedef struct _PamacUpdatesDialog PamacUpdatesDialog;
typedef struct _PamacUpdatesDialogClass PamacUpdatesDialogClass;
typedef struct _PamacUpdatesDialogPrivate PamacUpdatesDialogPrivate;
enum  {
	PAMAC_UPDATES_DIALOG_0_PROPERTY,
	PAMAC_UPDATES_DIALOG_NUM_PROPERTIES
};
static GParamSpec* pamac_updates_dialog_properties[PAMAC_UPDATES_DIALOG_NUM_PROPERTIES];

struct _PamacUpdatesDialog {
	AdwWindow parent_instance;
	PamacUpdatesDialogPrivate * priv;
	GtkLabel* label;
	GtkListBox* listbox;
};

struct _PamacUpdatesDialogClass {
	AdwWindowClass parent_class;
};

static gpointer pamac_updates_dialog_parent_class = NULL;

VALA_EXTERN GType pamac_updates_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PamacUpdatesDialog, g_object_unref)
VALA_EXTERN PamacUpdatesDialog* pamac_updates_dialog_new (GtkApplicationWindow* window);
VALA_EXTERN PamacUpdatesDialog* pamac_updates_dialog_construct (GType object_type,
                                                    GtkApplicationWindow* window);
static void pamac_updates_dialog_finalize (GObject * obj);
static GType pamac_updates_dialog_get_type_once (void);

PamacUpdatesDialog*
pamac_updates_dialog_construct (GType object_type,
                                GtkApplicationWindow* window)
{
	PamacUpdatesDialog * self = NULL;
	g_return_val_if_fail (window != NULL, NULL);
	self = (PamacUpdatesDialog*) g_object_new (object_type, "transient-for", window, NULL);
	return self;
}

PamacUpdatesDialog*
pamac_updates_dialog_new (GtkApplicationWindow* window)
{
	return pamac_updates_dialog_construct (PAMAC_TYPE_UPDATES_DIALOG, window);
}

static void
pamac_updates_dialog_class_init (PamacUpdatesDialogClass * klass,
                                 gpointer klass_data)
{
	pamac_updates_dialog_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = pamac_updates_dialog_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/manjaro/pamac/manager/updates_dialog.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "label", FALSE, G_STRUCT_OFFSET (PamacUpdatesDialog, label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "listbox", FALSE, G_STRUCT_OFFSET (PamacUpdatesDialog, listbox));
}

static void
pamac_updates_dialog_instance_init (PamacUpdatesDialog * self,
                                    gpointer klass)
{
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
pamac_updates_dialog_finalize (GObject * obj)
{
	PamacUpdatesDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PAMAC_TYPE_UPDATES_DIALOG, PamacUpdatesDialog);
	G_OBJECT_CLASS (pamac_updates_dialog_parent_class)->finalize (obj);
}

static GType
pamac_updates_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PamacUpdatesDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pamac_updates_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PamacUpdatesDialog), 0, (GInstanceInitFunc) pamac_updates_dialog_instance_init, NULL };
	GType pamac_updates_dialog_type_id;
	pamac_updates_dialog_type_id = g_type_register_static (adw_window_get_type (), "PamacUpdatesDialog", &g_define_type_info, 0);
	return pamac_updates_dialog_type_id;
}

GType
pamac_updates_dialog_get_type (void)
{
	static volatile gsize pamac_updates_dialog_type_id__once = 0;
	if (g_once_init_enter (&pamac_updates_dialog_type_id__once)) {
		GType pamac_updates_dialog_type_id;
		pamac_updates_dialog_type_id = pamac_updates_dialog_get_type_once ();
		g_once_init_leave (&pamac_updates_dialog_type_id__once, pamac_updates_dialog_type_id);
	}
	return pamac_updates_dialog_type_id__once;
}

