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

/*
 * SPDX-License-Identifier: LGPL-3.0-or-later
 * SPDX-FileCopyrightText: 2021 elementary, Inc. (https://elementary.io)
 */

#include <gtk/gtk.h>
#include <glib-object.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 MUSIC_TYPE_ALBUM_IMAGE (music_album_image_get_type ())
#define MUSIC_ALBUM_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MUSIC_TYPE_ALBUM_IMAGE, MusicAlbumImage))
#define MUSIC_ALBUM_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MUSIC_TYPE_ALBUM_IMAGE, MusicAlbumImageClass))
#define MUSIC_IS_ALBUM_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MUSIC_TYPE_ALBUM_IMAGE))
#define MUSIC_IS_ALBUM_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MUSIC_TYPE_ALBUM_IMAGE))
#define MUSIC_ALBUM_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MUSIC_TYPE_ALBUM_IMAGE, MusicAlbumImageClass))

typedef struct _MusicAlbumImage MusicAlbumImage;
typedef struct _MusicAlbumImageClass MusicAlbumImageClass;
typedef struct _MusicAlbumImagePrivate MusicAlbumImagePrivate;
enum  {
	MUSIC_ALBUM_IMAGE_0_PROPERTY,
	MUSIC_ALBUM_IMAGE_NUM_PROPERTIES
};
static GParamSpec* music_album_image_properties[MUSIC_ALBUM_IMAGE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _MusicAlbumImage {
	GtkGrid parent_instance;
	MusicAlbumImagePrivate * priv;
	GtkImage* image;
};

struct _MusicAlbumImageClass {
	GtkGridClass parent_class;
};

static gpointer music_album_image_parent_class = NULL;

VALA_EXTERN GType music_album_image_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MusicAlbumImage, g_object_unref)
VALA_EXTERN MusicAlbumImage* music_album_image_new (void);
VALA_EXTERN MusicAlbumImage* music_album_image_construct (GType object_type);
static GObject * music_album_image_constructor (GType type,
                                         guint n_construct_properties,
                                         GObjectConstructParam * construct_properties);
static void music_album_image_finalize (GObject * obj);
static GType music_album_image_get_type_once (void);

MusicAlbumImage*
music_album_image_construct (GType object_type)
{
	MusicAlbumImage * self = NULL;
	self = (MusicAlbumImage*) g_object_new (object_type, NULL);
	return self;
}

MusicAlbumImage*
music_album_image_new (void)
{
	return music_album_image_construct (MUSIC_TYPE_ALBUM_IMAGE);
}

static GObject *
music_album_image_constructor (GType type,
                               guint n_construct_properties,
                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	MusicAlbumImage * self;
	GtkImage* _tmp0_;
	GtkImage* _tmp1_;
	parent_class = G_OBJECT_CLASS (music_album_image_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, MUSIC_TYPE_ALBUM_IMAGE, MusicAlbumImage);
	_tmp0_ = (GtkImage*) gtk_image_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->image);
	self->image = _tmp0_;
	gtk_widget_add_css_class ((GtkWidget*) self, GRANITE_STYLE_CLASS_CARD);
	gtk_widget_add_css_class ((GtkWidget*) self, GRANITE_STYLE_CLASS_ROUNDED);
	gtk_widget_set_overflow ((GtkWidget*) self, GTK_OVERFLOW_HIDDEN);
	_tmp1_ = self->image;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp1_, 0, 0, 1, 1);
	return obj;
}

static void
music_album_image_base_init (MusicAlbumImageClass * klass)
{
	gtk_widget_class_set_css_name (GTK_WIDGET_CLASS (klass), "album");
}

static void
music_album_image_class_init (MusicAlbumImageClass * klass,
                              gpointer klass_data)
{
	music_album_image_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->constructor = music_album_image_constructor;
	G_OBJECT_CLASS (klass)->finalize = music_album_image_finalize;
}

static void
music_album_image_instance_init (MusicAlbumImage * self,
                                 gpointer klass)
{
}

static void
music_album_image_finalize (GObject * obj)
{
	MusicAlbumImage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, MUSIC_TYPE_ALBUM_IMAGE, MusicAlbumImage);
	_g_object_unref0 (self->image);
	G_OBJECT_CLASS (music_album_image_parent_class)->finalize (obj);
}

static GType
music_album_image_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (MusicAlbumImageClass), (GBaseInitFunc) music_album_image_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) music_album_image_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MusicAlbumImage), 0, (GInstanceInitFunc) music_album_image_instance_init, NULL };
	GType music_album_image_type_id;
	music_album_image_type_id = g_type_register_static (gtk_grid_get_type (), "MusicAlbumImage", &g_define_type_info, 0);
	return music_album_image_type_id;
}

GType
music_album_image_get_type (void)
{
	static volatile gsize music_album_image_type_id__once = 0;
	if (g_once_init_enter (&music_album_image_type_id__once)) {
		GType music_album_image_type_id;
		music_album_image_type_id = music_album_image_get_type_once ();
		g_once_init_leave (&music_album_image_type_id__once, music_album_image_type_id);
	}
	return music_album_image_type_id__once;
}

