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

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "dino_i18n.h"
#include "libdino.h"
#include <gtk/gtk.h>
#include <pango/pango.h>
#include <adwaita.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 DINO_UI_VIEW_MODEL_TYPE_DATE_SEPARATOR_MODEL (dino_ui_view_model_date_separator_model_get_type ())
#define DINO_UI_VIEW_MODEL_DATE_SEPARATOR_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_DATE_SEPARATOR_MODEL, DinoUiViewModelDateSeparatorModel))
#define DINO_UI_VIEW_MODEL_DATE_SEPARATOR_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_DATE_SEPARATOR_MODEL, DinoUiViewModelDateSeparatorModelClass))
#define DINO_UI_VIEW_MODEL_IS_DATE_SEPARATOR_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_DATE_SEPARATOR_MODEL))
#define DINO_UI_VIEW_MODEL_IS_DATE_SEPARATOR_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_DATE_SEPARATOR_MODEL))
#define DINO_UI_VIEW_MODEL_DATE_SEPARATOR_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_DATE_SEPARATOR_MODEL, DinoUiViewModelDateSeparatorModelClass))

typedef struct _DinoUiViewModelDateSeparatorModel DinoUiViewModelDateSeparatorModel;
typedef struct _DinoUiViewModelDateSeparatorModelClass DinoUiViewModelDateSeparatorModelClass;
typedef struct _DinoUiViewModelDateSeparatorModelPrivate DinoUiViewModelDateSeparatorModelPrivate;
enum  {
	DINO_UI_VIEW_MODEL_DATE_SEPARATOR_MODEL_0_PROPERTY,
	DINO_UI_VIEW_MODEL_DATE_SEPARATOR_MODEL_DATE_LABEL_PROPERTY,
	DINO_UI_VIEW_MODEL_DATE_SEPARATOR_MODEL_NUM_PROPERTIES
};
static GParamSpec* dino_ui_view_model_date_separator_model_properties[DINO_UI_VIEW_MODEL_DATE_SEPARATOR_MODEL_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

#define DINO_UI_VIEW_MODEL_TYPE_COMPAT_DATE_SEPARATOR_MODEL (dino_ui_view_model_compat_date_separator_model_get_type ())
#define DINO_UI_VIEW_MODEL_COMPAT_DATE_SEPARATOR_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_DATE_SEPARATOR_MODEL, DinoUiViewModelCompatDateSeparatorModel))
#define DINO_UI_VIEW_MODEL_COMPAT_DATE_SEPARATOR_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_COMPAT_DATE_SEPARATOR_MODEL, DinoUiViewModelCompatDateSeparatorModelClass))
#define DINO_UI_VIEW_MODEL_IS_COMPAT_DATE_SEPARATOR_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_DATE_SEPARATOR_MODEL))
#define DINO_UI_VIEW_MODEL_IS_COMPAT_DATE_SEPARATOR_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_COMPAT_DATE_SEPARATOR_MODEL))
#define DINO_UI_VIEW_MODEL_COMPAT_DATE_SEPARATOR_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_DATE_SEPARATOR_MODEL, DinoUiViewModelCompatDateSeparatorModelClass))

typedef struct _DinoUiViewModelCompatDateSeparatorModel DinoUiViewModelCompatDateSeparatorModel;
typedef struct _DinoUiViewModelCompatDateSeparatorModelClass DinoUiViewModelCompatDateSeparatorModelClass;
typedef struct _DinoUiViewModelCompatDateSeparatorModelPrivate DinoUiViewModelCompatDateSeparatorModelPrivate;
enum  {
	DINO_UI_VIEW_MODEL_COMPAT_DATE_SEPARATOR_MODEL_0_PROPERTY,
	DINO_UI_VIEW_MODEL_COMPAT_DATE_SEPARATOR_MODEL_NUM_PROPERTIES
};
static GParamSpec* dino_ui_view_model_compat_date_separator_model_properties[DINO_UI_VIEW_MODEL_COMPAT_DATE_SEPARATOR_MODEL_NUM_PROPERTIES];
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

#define DINO_UI_TYPE_DATE_SEPARATOR (dino_ui_date_separator_get_type ())
#define DINO_UI_DATE_SEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_DATE_SEPARATOR, DinoUiDateSeparator))
#define DINO_UI_DATE_SEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_DATE_SEPARATOR, DinoUiDateSeparatorClass))
#define DINO_UI_IS_DATE_SEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_DATE_SEPARATOR))
#define DINO_UI_IS_DATE_SEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_DATE_SEPARATOR))
#define DINO_UI_DATE_SEPARATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_DATE_SEPARATOR, DinoUiDateSeparatorClass))

typedef struct _DinoUiDateSeparator DinoUiDateSeparator;
typedef struct _DinoUiDateSeparatorClass DinoUiDateSeparatorClass;
typedef struct _DinoUiDateSeparatorPrivate DinoUiDateSeparatorPrivate;
enum  {
	DINO_UI_DATE_SEPARATOR_0_PROPERTY,
	DINO_UI_DATE_SEPARATOR_MODEL_PROPERTY,
	DINO_UI_DATE_SEPARATOR_DATE_LABEL_PROPERTY,
	DINO_UI_DATE_SEPARATOR_NUM_PROPERTIES
};
static GParamSpec* dino_ui_date_separator_properties[DINO_UI_DATE_SEPARATOR_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _pango_attr_list_unref0(var) ((var == NULL) ? NULL : (var = (pango_attr_list_unref (var), NULL)))

struct _DinoUiViewModelDateSeparatorModel {
	GObject parent_instance;
	DinoUiViewModelDateSeparatorModelPrivate * priv;
};

struct _DinoUiViewModelDateSeparatorModelClass {
	GObjectClass parent_class;
};

struct _DinoUiViewModelDateSeparatorModelPrivate {
	gchar* _date_label;
};

struct _DinoUiViewModelCompatDateSeparatorModel {
	DinoUiViewModelDateSeparatorModel parent_instance;
	DinoUiViewModelCompatDateSeparatorModelPrivate * priv;
};

struct _DinoUiViewModelCompatDateSeparatorModelClass {
	DinoUiViewModelDateSeparatorModelClass parent_class;
};

struct _DinoUiViewModelCompatDateSeparatorModelPrivate {
	GDateTime* date;
	guint time_update_timeout;
};

struct _DinoUiDateSeparator {
	GtkWidget parent_instance;
	DinoUiDateSeparatorPrivate * priv;
};

struct _DinoUiDateSeparatorClass {
	GtkWidgetClass parent_class;
};

struct _DinoUiDateSeparatorPrivate {
	DinoUiViewModelDateSeparatorModel* _model;
	GtkLabel* label;
	GBinding* label_text_binding;
};

static gint DinoUiViewModelDateSeparatorModel_private_offset;
static gpointer dino_ui_view_model_date_separator_model_parent_class = NULL;
static gint DinoUiViewModelCompatDateSeparatorModel_private_offset;
static gpointer dino_ui_view_model_compat_date_separator_model_parent_class = NULL;
static gint DinoUiDateSeparator_private_offset;
static gpointer dino_ui_date_separator_parent_class = NULL;

VALA_EXTERN GType dino_ui_view_model_date_separator_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelDateSeparatorModel, g_object_unref)
VALA_EXTERN DinoUiViewModelDateSeparatorModel* dino_ui_view_model_date_separator_model_new (void);
VALA_EXTERN DinoUiViewModelDateSeparatorModel* dino_ui_view_model_date_separator_model_construct (GType object_type);
VALA_EXTERN const gchar* dino_ui_view_model_date_separator_model_get_date_label (DinoUiViewModelDateSeparatorModel* self);
VALA_EXTERN void dino_ui_view_model_date_separator_model_set_date_label (DinoUiViewModelDateSeparatorModel* self,
                                                             const gchar* value);
static void dino_ui_view_model_date_separator_model_finalize (GObject * obj);
static GType dino_ui_view_model_date_separator_model_get_type_once (void);
static void _vala_dino_ui_view_model_date_separator_model_get_property (GObject * object,
                                                                 guint property_id,
                                                                 GValue * value,
                                                                 GParamSpec * pspec);
static void _vala_dino_ui_view_model_date_separator_model_set_property (GObject * object,
                                                                 guint property_id,
                                                                 const GValue * value,
                                                                 GParamSpec * pspec);
VALA_EXTERN GType dino_ui_view_model_compat_date_separator_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelCompatDateSeparatorModel, g_object_unref)
VALA_EXTERN DinoUiViewModelCompatDateSeparatorModel* dino_ui_view_model_compat_date_separator_model_new (GDateTime* date);
VALA_EXTERN DinoUiViewModelCompatDateSeparatorModel* dino_ui_view_model_compat_date_separator_model_construct (GType object_type,
                                                                                                   GDateTime* date);
static void dino_ui_view_model_compat_date_separator_model_update_time_label (DinoUiViewModelCompatDateSeparatorModel* self);
static gchar* dino_ui_view_model_compat_date_separator_model_get_relative_time (GDateTime* time);
static void dino_ui_view_model_compat_date_separator_model_on_time_update_timeout (DinoUiViewModelCompatDateSeparatorModel* _self_);
static gint dino_ui_view_model_compat_date_separator_model_get_next_time_change (DinoUiViewModelCompatDateSeparatorModel* self);
static void _dino_ui_view_model_compat_date_separator_model_on_time_update_timeout_dino_weak_timeout_source_once_func (gconstpointer object);
static void dino_ui_view_model_compat_date_separator_model_real_dispose (GObject* base);
static void dino_ui_view_model_compat_date_separator_model_finalize (GObject * obj);
static GType dino_ui_view_model_compat_date_separator_model_get_type_once (void);
VALA_EXTERN GType dino_ui_date_separator_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiDateSeparator, g_object_unref)
static void dino_ui_date_separator_on_model_changed (DinoUiDateSeparator* self);
VALA_EXTERN DinoUiViewModelDateSeparatorModel* dino_ui_date_separator_get_model (DinoUiDateSeparator* self);
static void dino_ui_date_separator_real_dispose (GObject* base);
VALA_EXTERN DinoUiDateSeparator* dino_ui_date_separator_new (void);
VALA_EXTERN DinoUiDateSeparator* dino_ui_date_separator_construct (GType object_type);
VALA_EXTERN void dino_ui_date_separator_set_model (DinoUiDateSeparator* self,
                                       DinoUiViewModelDateSeparatorModel* value);
VALA_EXTERN const gchar* dino_ui_date_separator_get_date_label (DinoUiDateSeparator* self);
VALA_EXTERN void dino_ui_date_separator_set_date_label (DinoUiDateSeparator* self,
                                            const gchar* value);
static GObject * dino_ui_date_separator_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties);
static void _dino_ui_date_separator_on_model_changed_g_object_notify (GObject* _sender,
                                                               GParamSpec* pspec,
                                                               gpointer self);
static void dino_ui_date_separator_finalize (GObject * obj);
static GType dino_ui_date_separator_get_type_once (void);
static void _vala_dino_ui_date_separator_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_dino_ui_date_separator_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_ui_view_model_date_separator_model_get_instance_private (DinoUiViewModelDateSeparatorModel* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiViewModelDateSeparatorModel_private_offset);
}

DinoUiViewModelDateSeparatorModel*
dino_ui_view_model_date_separator_model_construct (GType object_type)
{
	DinoUiViewModelDateSeparatorModel * self = NULL;
	self = (DinoUiViewModelDateSeparatorModel*) g_object_new (object_type, NULL);
	return self;
}

DinoUiViewModelDateSeparatorModel*
dino_ui_view_model_date_separator_model_new (void)
{
	return dino_ui_view_model_date_separator_model_construct (DINO_UI_VIEW_MODEL_TYPE_DATE_SEPARATOR_MODEL);
}

const gchar*
dino_ui_view_model_date_separator_model_get_date_label (DinoUiViewModelDateSeparatorModel* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_date_label;
	result = _tmp0_;
	return result;
}

void
dino_ui_view_model_date_separator_model_set_date_label (DinoUiViewModelDateSeparatorModel* self,
                                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_view_model_date_separator_model_get_date_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_date_label);
		self->priv->_date_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_view_model_date_separator_model_properties[DINO_UI_VIEW_MODEL_DATE_SEPARATOR_MODEL_DATE_LABEL_PROPERTY]);
	}
}

static void
dino_ui_view_model_date_separator_model_class_init (DinoUiViewModelDateSeparatorModelClass * klass,
                                                    gpointer klass_data)
{
	dino_ui_view_model_date_separator_model_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiViewModelDateSeparatorModel_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_view_model_date_separator_model_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dino_ui_view_model_date_separator_model_set_property;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_view_model_date_separator_model_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_VIEW_MODEL_DATE_SEPARATOR_MODEL_DATE_LABEL_PROPERTY, dino_ui_view_model_date_separator_model_properties[DINO_UI_VIEW_MODEL_DATE_SEPARATOR_MODEL_DATE_LABEL_PROPERTY] = g_param_spec_string ("date-label", "date-label", "date-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
dino_ui_view_model_date_separator_model_instance_init (DinoUiViewModelDateSeparatorModel * self,
                                                       gpointer klass)
{
	self->priv = dino_ui_view_model_date_separator_model_get_instance_private (self);
}

static void
dino_ui_view_model_date_separator_model_finalize (GObject * obj)
{
	DinoUiViewModelDateSeparatorModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_VIEW_MODEL_TYPE_DATE_SEPARATOR_MODEL, DinoUiViewModelDateSeparatorModel);
	_g_free0 (self->priv->_date_label);
	G_OBJECT_CLASS (dino_ui_view_model_date_separator_model_parent_class)->finalize (obj);
}

static GType
dino_ui_view_model_date_separator_model_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiViewModelDateSeparatorModelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_view_model_date_separator_model_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiViewModelDateSeparatorModel), 0, (GInstanceInitFunc) dino_ui_view_model_date_separator_model_instance_init, NULL };
	GType dino_ui_view_model_date_separator_model_type_id;
	dino_ui_view_model_date_separator_model_type_id = g_type_register_static (G_TYPE_OBJECT, "DinoUiViewModelDateSeparatorModel", &g_define_type_info, 0);
	DinoUiViewModelDateSeparatorModel_private_offset = g_type_add_instance_private (dino_ui_view_model_date_separator_model_type_id, sizeof (DinoUiViewModelDateSeparatorModelPrivate));
	return dino_ui_view_model_date_separator_model_type_id;
}

GType
dino_ui_view_model_date_separator_model_get_type (void)
{
	static volatile gsize dino_ui_view_model_date_separator_model_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_view_model_date_separator_model_type_id__once)) {
		GType dino_ui_view_model_date_separator_model_type_id;
		dino_ui_view_model_date_separator_model_type_id = dino_ui_view_model_date_separator_model_get_type_once ();
		g_once_init_leave (&dino_ui_view_model_date_separator_model_type_id__once, dino_ui_view_model_date_separator_model_type_id);
	}
	return dino_ui_view_model_date_separator_model_type_id__once;
}

static void
_vala_dino_ui_view_model_date_separator_model_get_property (GObject * object,
                                                            guint property_id,
                                                            GValue * value,
                                                            GParamSpec * pspec)
{
	DinoUiViewModelDateSeparatorModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_VIEW_MODEL_TYPE_DATE_SEPARATOR_MODEL, DinoUiViewModelDateSeparatorModel);
	switch (property_id) {
		case DINO_UI_VIEW_MODEL_DATE_SEPARATOR_MODEL_DATE_LABEL_PROPERTY:
		g_value_set_string (value, dino_ui_view_model_date_separator_model_get_date_label (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dino_ui_view_model_date_separator_model_set_property (GObject * object,
                                                            guint property_id,
                                                            const GValue * value,
                                                            GParamSpec * pspec)
{
	DinoUiViewModelDateSeparatorModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_VIEW_MODEL_TYPE_DATE_SEPARATOR_MODEL, DinoUiViewModelDateSeparatorModel);
	switch (property_id) {
		case DINO_UI_VIEW_MODEL_DATE_SEPARATOR_MODEL_DATE_LABEL_PROPERTY:
		dino_ui_view_model_date_separator_model_set_date_label (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
dino_ui_view_model_compat_date_separator_model_get_instance_private (DinoUiViewModelCompatDateSeparatorModel* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiViewModelCompatDateSeparatorModel_private_offset);
}

static gpointer
_g_date_time_ref0 (gpointer self)
{
	return self ? g_date_time_ref (self) : NULL;
}

DinoUiViewModelCompatDateSeparatorModel*
dino_ui_view_model_compat_date_separator_model_construct (GType object_type,
                                                          GDateTime* date)
{
	DinoUiViewModelCompatDateSeparatorModel * self = NULL;
	GDateTime* _tmp0_;
	g_return_val_if_fail (date != NULL, NULL);
	self = (DinoUiViewModelCompatDateSeparatorModel*) dino_ui_view_model_date_separator_model_construct (object_type);
	_tmp0_ = _g_date_time_ref0 (date);
	_g_date_time_unref0 (self->priv->date);
	self->priv->date = _tmp0_;
	dino_ui_view_model_compat_date_separator_model_update_time_label (self);
	return self;
}

DinoUiViewModelCompatDateSeparatorModel*
dino_ui_view_model_compat_date_separator_model_new (GDateTime* date)
{
	return dino_ui_view_model_compat_date_separator_model_construct (DINO_UI_VIEW_MODEL_TYPE_COMPAT_DATE_SEPARATOR_MODEL, date);
}

static gchar*
dino_ui_view_model_compat_date_separator_model_get_relative_time (GDateTime* time)
{
	GDateTime* time_local = NULL;
	GDateTime* _tmp0_;
	GDateTime* now_local = NULL;
	GDateTime* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	GDateTime* _tmp4_;
	GDateTime* _tmp5_;
	GDateTime* now_local_minus = NULL;
	GDateTime* _tmp12_;
	GDateTime* _tmp13_;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_ = FALSE;
	GDateTime* _tmp16_;
	GDateTime* _tmp17_;
	GDateTime* _tmp24_;
	GDateTime* _tmp25_;
	GTimeSpan timespan = 0LL;
	GDateTime* _tmp28_;
	GDateTime* _tmp29_;
	gchar* result;
	g_return_val_if_fail (time != NULL, NULL);
	_tmp0_ = g_date_time_to_local (time);
	time_local = _tmp0_;
	_tmp1_ = g_date_time_new_now_local ();
	now_local = _tmp1_;
	_tmp4_ = time_local;
	_tmp5_ = now_local;
	if (g_date_time_get_year (_tmp4_) == g_date_time_get_year (_tmp5_)) {
		GDateTime* _tmp6_;
		GDateTime* _tmp7_;
		_tmp6_ = time_local;
		_tmp7_ = now_local;
		_tmp3_ = g_date_time_get_month (_tmp6_) == g_date_time_get_month (_tmp7_);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		GDateTime* _tmp8_;
		GDateTime* _tmp9_;
		_tmp8_ = time_local;
		_tmp9_ = now_local;
		_tmp2_ = g_date_time_get_day_of_month (_tmp8_) == g_date_time_get_day_of_month (_tmp9_);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		const gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp10_ = dino_gettext ("Today");
		_tmp11_ = g_strdup (_tmp10_);
		result = _tmp11_;
		_g_date_time_unref0 (now_local);
		_g_date_time_unref0 (time_local);
		return result;
	}
	_tmp12_ = now_local;
	_tmp13_ = g_date_time_add_days (_tmp12_, -1);
	now_local_minus = _tmp13_;
	_tmp16_ = time_local;
	_tmp17_ = now_local_minus;
	if (g_date_time_get_year (_tmp16_) == g_date_time_get_year (_tmp17_)) {
		GDateTime* _tmp18_;
		GDateTime* _tmp19_;
		_tmp18_ = time_local;
		_tmp19_ = now_local_minus;
		_tmp15_ = g_date_time_get_month (_tmp18_) == g_date_time_get_month (_tmp19_);
	} else {
		_tmp15_ = FALSE;
	}
	if (_tmp15_) {
		GDateTime* _tmp20_;
		GDateTime* _tmp21_;
		_tmp20_ = time_local;
		_tmp21_ = now_local_minus;
		_tmp14_ = g_date_time_get_day_of_month (_tmp20_) == g_date_time_get_day_of_month (_tmp21_);
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		const gchar* _tmp22_;
		gchar* _tmp23_;
		_tmp22_ = dino_gettext ("Yesterday");
		_tmp23_ = g_strdup (_tmp22_);
		result = _tmp23_;
		_g_date_time_unref0 (now_local_minus);
		_g_date_time_unref0 (now_local);
		_g_date_time_unref0 (time_local);
		return result;
	}
	_tmp24_ = time_local;
	_tmp25_ = now_local;
	if (g_date_time_get_year (_tmp24_) != g_date_time_get_year (_tmp25_)) {
		GDateTime* _tmp26_;
		gchar* _tmp27_;
		_tmp26_ = time_local;
		_tmp27_ = g_date_time_format (_tmp26_, "%x");
		result = _tmp27_;
		_g_date_time_unref0 (now_local_minus);
		_g_date_time_unref0 (now_local);
		_g_date_time_unref0 (time_local);
		return result;
	}
	_tmp28_ = now_local;
	_tmp29_ = time_local;
	timespan = g_date_time_difference (_tmp28_, _tmp29_);
	if (timespan < (7 * G_TIME_SPAN_DAY)) {
		GDateTime* _tmp30_;
		const gchar* _tmp31_;
		gchar* _tmp32_;
		_tmp30_ = time_local;
		_tmp31_ = dino_gettext ("%a, %b %d");
		_tmp32_ = g_date_time_format (_tmp30_, _tmp31_);
		result = _tmp32_;
		_g_date_time_unref0 (now_local_minus);
		_g_date_time_unref0 (now_local);
		_g_date_time_unref0 (time_local);
		return result;
	} else {
		GDateTime* _tmp33_;
		const gchar* _tmp34_;
		gchar* _tmp35_;
		_tmp33_ = time_local;
		_tmp34_ = dino_gettext ("%b %d");
		_tmp35_ = g_date_time_format (_tmp33_, _tmp34_);
		result = _tmp35_;
		_g_date_time_unref0 (now_local_minus);
		_g_date_time_unref0 (now_local);
		_g_date_time_unref0 (time_local);
		return result;
	}
}

static void
dino_ui_view_model_compat_date_separator_model_on_time_update_timeout (DinoUiViewModelCompatDateSeparatorModel* _self_)
{
	g_return_if_fail (_self_ != NULL);
	if (_self_->priv->time_update_timeout != ((guint) 0)) {
		dino_ui_view_model_compat_date_separator_model_update_time_label (_self_);
	}
}

static void
_dino_ui_view_model_compat_date_separator_model_on_time_update_timeout_dino_weak_timeout_source_once_func (gconstpointer object)
{
	dino_ui_view_model_compat_date_separator_model_on_time_update_timeout ((DinoUiViewModelCompatDateSeparatorModel*) object);
}

static void
dino_ui_view_model_compat_date_separator_model_update_time_label (DinoUiViewModelCompatDateSeparatorModel* self)
{
	GDateTime* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->date;
	_tmp1_ = dino_ui_view_model_compat_date_separator_model_get_relative_time (_tmp0_);
	_tmp2_ = _tmp1_;
	dino_ui_view_model_date_separator_model_set_date_label ((DinoUiViewModelDateSeparatorModel*) self, _tmp2_);
	_g_free0 (_tmp2_);
	self->priv->time_update_timeout = dino_weak_timeout_add_seconds_once (DINO_UI_VIEW_MODEL_TYPE_COMPAT_DATE_SEPARATOR_MODEL, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, (guint) dino_ui_view_model_compat_date_separator_model_get_next_time_change (self), self, _dino_ui_view_model_compat_date_separator_model_on_time_update_timeout_dino_weak_timeout_source_once_func, G_PRIORITY_DEFAULT);
}

static gint
dino_ui_view_model_compat_date_separator_model_get_next_time_change (DinoUiViewModelCompatDateSeparatorModel* self)
{
	GDateTime* now = NULL;
	GDateTime* _tmp0_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	_tmp0_ = g_date_time_new_now_local ();
	now = _tmp0_;
	result = ((((23 - g_date_time_get_hour (now)) * 3600) + ((59 - g_date_time_get_minute (now)) * 60)) + (59 - g_date_time_get_second (now))) + 1;
	_g_date_time_unref0 (now);
	return result;
}

static void
dino_ui_view_model_compat_date_separator_model_real_dispose (GObject* base)
{
	DinoUiViewModelCompatDateSeparatorModel * self;
	self = (DinoUiViewModelCompatDateSeparatorModel*) base;
	G_OBJECT_CLASS (dino_ui_view_model_compat_date_separator_model_parent_class)->dispose ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, DINO_UI_VIEW_MODEL_TYPE_DATE_SEPARATOR_MODEL, DinoUiViewModelDateSeparatorModel));
	if (self->priv->time_update_timeout != ((guint) 0)) {
		g_source_remove (self->priv->time_update_timeout);
		self->priv->time_update_timeout = (guint) 0;
	}
}

static void
dino_ui_view_model_compat_date_separator_model_class_init (DinoUiViewModelCompatDateSeparatorModelClass * klass,
                                                           gpointer klass_data)
{
	dino_ui_view_model_compat_date_separator_model_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiViewModelCompatDateSeparatorModel_private_offset);
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) dino_ui_view_model_compat_date_separator_model_real_dispose;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_view_model_compat_date_separator_model_finalize;
}

static void
dino_ui_view_model_compat_date_separator_model_instance_init (DinoUiViewModelCompatDateSeparatorModel * self,
                                                              gpointer klass)
{
	self->priv = dino_ui_view_model_compat_date_separator_model_get_instance_private (self);
	self->priv->time_update_timeout = (guint) 0;
}

static void
dino_ui_view_model_compat_date_separator_model_finalize (GObject * obj)
{
	DinoUiViewModelCompatDateSeparatorModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_VIEW_MODEL_TYPE_COMPAT_DATE_SEPARATOR_MODEL, DinoUiViewModelCompatDateSeparatorModel);
	_g_date_time_unref0 (self->priv->date);
	G_OBJECT_CLASS (dino_ui_view_model_compat_date_separator_model_parent_class)->finalize (obj);
}

static GType
dino_ui_view_model_compat_date_separator_model_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiViewModelCompatDateSeparatorModelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_view_model_compat_date_separator_model_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiViewModelCompatDateSeparatorModel), 0, (GInstanceInitFunc) dino_ui_view_model_compat_date_separator_model_instance_init, NULL };
	GType dino_ui_view_model_compat_date_separator_model_type_id;
	dino_ui_view_model_compat_date_separator_model_type_id = g_type_register_static (DINO_UI_VIEW_MODEL_TYPE_DATE_SEPARATOR_MODEL, "DinoUiViewModelCompatDateSeparatorModel", &g_define_type_info, 0);
	DinoUiViewModelCompatDateSeparatorModel_private_offset = g_type_add_instance_private (dino_ui_view_model_compat_date_separator_model_type_id, sizeof (DinoUiViewModelCompatDateSeparatorModelPrivate));
	return dino_ui_view_model_compat_date_separator_model_type_id;
}

GType
dino_ui_view_model_compat_date_separator_model_get_type (void)
{
	static volatile gsize dino_ui_view_model_compat_date_separator_model_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_view_model_compat_date_separator_model_type_id__once)) {
		GType dino_ui_view_model_compat_date_separator_model_type_id;
		dino_ui_view_model_compat_date_separator_model_type_id = dino_ui_view_model_compat_date_separator_model_get_type_once ();
		g_once_init_leave (&dino_ui_view_model_compat_date_separator_model_type_id__once, dino_ui_view_model_compat_date_separator_model_type_id);
	}
	return dino_ui_view_model_compat_date_separator_model_type_id__once;
}

static inline gpointer
dino_ui_date_separator_get_instance_private (DinoUiDateSeparator* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiDateSeparator_private_offset);
}

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

static void
dino_ui_date_separator_on_model_changed (DinoUiDateSeparator* self)
{
	GBinding* _tmp0_;
	DinoUiViewModelDateSeparatorModel* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->label_text_binding;
	if (_tmp0_ != NULL) {
		GBinding* _tmp1_;
		GBinding* _tmp2_;
		_tmp1_ = self->priv->label_text_binding;
		_tmp2_ = _g_object_ref0 (_tmp1_);
		g_binding_unbind (_tmp2_);
	}
	_tmp3_ = self->priv->_model;
	if (_tmp3_ != NULL) {
		DinoUiViewModelDateSeparatorModel* _tmp4_;
		GBinding* _tmp5_;
		GBinding* _tmp6_;
		_tmp4_ = self->priv->_model;
		_tmp5_ = g_object_bind_property_with_closures ((GObject*) _tmp4_, "date-label", (GObject*) self, "date-label", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
		_tmp6_ = _g_object_ref0 (_tmp5_);
		_g_object_unref0 (self->priv->label_text_binding);
		self->priv->label_text_binding = _tmp6_;
	} else {
		_g_object_unref0 (self->priv->label_text_binding);
		self->priv->label_text_binding = NULL;
	}
}

static void
dino_ui_date_separator_real_dispose (GObject* base)
{
	DinoUiDateSeparator * self;
	GBinding* _tmp0_;
	GtkWidget* clamp = NULL;
	GtkWidget* _tmp3_;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	self = (DinoUiDateSeparator*) base;
	_tmp0_ = self->priv->label_text_binding;
	if (_tmp0_ != NULL) {
		GBinding* _tmp1_;
		GBinding* _tmp2_;
		_tmp1_ = self->priv->label_text_binding;
		_tmp2_ = _g_object_ref0 (_tmp1_);
		g_binding_unbind (_tmp2_);
	}
	_g_object_unref0 (self->priv->label_text_binding);
	self->priv->label_text_binding = NULL;
	_tmp3_ = gtk_widget_get_first_child ((GtkWidget*) self);
	_tmp4_ = _g_object_ref0 (_tmp3_);
	clamp = _tmp4_;
	_tmp5_ = clamp;
	if (_tmp5_ != NULL) {
		GtkWidget* _tmp6_;
		GtkWidget* _tmp7_;
		_tmp6_ = clamp;
		gtk_widget_unparent (_tmp6_);
		_tmp7_ = clamp;
		g_object_run_dispose ((GObject*) _tmp7_);
	}
	G_OBJECT_CLASS (dino_ui_date_separator_parent_class)->dispose ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_g_object_unref0 (clamp);
}

DinoUiDateSeparator*
dino_ui_date_separator_construct (GType object_type)
{
	DinoUiDateSeparator * self = NULL;
	self = (DinoUiDateSeparator*) g_object_new (object_type, NULL);
	return self;
}

DinoUiDateSeparator*
dino_ui_date_separator_new (void)
{
	return dino_ui_date_separator_construct (DINO_UI_TYPE_DATE_SEPARATOR);
}

DinoUiViewModelDateSeparatorModel*
dino_ui_date_separator_get_model (DinoUiDateSeparator* self)
{
	DinoUiViewModelDateSeparatorModel* result;
	DinoUiViewModelDateSeparatorModel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_model;
	result = _tmp0_;
	return result;
}

void
dino_ui_date_separator_set_model (DinoUiDateSeparator* self,
                                  DinoUiViewModelDateSeparatorModel* value)
{
	DinoUiViewModelDateSeparatorModel* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_date_separator_get_model (self);
	if (old_value != value) {
		DinoUiViewModelDateSeparatorModel* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_model);
		self->priv->_model = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_date_separator_properties[DINO_UI_DATE_SEPARATOR_MODEL_PROPERTY]);
	}
}

const gchar*
dino_ui_date_separator_get_date_label (DinoUiDateSeparator* self)
{
	const gchar* result;
	GtkLabel* _tmp0_;
	const gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->label;
	_tmp1_ = gtk_label_get_text (_tmp0_);
	result = _tmp1_;
	return result;
}

void
dino_ui_date_separator_set_date_label (DinoUiDateSeparator* self,
                                       const gchar* value)
{
	GtkLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->label;
	gtk_label_set_text (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, dino_ui_date_separator_properties[DINO_UI_DATE_SEPARATOR_DATE_LABEL_PROPERTY]);
}

static void
_dino_ui_date_separator_on_model_changed_g_object_notify (GObject* _sender,
                                                          GParamSpec* pspec,
                                                          gpointer self)
{
	dino_ui_date_separator_on_model_changed ((DinoUiDateSeparator*) self);
}

static GObject *
dino_ui_date_separator_constructor (GType type,
                                    guint n_construct_properties,
                                    GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DinoUiDateSeparator * self;
	GtkBinLayout* _tmp0_;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	PangoAttrList* _tmp3_;
	PangoAttrList* _tmp4_;
	GtkLabel* _tmp5_;
	PangoAttrList* _tmp6_;
	PangoAttrList* _tmp7_;
	PangoAttribute* _tmp8_;
	GtkBox* box = NULL;
	GtkBox* _tmp9_;
	GtkBox* _tmp10_;
	GtkSeparator* _tmp11_ = NULL;
	GtkSeparator* _tmp12_;
	GtkBox* _tmp13_;
	GtkLabel* _tmp14_;
	GtkBox* _tmp15_;
	GtkSeparator* _tmp16_ = NULL;
	GtkSeparator* _tmp17_;
	AdwClamp* clamp = NULL;
	GtkBox* _tmp18_;
	GtkWidget* _tmp19_;
	AdwClamp* _tmp20_ = NULL;
	AdwClamp* _tmp21_;
	parent_class = G_OBJECT_CLASS (dino_ui_date_separator_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_DATE_SEPARATOR, DinoUiDateSeparator);
	_tmp0_ = (GtkBinLayout*) gtk_bin_layout_new ();
	gtk_widget_set_layout_manager ((GtkWidget*) self, (GtkLayoutManager*) _tmp0_);
	gtk_widget_set_halign ((GtkWidget*) self, GTK_ALIGN_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	_tmp1_ = self->priv->label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "dim-label");
	_tmp2_ = self->priv->label;
	_tmp3_ = pango_attr_list_new ();
	_tmp4_ = _tmp3_;
	gtk_label_set_attributes (_tmp2_, _tmp4_);
	_pango_attr_list_unref0 (_tmp4_);
	_tmp5_ = self->priv->label;
	_tmp6_ = gtk_label_get_attributes (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = pango_attr_scale_new (PANGO_SCALE_SMALL);
	pango_attr_list_insert (_tmp7_, _tmp8_);
	_tmp9_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
	g_object_ref_sink (_tmp9_);
	box = _tmp9_;
	_tmp10_ = box;
	_tmp11_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	gtk_widget_set_valign ((GtkWidget*) _tmp11_, GTK_ALIGN_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp11_, TRUE);
	g_object_ref_sink (_tmp11_);
	_tmp12_ = _tmp11_;
	gtk_box_append (_tmp10_, (GtkWidget*) _tmp12_);
	_g_object_unref0 (_tmp12_);
	_tmp13_ = box;
	_tmp14_ = self->priv->label;
	gtk_box_append (_tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = box;
	_tmp16_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	gtk_widget_set_valign ((GtkWidget*) _tmp16_, GTK_ALIGN_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp16_, TRUE);
	g_object_ref_sink (_tmp16_);
	_tmp17_ = _tmp16_;
	gtk_box_append (_tmp15_, (GtkWidget*) _tmp17_);
	_g_object_unref0 (_tmp17_);
	_tmp18_ = box;
	_tmp19_ = _g_object_ref0 ((GtkWidget*) _tmp18_);
	_tmp20_ = (AdwClamp*) adw_clamp_new ();
	adw_clamp_set_maximum_size (_tmp20_, 300);
	adw_clamp_set_tightening_threshold (_tmp20_, 300);
	adw_clamp_set_child (_tmp20_, _tmp19_);
	_g_object_unref0 (_tmp19_);
	gtk_widget_set_halign ((GtkWidget*) _tmp20_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp20_);
	clamp = _tmp20_;
	_tmp21_ = clamp;
	gtk_widget_insert_after ((GtkWidget*) _tmp21_, (GtkWidget*) self, NULL);
	g_signal_connect_object ((GObject*) self, "notify::model", (GCallback) _dino_ui_date_separator_on_model_changed_g_object_notify, self, 0);
	_g_object_unref0 (clamp);
	_g_object_unref0 (box);
	return obj;
}

static void
dino_ui_date_separator_class_init (DinoUiDateSeparatorClass * klass,
                                   gpointer klass_data)
{
	dino_ui_date_separator_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiDateSeparator_private_offset);
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) dino_ui_date_separator_real_dispose;
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_date_separator_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dino_ui_date_separator_set_property;
	G_OBJECT_CLASS (klass)->constructor = dino_ui_date_separator_constructor;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_date_separator_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_DATE_SEPARATOR_MODEL_PROPERTY, dino_ui_date_separator_properties[DINO_UI_DATE_SEPARATOR_MODEL_PROPERTY] = g_param_spec_object ("model", "model", "model", DINO_UI_VIEW_MODEL_TYPE_DATE_SEPARATOR_MODEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_DATE_SEPARATOR_DATE_LABEL_PROPERTY, dino_ui_date_separator_properties[DINO_UI_DATE_SEPARATOR_DATE_LABEL_PROPERTY] = g_param_spec_string ("date-label", "date-label", "date-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
dino_ui_date_separator_instance_init (DinoUiDateSeparator * self,
                                      gpointer klass)
{
	GtkLabel* _tmp0_ = NULL;
	self->priv = dino_ui_date_separator_get_instance_private (self);
	_tmp0_ = (GtkLabel*) gtk_label_new ("");
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, FALSE);
	g_object_ref_sink (_tmp0_);
	self->priv->label = _tmp0_;
}

static void
dino_ui_date_separator_finalize (GObject * obj)
{
	DinoUiDateSeparator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_DATE_SEPARATOR, DinoUiDateSeparator);
	_g_object_unref0 (self->priv->_model);
	_g_object_unref0 (self->priv->label);
	_g_object_unref0 (self->priv->label_text_binding);
	G_OBJECT_CLASS (dino_ui_date_separator_parent_class)->finalize (obj);
}

static GType
dino_ui_date_separator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiDateSeparatorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_date_separator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiDateSeparator), 0, (GInstanceInitFunc) dino_ui_date_separator_instance_init, NULL };
	GType dino_ui_date_separator_type_id;
	dino_ui_date_separator_type_id = g_type_register_static (gtk_widget_get_type (), "DinoUiDateSeparator", &g_define_type_info, 0);
	DinoUiDateSeparator_private_offset = g_type_add_instance_private (dino_ui_date_separator_type_id, sizeof (DinoUiDateSeparatorPrivate));
	return dino_ui_date_separator_type_id;
}

GType
dino_ui_date_separator_get_type (void)
{
	static volatile gsize dino_ui_date_separator_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_date_separator_type_id__once)) {
		GType dino_ui_date_separator_type_id;
		dino_ui_date_separator_type_id = dino_ui_date_separator_get_type_once ();
		g_once_init_leave (&dino_ui_date_separator_type_id__once, dino_ui_date_separator_type_id);
	}
	return dino_ui_date_separator_type_id__once;
}

static void
_vala_dino_ui_date_separator_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	DinoUiDateSeparator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_DATE_SEPARATOR, DinoUiDateSeparator);
	switch (property_id) {
		case DINO_UI_DATE_SEPARATOR_MODEL_PROPERTY:
		g_value_set_object (value, dino_ui_date_separator_get_model (self));
		break;
		case DINO_UI_DATE_SEPARATOR_DATE_LABEL_PROPERTY:
		g_value_set_string (value, dino_ui_date_separator_get_date_label (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dino_ui_date_separator_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	DinoUiDateSeparator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_DATE_SEPARATOR, DinoUiDateSeparator);
	switch (property_id) {
		case DINO_UI_DATE_SEPARATOR_MODEL_PROPERTY:
		dino_ui_date_separator_set_model (self, g_value_get_object (value));
		break;
		case DINO_UI_DATE_SEPARATOR_DATE_LABEL_PROPERTY:
		dino_ui_date_separator_set_date_label (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

