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

/*
* SPDX-License-Identifier: LGPL-2.1-or-later
* SPDX-FileCopyrightText: 2015-2025 elementary, Inc. (https://elementary.io)
*/

#include "notifications.h"
#include <gtk/gtk.h>
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <granite-7.h>
#include <glib/gi18n-lib.h>
#include <adwaita.h>
#include <gio/gio.h>
#include <gio/gdesktopappinfo.h>
#include <pango/pango.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>

#define NOTIFICATIONS_NOTIFICATION_ENTRY_ICON_SIZE_PRIMARY 48
#define NOTIFICATIONS_NOTIFICATION_ENTRY_ICON_SIZE_SECONDARY 24
#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

enum  {
	NOTIFICATIONS_NOTIFICATION_ENTRY_0_PROPERTY,
	NOTIFICATIONS_NOTIFICATION_ENTRY_NOTIFICATION_PROPERTY,
	NOTIFICATIONS_NOTIFICATION_ENTRY_REVEALER_PROPERTY,
	NOTIFICATIONS_NOTIFICATION_ENTRY_NUM_PROPERTIES
};
static GParamSpec* notifications_notification_entry_properties[NOTIFICATIONS_NOTIFICATION_ENTRY_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define NOTIFICATIONS_NOTIFICATION_ENTRY_TYPE_DELETE_AFFORDANCE (notifications_notification_entry_delete_affordance_get_type ())
#define NOTIFICATIONS_NOTIFICATION_ENTRY_DELETE_AFFORDANCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NOTIFICATIONS_NOTIFICATION_ENTRY_TYPE_DELETE_AFFORDANCE, NotificationsNotificationEntryDeleteAffordance))
#define NOTIFICATIONS_NOTIFICATION_ENTRY_DELETE_AFFORDANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NOTIFICATIONS_NOTIFICATION_ENTRY_TYPE_DELETE_AFFORDANCE, NotificationsNotificationEntryDeleteAffordanceClass))
#define NOTIFICATIONS_NOTIFICATION_ENTRY_IS_DELETE_AFFORDANCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NOTIFICATIONS_NOTIFICATION_ENTRY_TYPE_DELETE_AFFORDANCE))
#define NOTIFICATIONS_NOTIFICATION_ENTRY_IS_DELETE_AFFORDANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NOTIFICATIONS_NOTIFICATION_ENTRY_TYPE_DELETE_AFFORDANCE))
#define NOTIFICATIONS_NOTIFICATION_ENTRY_DELETE_AFFORDANCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NOTIFICATIONS_NOTIFICATION_ENTRY_TYPE_DELETE_AFFORDANCE, NotificationsNotificationEntryDeleteAffordanceClass))

typedef struct _NotificationsNotificationEntryDeleteAffordance NotificationsNotificationEntryDeleteAffordance;
typedef struct _NotificationsNotificationEntryDeleteAffordanceClass NotificationsNotificationEntryDeleteAffordanceClass;
typedef struct _NotificationsNotificationEntryDeleteAffordancePrivate NotificationsNotificationEntryDeleteAffordancePrivate;
enum  {
	NOTIFICATIONS_NOTIFICATION_ENTRY_DELETE_AFFORDANCE_0_PROPERTY,
	NOTIFICATIONS_NOTIFICATION_ENTRY_DELETE_AFFORDANCE_ALIGNMENT_PROPERTY,
	NOTIFICATIONS_NOTIFICATION_ENTRY_DELETE_AFFORDANCE_NUM_PROPERTIES
};
static GParamSpec* notifications_notification_entry_delete_affordance_properties[NOTIFICATIONS_NOTIFICATION_ENTRY_DELETE_AFFORDANCE_NUM_PROPERTIES];
typedef struct _Block2Data Block2Data;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
enum  {
	NOTIFICATIONS_NOTIFICATION_ENTRY_CLEAR_SIGNAL,
	NOTIFICATIONS_NOTIFICATION_ENTRY_NUM_SIGNALS
};
static guint notifications_notification_entry_signals[NOTIFICATIONS_NOTIFICATION_ENTRY_NUM_SIGNALS] = {0};

struct _NotificationsNotificationEntryPrivate {
	NotificationsNotification* _notification;
	GtkRevealer* _revealer;
	guint timeout_id;
};

struct _NotificationsNotificationEntryDeleteAffordance {
	GraniteBin parent_instance;
	NotificationsNotificationEntryDeleteAffordancePrivate * priv;
};

struct _NotificationsNotificationEntryDeleteAffordanceClass {
	GraniteBinClass parent_class;
};

struct _NotificationsNotificationEntryDeleteAffordancePrivate {
	GtkAlign _alignment;
};

struct _Block2Data {
	int _ref_count_;
	NotificationsNotificationEntry* self;
	GtkLabel* time_label;
	GtkRevealer* delete_revealer;
	AdwCarousel* carousel;
};

static gint NotificationsNotificationEntry_private_offset;
static gpointer notifications_notification_entry_parent_class = NULL;
static GRegex* notifications_notification_entry_entity_regex;
static GRegex* notifications_notification_entry_entity_regex = NULL;
static GRegex* notifications_notification_entry_tag_regex;
static GRegex* notifications_notification_entry_tag_regex = NULL;
static gint NotificationsNotificationEntryDeleteAffordance_private_offset;
static gpointer notifications_notification_entry_delete_affordance_parent_class = NULL;

static void ___lambda4_ (NotificationsNotificationEntry* self);
static void ____lambda4__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static GVariant* _variant_new1 (guint32 value);
static gchar* notifications_notification_entry_fix_markup (NotificationsNotificationEntry* self,
                                                    const gchar* markup);
static GType notifications_notification_entry_delete_affordance_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static NotificationsNotificationEntryDeleteAffordance* notifications_notification_entry_delete_affordance_new (GtkAlign alignment);
static NotificationsNotificationEntryDeleteAffordance* notifications_notification_entry_delete_affordance_construct (GType object_type,
                                                                                                              GtkAlign alignment);
static GtkAlign notifications_notification_entry_delete_affordance_get_alignment (NotificationsNotificationEntryDeleteAffordance* self);
static void notifications_notification_entry_delete_affordance_set_alignment (NotificationsNotificationEntryDeleteAffordance* self,
                                                                       GtkAlign value);
static GObject * notifications_notification_entry_delete_affordance_constructor (GType type,
                                                                          guint n_construct_properties,
                                                                          GObjectConstructParam * construct_properties);
static void notifications_notification_entry_delete_affordance_finalize (GObject * obj);
static GType notifications_notification_entry_delete_affordance_get_type_once (void);
static void _vala_notifications_notification_entry_delete_affordance_get_property (GObject * object,
                                                                            guint property_id,
                                                                            GValue * value,
                                                                            GParamSpec * pspec);
static void _vala_notifications_notification_entry_delete_affordance_set_property (GObject * object,
                                                                            guint property_id,
                                                                            const GValue * value,
                                                                            GParamSpec * pspec);
static GObject * notifications_notification_entry_constructor (GType type,
                                                        guint n_construct_properties,
                                                        GObjectConstructParam * construct_properties);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static void _notifications_notification_entry___lambda5_ (NotificationsNotificationEntry* self);
static void __notifications_notification_entry___lambda5__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self);
static void _notifications_notification_entry___lambda6_ (Block2Data* _data2_);
static void __notifications_notification_entry___lambda6__gtk_event_controller_motion_enter (GtkEventControllerMotion* _sender,
                                                                                      gdouble x,
                                                                                      gdouble y,
                                                                                      gpointer self);
static void _notifications_notification_entry___lambda7_ (Block2Data* _data2_);
static void __notifications_notification_entry___lambda7__gtk_event_controller_motion_leave (GtkEventControllerMotion* _sender,
                                                                                      gpointer self);
static gboolean _notifications_notification_entry___lambda8_ (Block2Data* _data2_);
static gboolean __notifications_notification_entry___lambda8__gsource_func (gpointer self);
static void _notifications_notification_entry___lambda9_ (Block2Data* _data2_);
static void __notifications_notification_entry___lambda9__adw_carousel_page_changed (AdwCarousel* _sender,
                                                                              guint index,
                                                                              gpointer self);
static void notifications_notification_entry_finalize (GObject * obj);
static GType notifications_notification_entry_get_type_once (void);
static void _vala_notifications_notification_entry_get_property (GObject * object,
                                                          guint property_id,
                                                          GValue * value,
                                                          GParamSpec * pspec);
static void _vala_notifications_notification_entry_set_property (GObject * object,
                                                          guint property_id,
                                                          const GValue * value,
                                                          GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

static inline gpointer
notifications_notification_entry_get_instance_private (NotificationsNotificationEntry* self)
{
	return G_STRUCT_MEMBER_P (self, NotificationsNotificationEntry_private_offset);
}

NotificationsNotificationEntry*
notifications_notification_entry_construct (GType object_type,
                                            NotificationsNotification* notification)
{
	NotificationsNotificationEntry * self = NULL;
	g_return_val_if_fail (notification != NULL, NULL);
	self = (NotificationsNotificationEntry*) g_object_new (object_type, "notification", notification, NULL);
	return self;
}

NotificationsNotificationEntry*
notifications_notification_entry_new (NotificationsNotification* notification)
{
	return notifications_notification_entry_construct (NOTIFICATIONS_TYPE_NOTIFICATION_ENTRY, notification);
}

static void
___lambda4_ (NotificationsNotificationEntry* self)
{
	GtkRevealer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	_tmp0_ = self->priv->_revealer;
	_tmp1_ = gtk_revealer_get_child_revealed (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		GtkWidget* _tmp3_;
		GtkWidget* _tmp4_;
		_tmp3_ = gtk_widget_get_parent ((GtkWidget*) self);
		_tmp4_ = _tmp3_;
		gtk_list_box_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_list_box_get_type (), GtkListBox), (GtkWidget*) self);
	}
}

static void
____lambda4__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	___lambda4_ ((NotificationsNotificationEntry*) self);
}

static GVariant*
_variant_new1 (guint32 value)
{
	return g_variant_ref_sink (g_variant_new_uint32 (value));
}

void
notifications_notification_entry_dismiss (NotificationsNotificationEntry* self)
{
	GtkRevealer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	NotificationsNotification* _tmp7_;
	guint32 _tmp8_;
	guint32 _tmp9_;
	g_return_if_fail (self != NULL);
	g_source_remove (self->priv->timeout_id);
	_tmp0_ = self->priv->_revealer;
	_tmp1_ = gtk_revealer_get_child_revealed (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		GtkWidget* _tmp3_;
		GtkWidget* _tmp4_;
		_tmp3_ = gtk_widget_get_parent ((GtkWidget*) self);
		_tmp4_ = _tmp3_;
		gtk_list_box_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_list_box_get_type (), GtkListBox), (GtkWidget*) self);
	} else {
		GtkRevealer* _tmp5_;
		GtkRevealer* _tmp6_;
		_tmp5_ = self->priv->_revealer;
		g_signal_connect_object ((GObject*) _tmp5_, "notify::child-revealed", (GCallback) ____lambda4__g_object_notify, self, 0);
		_tmp6_ = self->priv->_revealer;
		gtk_revealer_set_reveal_child (_tmp6_, FALSE);
	}
	_tmp7_ = self->priv->_notification;
	_tmp8_ = notifications_notification_get_server_id (_tmp7_);
	_tmp9_ = _tmp8_;
	if (_tmp9_ > ((guint32) 0)) {
		const GVariantType* _tmp10_;
		NotificationsNotification* _tmp11_;
		guint32 _tmp12_;
		guint32 _tmp13_;
		GVariant* _tmp14_;
		GVariant** _tmp15_;
		GVariant** _tmp16_;
		gint _tmp16__length1;
		GVariant* _tmp17_;
		GVariant* _tmp18_;
		_tmp10_ = G_VARIANT_TYPE_UINT32;
		_tmp11_ = self->priv->_notification;
		_tmp12_ = notifications_notification_get_server_id (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = _variant_new1 (_tmp13_);
		_tmp15_ = g_new0 (GVariant*, 1 + 1);
		_tmp15_[0] = _tmp14_;
		_tmp16_ = _tmp15_;
		_tmp16__length1 = 1;
		_tmp17_ = g_variant_new_array (_tmp10_, _tmp16_, 1);
		g_variant_ref_sink (_tmp17_);
		_tmp18_ = _tmp17_;
		gtk_widget_activate_action_variant ((GtkWidget*) self, NOTIFICATIONS_NOTIFICATIONS_LIST_ACTION_PREFIX "close", _tmp18_);
		_g_variant_unref0 (_tmp18_);
		_tmp16_ = (_vala_array_free (_tmp16_, _tmp16__length1, (GDestroyNotify) g_variant_unref), NULL);
	}
}

/**
     * Copied from gnome-shell, fixes the mess of markup that is sent to us
     */
static gchar*
notifications_notification_entry_fix_markup (NotificationsNotificationEntry* self,
                                             const gchar* markup)
{
	gchar* text = NULL;
	gchar* _tmp0_;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (markup != NULL, NULL);
	_tmp0_ = g_strdup (markup);
	text = _tmp0_;
	{
		gchar* _tmp1_ = NULL;
		GRegex* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		_tmp2_ = notifications_notification_entry_entity_regex;
		_tmp3_ = strlen (markup);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_replace (_tmp2_, markup, (gssize) _tmp4_, 0, "&amp;", 0, &_inner_error0_);
		_tmp1_ = _tmp5_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp6_ = _tmp1_;
		_tmp1_ = NULL;
		_g_free0 (text);
		text = _tmp6_;
		_tmp8_ = notifications_notification_entry_tag_regex;
		_tmp9_ = text;
		_tmp10_ = text;
		_tmp11_ = strlen (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = g_regex_replace (_tmp8_, _tmp9_, (gssize) _tmp12_, 0, "&lt;", 0, &_inner_error0_);
		_tmp7_ = _tmp13_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (_tmp1_);
			goto __catch0_g_error;
		}
		_tmp14_ = _tmp7_;
		_tmp7_ = NULL;
		_g_free0 (text);
		text = _tmp14_;
		_g_free0 (_tmp7_);
		_g_free0 (_tmp1_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp15_;
		const gchar* _tmp16_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp15_ = e;
		_tmp16_ = _tmp15_->message;
		g_warning ("NotificationEntry.vala:318: Invalid regex: %s", _tmp16_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (text);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	result = text;
	return result;
}

NotificationsNotification*
notifications_notification_entry_get_notification (NotificationsNotificationEntry* self)
{
	NotificationsNotification* result;
	NotificationsNotification* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_notification;
	result = _tmp0_;
	return result;
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
notifications_notification_entry_set_notification (NotificationsNotificationEntry* self,
                                                   NotificationsNotification* value)
{
	NotificationsNotification* old_value;
	g_return_if_fail (self != NULL);
	old_value = notifications_notification_entry_get_notification (self);
	if (old_value != value) {
		NotificationsNotification* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_notification);
		self->priv->_notification = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, notifications_notification_entry_properties[NOTIFICATIONS_NOTIFICATION_ENTRY_NOTIFICATION_PROPERTY]);
	}
}

GtkRevealer*
notifications_notification_entry_get_revealer (NotificationsNotificationEntry* self)
{
	GtkRevealer* result;
	GtkRevealer* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_revealer;
	result = _tmp0_;
	return result;
}

static void
notifications_notification_entry_set_revealer (NotificationsNotificationEntry* self,
                                               GtkRevealer* value)
{
	GtkRevealer* old_value;
	g_return_if_fail (self != NULL);
	old_value = notifications_notification_entry_get_revealer (self);
	if (old_value != value) {
		GtkRevealer* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_revealer);
		self->priv->_revealer = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, notifications_notification_entry_properties[NOTIFICATIONS_NOTIFICATION_ENTRY_REVEALER_PROPERTY]);
	}
}

static inline gpointer
notifications_notification_entry_delete_affordance_get_instance_private (NotificationsNotificationEntryDeleteAffordance* self)
{
	return G_STRUCT_MEMBER_P (self, NotificationsNotificationEntryDeleteAffordance_private_offset);
}

static NotificationsNotificationEntryDeleteAffordance*
notifications_notification_entry_delete_affordance_construct (GType object_type,
                                                              GtkAlign alignment)
{
	NotificationsNotificationEntryDeleteAffordance * self = NULL;
	self = (NotificationsNotificationEntryDeleteAffordance*) g_object_new (object_type, "alignment", alignment, NULL);
	return self;
}

static NotificationsNotificationEntryDeleteAffordance*
notifications_notification_entry_delete_affordance_new (GtkAlign alignment)
{
	return notifications_notification_entry_delete_affordance_construct (NOTIFICATIONS_NOTIFICATION_ENTRY_TYPE_DELETE_AFFORDANCE, alignment);
}

static GtkAlign
notifications_notification_entry_delete_affordance_get_alignment (NotificationsNotificationEntryDeleteAffordance* self)
{
	GtkAlign result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_alignment;
	return result;
}

static void
notifications_notification_entry_delete_affordance_set_alignment (NotificationsNotificationEntryDeleteAffordance* self,
                                                                  GtkAlign value)
{
	GtkAlign old_value;
	g_return_if_fail (self != NULL);
	old_value = notifications_notification_entry_delete_affordance_get_alignment (self);
	if (old_value != value) {
		self->priv->_alignment = value;
		g_object_notify_by_pspec ((GObject *) self, notifications_notification_entry_delete_affordance_properties[NOTIFICATIONS_NOTIFICATION_ENTRY_DELETE_AFFORDANCE_ALIGNMENT_PROPERTY]);
	}
}

static GObject *
notifications_notification_entry_delete_affordance_constructor (GType type,
                                                                guint n_construct_properties,
                                                                GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	NotificationsNotificationEntryDeleteAffordance * self;
	GtkImage* image = NULL;
	GtkImage* _tmp0_;
	GtkLabel* label = NULL;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	GtkBox* box = NULL;
	GtkAlign _tmp3_;
	GtkBox* _tmp4_ = NULL;
	GtkBox* _tmp5_;
	GtkImage* _tmp6_;
	GtkBox* _tmp7_;
	GtkLabel* _tmp8_;
	GtkBox* _tmp9_;
	parent_class = G_OBJECT_CLASS (notifications_notification_entry_delete_affordance_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, NOTIFICATIONS_NOTIFICATION_ENTRY_TYPE_DELETE_AFFORDANCE, NotificationsNotificationEntryDeleteAffordance);
	_tmp0_ = (GtkImage*) gtk_image_new_from_icon_name ("edit-delete-symbolic");
	g_object_ref_sink (_tmp0_);
	image = _tmp0_;
	_tmp1_ = (GtkLabel*) gtk_label_new (_ ("Delete"));
	g_object_ref_sink (_tmp1_);
	label = _tmp1_;
	_tmp2_ = label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp2_, GRANITE_CSS_CLASS_SMALL);
	_tmp3_ = self->priv->_alignment;
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, _tmp3_);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp4_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp4_, GTK_ALIGN_CENTER);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp4_, TRUE);
	g_object_ref_sink (_tmp4_);
	box = _tmp4_;
	_tmp5_ = box;
	_tmp6_ = image;
	gtk_box_append (_tmp5_, (GtkWidget*) _tmp6_);
	_tmp7_ = box;
	_tmp8_ = label;
	gtk_box_append (_tmp7_, (GtkWidget*) _tmp8_);
	_tmp9_ = box;
	granite_bin_set_child ((GraniteBin*) self, (GtkWidget*) _tmp9_);
	_g_object_unref0 (box);
	_g_object_unref0 (label);
	_g_object_unref0 (image);
	return obj;
}

static void
notifications_notification_entry_delete_affordance_base_init (NotificationsNotificationEntryDeleteAffordanceClass * klass)
{
	gtk_widget_class_set_css_name (GTK_WIDGET_CLASS (klass), "delete-affordance");
}

static void
notifications_notification_entry_delete_affordance_class_init (NotificationsNotificationEntryDeleteAffordanceClass * klass,
                                                               gpointer klass_data)
{
	notifications_notification_entry_delete_affordance_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &NotificationsNotificationEntryDeleteAffordance_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_notifications_notification_entry_delete_affordance_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_notifications_notification_entry_delete_affordance_set_property;
	G_OBJECT_CLASS (klass)->constructor = notifications_notification_entry_delete_affordance_constructor;
	G_OBJECT_CLASS (klass)->finalize = notifications_notification_entry_delete_affordance_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), NOTIFICATIONS_NOTIFICATION_ENTRY_DELETE_AFFORDANCE_ALIGNMENT_PROPERTY, notifications_notification_entry_delete_affordance_properties[NOTIFICATIONS_NOTIFICATION_ENTRY_DELETE_AFFORDANCE_ALIGNMENT_PROPERTY] = g_param_spec_enum ("alignment", "alignment", "alignment", gtk_align_get_type (), 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
notifications_notification_entry_delete_affordance_instance_init (NotificationsNotificationEntryDeleteAffordance * self,
                                                                  gpointer klass)
{
	self->priv = notifications_notification_entry_delete_affordance_get_instance_private (self);
}

static void
notifications_notification_entry_delete_affordance_finalize (GObject * obj)
{
	NotificationsNotificationEntryDeleteAffordance * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, NOTIFICATIONS_NOTIFICATION_ENTRY_TYPE_DELETE_AFFORDANCE, NotificationsNotificationEntryDeleteAffordance);
	G_OBJECT_CLASS (notifications_notification_entry_delete_affordance_parent_class)->finalize (obj);
}

static GType
notifications_notification_entry_delete_affordance_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (NotificationsNotificationEntryDeleteAffordanceClass), (GBaseInitFunc) notifications_notification_entry_delete_affordance_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) notifications_notification_entry_delete_affordance_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NotificationsNotificationEntryDeleteAffordance), 0, (GInstanceInitFunc) notifications_notification_entry_delete_affordance_instance_init, NULL };
	GType notifications_notification_entry_delete_affordance_type_id;
	notifications_notification_entry_delete_affordance_type_id = g_type_register_static (GRANITE_TYPE_BIN, "NotificationsNotificationEntryDeleteAffordance", &g_define_type_info, 0);
	NotificationsNotificationEntryDeleteAffordance_private_offset = g_type_add_instance_private (notifications_notification_entry_delete_affordance_type_id, sizeof (NotificationsNotificationEntryDeleteAffordancePrivate));
	return notifications_notification_entry_delete_affordance_type_id;
}

static GType
notifications_notification_entry_delete_affordance_get_type (void)
{
	static volatile gsize notifications_notification_entry_delete_affordance_type_id__once = 0;
	if (g_once_init_enter (&notifications_notification_entry_delete_affordance_type_id__once)) {
		GType notifications_notification_entry_delete_affordance_type_id;
		notifications_notification_entry_delete_affordance_type_id = notifications_notification_entry_delete_affordance_get_type_once ();
		g_once_init_leave (&notifications_notification_entry_delete_affordance_type_id__once, notifications_notification_entry_delete_affordance_type_id);
	}
	return notifications_notification_entry_delete_affordance_type_id__once;
}

static void
_vala_notifications_notification_entry_delete_affordance_get_property (GObject * object,
                                                                       guint property_id,
                                                                       GValue * value,
                                                                       GParamSpec * pspec)
{
	NotificationsNotificationEntryDeleteAffordance * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, NOTIFICATIONS_NOTIFICATION_ENTRY_TYPE_DELETE_AFFORDANCE, NotificationsNotificationEntryDeleteAffordance);
	switch (property_id) {
		case NOTIFICATIONS_NOTIFICATION_ENTRY_DELETE_AFFORDANCE_ALIGNMENT_PROPERTY:
		g_value_set_enum (value, notifications_notification_entry_delete_affordance_get_alignment (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_notifications_notification_entry_delete_affordance_set_property (GObject * object,
                                                                       guint property_id,
                                                                       const GValue * value,
                                                                       GParamSpec * pspec)
{
	NotificationsNotificationEntryDeleteAffordance * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, NOTIFICATIONS_NOTIFICATION_ENTRY_TYPE_DELETE_AFFORDANCE, NotificationsNotificationEntryDeleteAffordance);
	switch (property_id) {
		case NOTIFICATIONS_NOTIFICATION_ENTRY_DELETE_AFFORDANCE_ALIGNMENT_PROPERTY:
		notifications_notification_entry_delete_affordance_set_alignment (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static Block2Data*
block2_data_ref (Block2Data* _data2_)
{
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}

static void
block2_data_unref (void * _userdata_)
{
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		NotificationsNotificationEntry* self;
		self = _data2_->self;
		_g_object_unref0 (_data2_->carousel);
		_g_object_unref0 (_data2_->delete_revealer);
		_g_object_unref0 (_data2_->time_label);
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static void
_notifications_notification_entry___lambda5_ (NotificationsNotificationEntry* self)
{
	g_signal_emit (self, notifications_notification_entry_signals[NOTIFICATIONS_NOTIFICATION_ENTRY_CLEAR_SIGNAL], 0);
}

static void
__notifications_notification_entry___lambda5__gtk_button_clicked (GtkButton* _sender,
                                                                  gpointer self)
{
	_notifications_notification_entry___lambda5_ ((NotificationsNotificationEntry*) self);
}

static void
_notifications_notification_entry___lambda6_ (Block2Data* _data2_)
{
	NotificationsNotificationEntry* self;
	GtkRevealer* _tmp0_;
	self = _data2_->self;
	_tmp0_ = _data2_->delete_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, TRUE);
}

static void
__notifications_notification_entry___lambda6__gtk_event_controller_motion_enter (GtkEventControllerMotion* _sender,
                                                                                 gdouble x,
                                                                                 gdouble y,
                                                                                 gpointer self)
{
	_notifications_notification_entry___lambda6_ (self);
}

static void
_notifications_notification_entry___lambda7_ (Block2Data* _data2_)
{
	NotificationsNotificationEntry* self;
	GtkRevealer* _tmp0_;
	self = _data2_->self;
	_tmp0_ = _data2_->delete_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
}

static void
__notifications_notification_entry___lambda7__gtk_event_controller_motion_leave (GtkEventControllerMotion* _sender,
                                                                                 gpointer self)
{
	_notifications_notification_entry___lambda7_ (self);
}

static gboolean
_notifications_notification_entry___lambda8_ (Block2Data* _data2_)
{
	NotificationsNotificationEntry* self;
	GtkLabel* _tmp0_;
	NotificationsNotification* _tmp1_;
	GDateTime* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean result;
	self = _data2_->self;
	_tmp0_ = _data2_->time_label;
	_tmp1_ = self->priv->_notification;
	_tmp2_ = _tmp1_->timestamp;
	_tmp3_ = granite_date_time_get_relative_datetime (_tmp2_);
	_tmp4_ = _tmp3_;
	gtk_label_set_label (_tmp0_, _tmp4_);
	_g_free0 (_tmp4_);
	result = G_SOURCE_CONTINUE;
	return result;
}

static gboolean
__notifications_notification_entry___lambda8__gsource_func (gpointer self)
{
	gboolean result;
	result = _notifications_notification_entry___lambda8_ (self);
	return result;
}

static void
_notifications_notification_entry___lambda9_ (Block2Data* _data2_)
{
	NotificationsNotificationEntry* self;
	AdwCarousel* _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	self = _data2_->self;
	_tmp0_ = _data2_->carousel;
	_tmp1_ = adw_carousel_get_position (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != ((gdouble) 1)) {
		g_signal_emit (self, notifications_notification_entry_signals[NOTIFICATIONS_NOTIFICATION_ENTRY_CLEAR_SIGNAL], 0);
	}
}

static void
__notifications_notification_entry___lambda9__adw_carousel_page_changed (AdwCarousel* _sender,
                                                                         guint index,
                                                                         gpointer self)
{
	_notifications_notification_entry___lambda9_ (self);
}

static GObject *
notifications_notification_entry_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	NotificationsNotificationEntry * self;
	Block2Data* _data2_;
	GtkImage* app_image = NULL;
	GtkImage* _tmp0_;
	NotificationsNotification* _tmp1_;
	const gchar* _tmp2_;
	GtkOverlay* image_overlay = NULL;
	GtkOverlay* _tmp15_ = NULL;
	gboolean _tmp16_ = FALSE;
	NotificationsNotification* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* entry_title = NULL;
	NotificationsNotification* _tmp53_;
	const gchar* _tmp54_;
	gchar* _tmp55_;
	NotificationsNotification* _tmp56_;
	const gchar* _tmp57_;
	GtkLabel* title_label = NULL;
	const gchar* _tmp71_;
	gchar* _tmp72_;
	gchar* _tmp73_;
	GtkLabel* _tmp74_ = NULL;
	GtkLabel* _tmp75_;
	GtkLabel* _tmp76_;
	NotificationsNotification* _tmp77_;
	GDateTime* _tmp78_;
	gchar* _tmp79_;
	gchar* _tmp80_;
	GtkLabel* _tmp81_ = NULL;
	GtkLabel* _tmp82_;
	GtkLabel* _tmp83_;
	GtkGrid* grid = NULL;
	GtkGrid* _tmp84_ = NULL;
	GtkGrid* _tmp85_;
	GtkButton* delete_button = NULL;
	GtkButton* _tmp86_ = NULL;
	GtkButton* _tmp87_;
	GtkButton* _tmp88_;
	GtkWidget* _tmp89_;
	GtkRevealer* _tmp90_ = NULL;
	GtkGrid* _tmp91_;
	GtkOverlay* _tmp92_;
	GtkGrid* _tmp93_;
	GtkLabel* _tmp94_;
	GtkGrid* _tmp95_;
	GtkLabel* _tmp96_;
	gchar* entry_body = NULL;
	NotificationsNotification* _tmp97_;
	const gchar* _tmp98_;
	gchar* _tmp99_;
	const gchar* _tmp100_;
	gchar* body = NULL;
	const gchar* _tmp104_;
	gchar* _tmp105_;
	GtkLabel* body_label = NULL;
	const gchar* _tmp106_;
	GtkLabel* _tmp107_ = NULL;
	const gchar* _tmp108_;
	GtkGrid* _tmp131_;
	GtkLabel* _tmp132_;
	NotificationsNotification* _tmp133_;
	GList* _tmp134_;
	NotificationsNotificationEntryDeleteAffordance* delete_left = NULL;
	NotificationsNotificationEntryDeleteAffordance* _tmp143_ = NULL;
	NotificationsNotificationEntryDeleteAffordance* _tmp144_;
	NotificationsNotificationEntryDeleteAffordance* delete_right = NULL;
	NotificationsNotificationEntryDeleteAffordance* _tmp145_ = NULL;
	NotificationsNotificationEntryDeleteAffordance* _tmp146_;
	GtkOverlay* overlay = NULL;
	GtkGrid* _tmp147_;
	GtkWidget* _tmp148_;
	GtkOverlay* _tmp149_ = NULL;
	GtkOverlay* _tmp150_;
	GtkRevealer* _tmp151_;
	AdwCarousel* _tmp152_ = NULL;
	AdwCarousel* _tmp153_;
	GtkOverlay* _tmp154_;
	AdwCarousel* _tmp155_;
	NotificationsNotificationEntryDeleteAffordance* _tmp156_;
	AdwCarousel* _tmp157_;
	NotificationsNotificationEntryDeleteAffordance* _tmp158_;
	AdwCarousel* _tmp159_;
	GtkWidget* _tmp160_;
	GtkRevealer* _tmp161_ = NULL;
	GtkRevealer* _tmp162_;
	GtkRevealer* _tmp163_;
	GtkButton* _tmp164_;
	GtkEventControllerMotion* motion_controller = NULL;
	GtkEventControllerMotion* _tmp165_;
	GtkEventControllerMotion* _tmp166_;
	GtkEventControllerMotion* _tmp167_;
	GtkRevealer* _tmp168_;
	GtkEventControllerMotion* _tmp169_;
	GtkEventController* _tmp170_;
	AdwCarousel* _tmp171_;
	GError* _inner_error0_ = NULL;
	parent_class = G_OBJECT_CLASS (notifications_notification_entry_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, NOTIFICATIONS_TYPE_NOTIFICATION_ENTRY, NotificationsNotificationEntry);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = g_object_ref (self);
	_tmp0_ = (GtkImage*) gtk_image_new ();
	g_object_ref_sink (_tmp0_);
	app_image = _tmp0_;
	_tmp1_ = self->priv->_notification;
	_tmp2_ = _tmp1_->app_icon;
	if (string_contains (_tmp2_, "/")) {
		GFile* file = NULL;
		NotificationsNotification* _tmp3_;
		const gchar* _tmp4_;
		GFile* _tmp5_;
		GFile* _tmp6_;
		_tmp3_ = self->priv->_notification;
		_tmp4_ = _tmp3_->app_icon;
		_tmp5_ = g_file_new_for_uri (_tmp4_);
		file = _tmp5_;
		_tmp6_ = file;
		if (g_file_query_exists (_tmp6_, NULL)) {
			GtkImage* _tmp7_;
			GFile* _tmp8_;
			GFileIcon* _tmp9_;
			GFileIcon* _tmp10_;
			_tmp7_ = app_image;
			_tmp8_ = file;
			_tmp9_ = (GFileIcon*) g_file_icon_new (_tmp8_);
			_tmp10_ = _tmp9_;
			g_object_set (_tmp7_, "gicon", (GIcon*) _tmp10_, NULL);
			_g_object_unref0 (_tmp10_);
		} else {
			GtkImage* _tmp11_;
			_tmp11_ = app_image;
			g_object_set (_tmp11_, "icon-name", "dialog-information", NULL);
		}
		_g_object_unref0 (file);
	} else {
		GtkImage* _tmp12_;
		NotificationsNotification* _tmp13_;
		const gchar* _tmp14_;
		_tmp12_ = app_image;
		_tmp13_ = self->priv->_notification;
		_tmp14_ = _tmp13_->app_icon;
		g_object_set (_tmp12_, "icon-name", _tmp14_, NULL);
	}
	_tmp15_ = (GtkOverlay*) gtk_overlay_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp15_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp15_);
	image_overlay = _tmp15_;
	_tmp17_ = self->priv->_notification;
	_tmp18_ = notifications_notification_get_image_path (_tmp17_);
	_tmp19_ = _tmp18_;
	if (_tmp19_ != NULL) {
		NotificationsNotification* _tmp20_;
		const gchar* _tmp21_;
		const gchar* _tmp22_;
		_tmp20_ = self->priv->_notification;
		_tmp21_ = notifications_notification_get_image_path (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp16_ = g_strcmp0 (_tmp22_, "") != 0;
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		{
			GtkImage* masked_image = NULL;
			NotificationsNotification* _tmp23_;
			const gchar* _tmp24_;
			const gchar* _tmp25_;
			GtkImage* _tmp26_ = NULL;
			GtkImage* _tmp27_;
			GtkImage* _tmp28_;
			GtkImage* _tmp29_;
			GtkImage* _tmp30_;
			GtkImage* _tmp31_;
			GtkOverlay* _tmp32_;
			GtkImage* _tmp33_;
			GtkOverlay* _tmp34_;
			GtkImage* _tmp35_;
			_tmp23_ = self->priv->_notification;
			_tmp24_ = notifications_notification_get_image_path (_tmp23_);
			_tmp25_ = _tmp24_;
			_tmp26_ = (GtkImage*) gtk_image_new_from_file (_tmp25_);
			gtk_image_set_pixel_size (_tmp26_, NOTIFICATIONS_NOTIFICATION_ENTRY_ICON_SIZE_PRIMARY);
			gtk_widget_set_overflow ((GtkWidget*) _tmp26_, GTK_OVERFLOW_HIDDEN);
			g_object_ref_sink (_tmp26_);
			masked_image = _tmp26_;
			_tmp27_ = masked_image;
			gtk_widget_add_css_class ((GtkWidget*) _tmp27_, GRANITE_CSS_CLASS_CARD);
			_tmp28_ = masked_image;
			gtk_widget_add_css_class ((GtkWidget*) _tmp28_, GRANITE_CSS_CLASS_CHECKERBOARD);
			_tmp29_ = app_image;
			gtk_image_set_pixel_size (_tmp29_, NOTIFICATIONS_NOTIFICATION_ENTRY_ICON_SIZE_SECONDARY);
			_tmp30_ = app_image;
			_tmp31_ = app_image;
			gtk_widget_set_valign ((GtkWidget*) _tmp31_, GTK_ALIGN_END);
			gtk_widget_set_halign ((GtkWidget*) _tmp30_, GTK_ALIGN_END);
			_tmp32_ = image_overlay;
			_tmp33_ = masked_image;
			gtk_overlay_set_child (_tmp32_, (GtkWidget*) _tmp33_);
			_tmp34_ = image_overlay;
			_tmp35_ = app_image;
			gtk_overlay_add_overlay (_tmp34_, (GtkWidget*) _tmp35_);
			_g_object_unref0 (masked_image);
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			GError* _tmp36_;
			const gchar* _tmp37_;
			GtkImage* _tmp38_;
			GtkOverlay* _tmp39_;
			GtkImage* _tmp40_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp36_ = e;
			_tmp37_ = _tmp36_->message;
			g_critical ("NotificationEntry.vala:79: Unable to mask image: %s", _tmp37_);
			_tmp38_ = app_image;
			gtk_image_set_pixel_size (_tmp38_, NOTIFICATIONS_NOTIFICATION_ENTRY_ICON_SIZE_PRIMARY);
			_tmp39_ = image_overlay;
			_tmp40_ = app_image;
			gtk_overlay_set_child (_tmp39_, (GtkWidget*) _tmp40_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (image_overlay);
			_g_object_unref0 (app_image);
			block2_data_unref (_data2_);
			_data2_ = NULL;
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
		}
	} else {
		GtkImage* _tmp41_;
		GtkOverlay* _tmp42_;
		GtkImage* _tmp43_;
		NotificationsNotification* _tmp44_;
		GIcon* _tmp45_;
		GIcon* _tmp46_;
		_tmp41_ = app_image;
		gtk_image_set_pixel_size (_tmp41_, NOTIFICATIONS_NOTIFICATION_ENTRY_ICON_SIZE_PRIMARY);
		_tmp42_ = image_overlay;
		_tmp43_ = app_image;
		gtk_overlay_set_child (_tmp42_, (GtkWidget*) _tmp43_);
		_tmp44_ = self->priv->_notification;
		_tmp45_ = notifications_notification_get_badge_icon (_tmp44_);
		_tmp46_ = _tmp45_;
		if (_tmp46_ != NULL) {
			GtkImage* badge_image = NULL;
			NotificationsNotification* _tmp47_;
			GIcon* _tmp48_;
			GIcon* _tmp49_;
			GtkImage* _tmp50_ = NULL;
			GtkOverlay* _tmp51_;
			GtkImage* _tmp52_;
			_tmp47_ = self->priv->_notification;
			_tmp48_ = notifications_notification_get_badge_icon (_tmp47_);
			_tmp49_ = _tmp48_;
			_tmp50_ = (GtkImage*) gtk_image_new_from_gicon (_tmp49_);
			gtk_widget_set_halign ((GtkWidget*) _tmp50_, GTK_ALIGN_END);
			gtk_widget_set_valign ((GtkWidget*) _tmp50_, GTK_ALIGN_END);
			gtk_image_set_pixel_size (_tmp50_, NOTIFICATIONS_NOTIFICATION_ENTRY_ICON_SIZE_SECONDARY);
			g_object_ref_sink (_tmp50_);
			badge_image = _tmp50_;
			_tmp51_ = image_overlay;
			_tmp52_ = badge_image;
			gtk_overlay_add_overlay (_tmp51_, (GtkWidget*) _tmp52_);
			_g_object_unref0 (badge_image);
		}
	}
	_tmp53_ = self->priv->_notification;
	_tmp54_ = _tmp53_->summary;
	_tmp55_ = g_strdup (_tmp54_);
	entry_title = _tmp55_;
	_tmp56_ = self->priv->_notification;
	_tmp57_ = _tmp56_->message_body;
	if (g_strcmp0 (_tmp57_, "") == 0) {
		gboolean _tmp58_ = FALSE;
		NotificationsNotification* _tmp59_;
		const gchar* _tmp60_;
		NotificationsNotification* _tmp68_;
		const gchar* _tmp69_;
		gchar* _tmp70_;
		_tmp59_ = self->priv->_notification;
		_tmp60_ = _tmp59_->app_name;
		if (g_strcmp0 (_tmp60_, "") == 0) {
			NotificationsNotification* _tmp61_;
			GDesktopAppInfo* _tmp62_;
			_tmp61_ = self->priv->_notification;
			_tmp62_ = _tmp61_->app_info;
			_tmp58_ = _tmp62_ != NULL;
		} else {
			_tmp58_ = FALSE;
		}
		if (_tmp58_) {
			NotificationsNotification* _tmp63_;
			NotificationsNotification* _tmp64_;
			GDesktopAppInfo* _tmp65_;
			const gchar* _tmp66_;
			gchar* _tmp67_;
			_tmp63_ = self->priv->_notification;
			_tmp64_ = self->priv->_notification;
			_tmp65_ = _tmp64_->app_info;
			_tmp66_ = g_app_info_get_display_name ((GAppInfo*) _tmp65_);
			_tmp67_ = g_strdup (_tmp66_);
			_g_free0 (_tmp63_->app_name);
			_tmp63_->app_name = _tmp67_;
		}
		_tmp68_ = self->priv->_notification;
		_tmp69_ = _tmp68_->app_name;
		_tmp70_ = g_strdup (_tmp69_);
		_g_free0 (entry_title);
		entry_title = _tmp70_;
	}
	_tmp71_ = entry_title;
	_tmp72_ = notifications_notification_entry_fix_markup (self, _tmp71_);
	_tmp73_ = _tmp72_;
	_tmp74_ = (GtkLabel*) gtk_label_new (_tmp73_);
	gtk_label_set_ellipsize (_tmp74_, PANGO_ELLIPSIZE_END);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp74_, TRUE);
	gtk_label_set_width_chars (_tmp74_, 27);
	gtk_label_set_max_width_chars (_tmp74_, 27);
	gtk_label_set_use_markup (_tmp74_, TRUE);
	gtk_label_set_xalign (_tmp74_, (gfloat) 0);
	g_object_ref_sink (_tmp74_);
	_tmp75_ = _tmp74_;
	_g_free0 (_tmp73_);
	title_label = _tmp75_;
	_tmp76_ = title_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp76_, "title");
	_tmp77_ = self->priv->_notification;
	_tmp78_ = _tmp77_->timestamp;
	_tmp79_ = granite_date_time_get_relative_datetime (_tmp78_);
	_tmp80_ = _tmp79_;
	_tmp81_ = (GtkLabel*) gtk_label_new (_tmp80_);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp81_, 6);
	g_object_ref_sink (_tmp81_);
	_tmp82_ = _tmp81_;
	_g_free0 (_tmp80_);
	_data2_->time_label = _tmp82_;
	_tmp83_ = _data2_->time_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp83_, GRANITE_CSS_CLASS_DIM);
	_tmp84_ = (GtkGrid*) gtk_grid_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp84_, TRUE);
	gtk_grid_set_column_spacing (_tmp84_, 6);
	g_object_ref_sink (_tmp84_);
	grid = _tmp84_;
	_tmp85_ = grid;
	gtk_widget_add_css_class ((GtkWidget*) _tmp85_, GRANITE_CSS_CLASS_CARD);
	_tmp86_ = (GtkButton*) gtk_button_new_from_icon_name ("window-close-symbolic");
	gtk_widget_set_halign ((GtkWidget*) _tmp86_, GTK_ALIGN_START);
	gtk_widget_set_valign ((GtkWidget*) _tmp86_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp86_);
	delete_button = _tmp86_;
	_tmp87_ = delete_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp87_, "close");
	_tmp88_ = delete_button;
	_tmp89_ = _g_object_ref0 ((GtkWidget*) _tmp88_);
	_tmp90_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp90_, _tmp89_);
	_g_object_unref0 (_tmp89_);
	gtk_widget_set_halign ((GtkWidget*) _tmp90_, GTK_ALIGN_START);
	gtk_widget_set_valign ((GtkWidget*) _tmp90_, GTK_ALIGN_START);
	gtk_revealer_set_reveal_child (_tmp90_, FALSE);
	gtk_widget_set_overflow ((GtkWidget*) _tmp90_, GTK_OVERFLOW_VISIBLE);
	gtk_revealer_set_transition_duration (_tmp90_, (guint) GRANITE_TRANSITION_DURATION_CLOSE);
	gtk_revealer_set_transition_type (_tmp90_, GTK_REVEALER_TRANSITION_TYPE_CROSSFADE);
	g_object_ref_sink (_tmp90_);
	_data2_->delete_revealer = _tmp90_;
	_tmp91_ = grid;
	_tmp92_ = image_overlay;
	gtk_grid_attach (_tmp91_, (GtkWidget*) _tmp92_, 0, 0, 1, 2);
	_tmp93_ = grid;
	_tmp94_ = title_label;
	gtk_grid_attach (_tmp93_, (GtkWidget*) _tmp94_, 1, 0, 1, 1);
	_tmp95_ = grid;
	_tmp96_ = _data2_->time_label;
	gtk_grid_attach (_tmp95_, (GtkWidget*) _tmp96_, 2, 0, 1, 1);
	_tmp97_ = self->priv->_notification;
	_tmp98_ = _tmp97_->message_body;
	_tmp99_ = g_strdup (_tmp98_);
	entry_body = _tmp99_;
	_tmp100_ = entry_body;
	if (g_strcmp0 (_tmp100_, "") == 0) {
		NotificationsNotification* _tmp101_;
		const gchar* _tmp102_;
		gchar* _tmp103_;
		_tmp101_ = self->priv->_notification;
		_tmp102_ = _tmp101_->summary;
		_tmp103_ = g_strdup (_tmp102_);
		_g_free0 (entry_body);
		entry_body = _tmp103_;
	}
	_tmp104_ = entry_body;
	_tmp105_ = notifications_notification_entry_fix_markup (self, _tmp104_);
	body = _tmp105_;
	_tmp106_ = body;
	_tmp107_ = (GtkLabel*) gtk_label_new (_tmp106_);
	gtk_label_set_ellipsize (_tmp107_, PANGO_ELLIPSIZE_END);
	gtk_label_set_lines (_tmp107_, 2);
	gtk_label_set_use_markup (_tmp107_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp107_, GTK_ALIGN_START);
	gtk_label_set_wrap_mode (_tmp107_, PANGO_WRAP_WORD_CHAR);
	gtk_label_set_wrap (_tmp107_, TRUE);
	gtk_label_set_xalign (_tmp107_, (gfloat) 0);
	g_object_ref_sink (_tmp107_);
	body_label = _tmp107_;
	_tmp108_ = body;
	if (string_contains (_tmp108_, "\n")) {
		gchar** lines = NULL;
		const gchar* _tmp109_;
		gchar** _tmp110_;
		gchar** _tmp111_;
		gint lines_length1;
		gint _lines_size_;
		gchar* stripped_body = NULL;
		gchar** _tmp112_;
		gint _tmp112__length1;
		const gchar* _tmp113_;
		gchar* _tmp114_;
		GtkLabel* _tmp126_;
		const gchar* _tmp127_;
		gchar* _tmp128_;
		gchar* _tmp129_;
		GtkLabel* _tmp130_;
		_tmp109_ = body;
		_tmp111_ = _tmp110_ = g_strsplit (_tmp109_, "\n", 0);
		lines = _tmp111_;
		lines_length1 = _vala_array_length (_tmp110_);
		_lines_size_ = lines_length1;
		_tmp112_ = lines;
		_tmp112__length1 = lines_length1;
		_tmp113_ = _tmp112_[0];
		_tmp114_ = g_strconcat (_tmp113_, "\n", NULL);
		stripped_body = _tmp114_;
		{
			gint i = 0;
			i = 1;
			{
				gboolean _tmp115_ = FALSE;
				_tmp115_ = TRUE;
				while (TRUE) {
					gchar** _tmp117_;
					gint _tmp117__length1;
					const gchar* _tmp118_;
					gchar** _tmp119_;
					gint _tmp119__length1;
					const gchar* _tmp120_;
					gchar* _tmp121_;
					gchar* _tmp122_;
					gchar* _tmp123_;
					gchar* _tmp124_;
					gchar* _tmp125_;
					if (!_tmp115_) {
						gint _tmp116_;
						_tmp116_ = i;
						i = _tmp116_ + 1;
					}
					_tmp115_ = FALSE;
					_tmp117_ = lines;
					_tmp117__length1 = lines_length1;
					if (!(i < _tmp117__length1)) {
						break;
					}
					_tmp118_ = stripped_body;
					_tmp119_ = lines;
					_tmp119__length1 = lines_length1;
					_tmp120_ = _tmp119_[i];
					_tmp121_ = string_strip (_tmp120_);
					_tmp122_ = _tmp121_;
					_tmp123_ = g_strconcat (_tmp122_, " ", NULL);
					_tmp124_ = _tmp123_;
					_tmp125_ = g_strconcat (_tmp118_, _tmp124_, NULL);
					_g_free0 (stripped_body);
					stripped_body = _tmp125_;
					_g_free0 (_tmp124_);
					_g_free0 (_tmp122_);
				}
			}
		}
		_tmp126_ = body_label;
		_tmp127_ = stripped_body;
		_tmp128_ = string_strip (_tmp127_);
		_tmp129_ = _tmp128_;
		gtk_label_set_label (_tmp126_, _tmp129_);
		_g_free0 (_tmp129_);
		_tmp130_ = body_label;
		gtk_label_set_lines (_tmp130_, 1);
		_g_free0 (stripped_body);
		lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp131_ = grid;
	_tmp132_ = body_label;
	gtk_grid_attach (_tmp131_, (GtkWidget*) _tmp132_, 1, 1, 2, 1);
	_tmp133_ = self->priv->_notification;
	_tmp134_ = _tmp133_->buttons;
	if (g_list_length (_tmp134_) > ((guint) 0)) {
		GtkBox* action_area = NULL;
		GtkBox* _tmp135_ = NULL;
		GtkGrid* _tmp136_;
		GtkBox* _tmp137_;
		NotificationsNotification* _tmp138_;
		GList* _tmp139_;
		_tmp135_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
		gtk_widget_set_margin_top ((GtkWidget*) _tmp135_, 12);
		gtk_widget_set_halign ((GtkWidget*) _tmp135_, GTK_ALIGN_END);
		gtk_box_set_homogeneous (_tmp135_, TRUE);
		g_object_ref_sink (_tmp135_);
		action_area = _tmp135_;
		_tmp136_ = grid;
		_tmp137_ = action_area;
		gtk_grid_attach (_tmp136_, (GtkWidget*) _tmp137_, 0, 2, 3, 1);
		_tmp138_ = self->priv->_notification;
		_tmp139_ = _tmp138_->buttons;
		{
			GList* button_collection = NULL;
			GList* button_it = NULL;
			button_collection = _tmp139_;
			for (button_it = button_collection; button_it != NULL; button_it = button_it->next) {
				GtkButton* _tmp140_;
				GtkButton* button = NULL;
				_tmp140_ = _g_object_ref0 ((GtkButton*) button_it->data);
				button = _tmp140_;
				{
					GtkBox* _tmp141_;
					GtkButton* _tmp142_;
					_tmp141_ = action_area;
					_tmp142_ = button;
					gtk_box_append (_tmp141_, (GtkWidget*) _tmp142_);
					_g_object_unref0 (button);
				}
			}
		}
		_g_object_unref0 (action_area);
	}
	_tmp143_ = notifications_notification_entry_delete_affordance_new (GTK_ALIGN_END);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp143_, 9);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp143_, 9);
	g_object_ref_sink (_tmp143_);
	delete_left = _tmp143_;
	_tmp144_ = delete_left;
	gtk_widget_add_css_class ((GtkWidget*) _tmp144_, "left");
	_tmp145_ = notifications_notification_entry_delete_affordance_new (GTK_ALIGN_START);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp145_, 9);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp145_, 9);
	g_object_ref_sink (_tmp145_);
	delete_right = _tmp145_;
	_tmp146_ = delete_right;
	gtk_widget_add_css_class ((GtkWidget*) _tmp146_, "right");
	_tmp147_ = grid;
	_tmp148_ = _g_object_ref0 ((GtkWidget*) _tmp147_);
	_tmp149_ = (GtkOverlay*) gtk_overlay_new ();
	gtk_overlay_set_child (_tmp149_, _tmp148_);
	_g_object_unref0 (_tmp148_);
	g_object_ref_sink (_tmp149_);
	overlay = _tmp149_;
	_tmp150_ = overlay;
	_tmp151_ = _data2_->delete_revealer;
	gtk_overlay_add_overlay (_tmp150_, (GtkWidget*) _tmp151_);
	_tmp152_ = (AdwCarousel*) adw_carousel_new ();
	adw_carousel_set_allow_scroll_wheel (_tmp152_, FALSE);
	g_object_ref_sink (_tmp152_);
	_data2_->carousel = _tmp152_;
	_tmp153_ = _data2_->carousel;
	_tmp154_ = overlay;
	adw_carousel_append (_tmp153_, (GtkWidget*) _tmp154_);
	_tmp155_ = _data2_->carousel;
	_tmp156_ = delete_left;
	adw_carousel_prepend (_tmp155_, (GtkWidget*) _tmp156_);
	_tmp157_ = _data2_->carousel;
	_tmp158_ = delete_right;
	adw_carousel_append (_tmp157_, (GtkWidget*) _tmp158_);
	_tmp159_ = _data2_->carousel;
	_tmp160_ = _g_object_ref0 ((GtkWidget*) _tmp159_);
	_tmp161_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp161_, _tmp160_);
	_g_object_unref0 (_tmp160_);
	gtk_revealer_set_reveal_child (_tmp161_, TRUE);
	gtk_revealer_set_transition_duration (_tmp161_, (guint) 200);
	gtk_revealer_set_transition_type (_tmp161_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
	g_object_ref_sink (_tmp161_);
	_tmp162_ = _tmp161_;
	notifications_notification_entry_set_revealer (self, _tmp162_);
	_g_object_unref0 (_tmp162_);
	_tmp163_ = self->priv->_revealer;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp163_);
	_tmp164_ = delete_button;
	g_signal_connect_object (_tmp164_, "clicked", (GCallback) __notifications_notification_entry___lambda5__gtk_button_clicked, self, 0);
	_tmp165_ = (GtkEventControllerMotion*) gtk_event_controller_motion_new ();
	motion_controller = _tmp165_;
	_tmp166_ = motion_controller;
	g_signal_connect_data (_tmp166_, "enter", (GCallback) __notifications_notification_entry___lambda6__gtk_event_controller_motion_enter, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	_tmp167_ = motion_controller;
	g_signal_connect_data (_tmp167_, "leave", (GCallback) __notifications_notification_entry___lambda7__gtk_event_controller_motion_leave, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	_tmp168_ = self->priv->_revealer;
	_tmp169_ = motion_controller;
	_tmp170_ = _g_object_ref0 ((GtkEventController*) _tmp169_);
	gtk_widget_add_controller ((GtkWidget*) _tmp168_, _tmp170_);
	self->priv->timeout_id = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 60, __notifications_notification_entry___lambda8__gsource_func, block2_data_ref (_data2_), block2_data_unref);
	_tmp171_ = _data2_->carousel;
	g_signal_connect_data (_tmp171_, "page-changed", (GCallback) __notifications_notification_entry___lambda9__adw_carousel_page_changed, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	_g_object_unref0 (motion_controller);
	_g_object_unref0 (overlay);
	_g_object_unref0 (delete_right);
	_g_object_unref0 (delete_left);
	_g_object_unref0 (body_label);
	_g_free0 (body);
	_g_free0 (entry_body);
	_g_object_unref0 (delete_button);
	_g_object_unref0 (grid);
	_g_object_unref0 (title_label);
	_g_free0 (entry_title);
	_g_object_unref0 (image_overlay);
	_g_object_unref0 (app_image);
	block2_data_unref (_data2_);
	_data2_ = NULL;
	return obj;
}

static void
notifications_notification_entry_base_init (NotificationsNotificationEntryClass * klass)
{
	GtkCssProvider* provider = NULL;
	GtkCssProvider* _tmp0_;
	GtkCssProvider* _tmp1_;
	GdkDisplay* _tmp2_;
	GtkCssProvider* _tmp3_;
	gtk_widget_class_set_css_name (GTK_WIDGET_CLASS (klass), "notification");
	_tmp0_ = gtk_css_provider_new ();
	provider = _tmp0_;
	_tmp1_ = provider;
	gtk_css_provider_load_from_resource (_tmp1_, "io/elementary/wingpanel/notifications/NotificationEntry.css");
	_tmp2_ = gdk_display_get_default ();
	_tmp3_ = provider;
	gtk_style_context_add_provider_for_display (_tmp2_, (GtkStyleProvider*) _tmp3_, (guint) GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
	_g_object_unref0 (provider);
}

static void
notifications_notification_entry_class_init (NotificationsNotificationEntryClass * klass,
                                             gpointer klass_data)
{
	GError* _inner_error0_ = NULL;
	notifications_notification_entry_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &NotificationsNotificationEntry_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_notifications_notification_entry_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_notifications_notification_entry_set_property;
	G_OBJECT_CLASS (klass)->constructor = notifications_notification_entry_constructor;
	G_OBJECT_CLASS (klass)->finalize = notifications_notification_entry_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), NOTIFICATIONS_NOTIFICATION_ENTRY_NOTIFICATION_PROPERTY, notifications_notification_entry_properties[NOTIFICATIONS_NOTIFICATION_ENTRY_NOTIFICATION_PROPERTY] = g_param_spec_object ("notification", "notification", "notification", NOTIFICATIONS_TYPE_NOTIFICATION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NOTIFICATIONS_NOTIFICATION_ENTRY_REVEALER_PROPERTY, notifications_notification_entry_properties[NOTIFICATIONS_NOTIFICATION_ENTRY_REVEALER_PROPERTY] = g_param_spec_object ("revealer", "revealer", "revealer", gtk_revealer_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	notifications_notification_entry_signals[NOTIFICATIONS_NOTIFICATION_ENTRY_CLEAR_SIGNAL] = g_signal_new ("clear", NOTIFICATIONS_TYPE_NOTIFICATION_ENTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	{
		GRegex* _tmp0_ = NULL;
		GRegex* _tmp1_;
		GRegex* _tmp2_;
		GRegex* _tmp3_ = NULL;
		GRegex* _tmp4_;
		GRegex* _tmp5_;
		_tmp1_ = g_regex_new ("&(?!amp;|quot;|apos;|lt;|gt;|nbsp;|#39)", 0, 0, &_inner_error0_);
		_tmp0_ = _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp2_ = _tmp0_;
		_tmp0_ = NULL;
		_g_regex_unref0 (notifications_notification_entry_entity_regex);
		notifications_notification_entry_entity_regex = _tmp2_;
		_tmp4_ = g_regex_new ("<(?!\\/?[biu]>)", 0, 0, &_inner_error0_);
		_tmp3_ = _tmp4_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (_tmp0_);
			goto __catch0_g_error;
		}
		_tmp5_ = _tmp3_;
		_tmp3_ = NULL;
		_g_regex_unref0 (notifications_notification_entry_tag_regex);
		notifications_notification_entry_tag_regex = _tmp5_;
		_g_regex_unref0 (_tmp3_);
		_g_regex_unref0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp6_;
		const gchar* _tmp7_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp6_ = e;
		_tmp7_ = _tmp6_->message;
		g_warning ("NotificationEntry.vala:29: Invalid regex: %s", _tmp7_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
	}
}

static void
notifications_notification_entry_instance_init (NotificationsNotificationEntry * self,
                                                gpointer klass)
{
	self->priv = notifications_notification_entry_get_instance_private (self);
}

static void
notifications_notification_entry_finalize (GObject * obj)
{
	NotificationsNotificationEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, NOTIFICATIONS_TYPE_NOTIFICATION_ENTRY, NotificationsNotificationEntry);
	_g_object_unref0 (self->priv->_notification);
	_g_object_unref0 (self->priv->_revealer);
	G_OBJECT_CLASS (notifications_notification_entry_parent_class)->finalize (obj);
}

static GType
notifications_notification_entry_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (NotificationsNotificationEntryClass), (GBaseInitFunc) notifications_notification_entry_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) notifications_notification_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NotificationsNotificationEntry), 0, (GInstanceInitFunc) notifications_notification_entry_instance_init, NULL };
	GType notifications_notification_entry_type_id;
	notifications_notification_entry_type_id = g_type_register_static (gtk_list_box_row_get_type (), "NotificationsNotificationEntry", &g_define_type_info, 0);
	NotificationsNotificationEntry_private_offset = g_type_add_instance_private (notifications_notification_entry_type_id, sizeof (NotificationsNotificationEntryPrivate));
	return notifications_notification_entry_type_id;
}

GType
notifications_notification_entry_get_type (void)
{
	static volatile gsize notifications_notification_entry_type_id__once = 0;
	if (g_once_init_enter (&notifications_notification_entry_type_id__once)) {
		GType notifications_notification_entry_type_id;
		notifications_notification_entry_type_id = notifications_notification_entry_get_type_once ();
		g_once_init_leave (&notifications_notification_entry_type_id__once, notifications_notification_entry_type_id);
	}
	return notifications_notification_entry_type_id__once;
}

static void
_vala_notifications_notification_entry_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec)
{
	NotificationsNotificationEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, NOTIFICATIONS_TYPE_NOTIFICATION_ENTRY, NotificationsNotificationEntry);
	switch (property_id) {
		case NOTIFICATIONS_NOTIFICATION_ENTRY_NOTIFICATION_PROPERTY:
		g_value_set_object (value, notifications_notification_entry_get_notification (self));
		break;
		case NOTIFICATIONS_NOTIFICATION_ENTRY_REVEALER_PROPERTY:
		g_value_set_object (value, notifications_notification_entry_get_revealer (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_notifications_notification_entry_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec)
{
	NotificationsNotificationEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, NOTIFICATIONS_TYPE_NOTIFICATION_ENTRY, NotificationsNotificationEntry);
	switch (property_id) {
		case NOTIFICATIONS_NOTIFICATION_ENTRY_NOTIFICATION_PROPERTY:
		notifications_notification_entry_set_notification (self, g_value_get_object (value));
		break;
		case NOTIFICATIONS_NOTIFICATION_ENTRY_REVEALER_PROPERTY:
		notifications_notification_entry_set_revealer (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

