/* world-standalone.c generated by valac 0.56.0, the Vala compiler
 * generated from world-standalone.vala, do not modify */

/*
 * Copyright (C) 2013  Paolo Borelli <pborelli@gnome.org>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>

#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define CLOCKS_WORLD_TYPE_STANDALONE (clocks_world_standalone_get_type ())
#define CLOCKS_WORLD_STANDALONE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_WORLD_TYPE_STANDALONE, ClocksWorldStandalone))
#define CLOCKS_WORLD_STANDALONE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_WORLD_TYPE_STANDALONE, ClocksWorldStandaloneClass))
#define CLOCKS_WORLD_IS_STANDALONE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_WORLD_TYPE_STANDALONE))
#define CLOCKS_WORLD_IS_STANDALONE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_WORLD_TYPE_STANDALONE))
#define CLOCKS_WORLD_STANDALONE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_WORLD_TYPE_STANDALONE, ClocksWorldStandaloneClass))

typedef struct _ClocksWorldStandalone ClocksWorldStandalone;
typedef struct _ClocksWorldStandaloneClass ClocksWorldStandaloneClass;
typedef struct _ClocksWorldStandalonePrivate ClocksWorldStandalonePrivate;

#define CLOCKS_WORLD_TYPE_ITEM (clocks_world_item_get_type ())
#define CLOCKS_WORLD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_WORLD_TYPE_ITEM, ClocksWorldItem))
#define CLOCKS_WORLD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_WORLD_TYPE_ITEM, ClocksWorldItemClass))
#define CLOCKS_WORLD_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_WORLD_TYPE_ITEM))
#define CLOCKS_WORLD_IS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_WORLD_TYPE_ITEM))
#define CLOCKS_WORLD_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_WORLD_TYPE_ITEM, ClocksWorldItemClass))

typedef struct _ClocksWorldItem ClocksWorldItem;
typedef struct _ClocksWorldItemClass ClocksWorldItemClass;
enum  {
	CLOCKS_WORLD_STANDALONE_0_PROPERTY,
	CLOCKS_WORLD_STANDALONE_TITLE_PROPERTY,
	CLOCKS_WORLD_STANDALONE_SUBTITLE_PROPERTY,
	CLOCKS_WORLD_STANDALONE_LOCATION_PROPERTY,
	CLOCKS_WORLD_STANDALONE_NUM_PROPERTIES
};
static GParamSpec* clocks_world_standalone_properties[CLOCKS_WORLD_STANDALONE_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define CLOCKS_UTILS_TYPE_WALL_CLOCK (clocks_utils_wall_clock_get_type ())
#define CLOCKS_UTILS_WALL_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_UTILS_TYPE_WALL_CLOCK, ClocksUtilsWallClock))
#define CLOCKS_UTILS_WALL_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_UTILS_TYPE_WALL_CLOCK, ClocksUtilsWallClockClass))
#define CLOCKS_UTILS_IS_WALL_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_UTILS_TYPE_WALL_CLOCK))
#define CLOCKS_UTILS_IS_WALL_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_UTILS_TYPE_WALL_CLOCK))
#define CLOCKS_UTILS_WALL_CLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_UTILS_TYPE_WALL_CLOCK, ClocksUtilsWallClockClass))

typedef struct _ClocksUtilsWallClock ClocksUtilsWallClock;
typedef struct _ClocksUtilsWallClockClass ClocksUtilsWallClockClass;

struct _ClocksWorldStandalone {
	GtkBox parent_instance;
	ClocksWorldStandalonePrivate * priv;
};

struct _ClocksWorldStandaloneClass {
	GtkBoxClass parent_class;
};

struct _ClocksWorldStandalonePrivate {
	gchar* _title;
	gchar* _subtitle;
	ClocksWorldItem* _location;
	GtkLabel* time_label;
	GtkLabel* day_label;
	GtkLabel* sunrise_label;
	GtkLabel* sunset_label;
};

static gint ClocksWorldStandalone_private_offset;
static gpointer clocks_world_standalone_parent_class = NULL;

VALA_EXTERN GType clocks_world_standalone_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksWorldStandalone, g_object_unref)
VALA_EXTERN GType clocks_world_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksWorldItem, g_object_unref)
static void clocks_world_standalone_update (ClocksWorldStandalone* self);
VALA_EXTERN ClocksWorldItem* clocks_world_standalone_get_location (ClocksWorldStandalone* self);
VALA_EXTERN gchar* clocks_world_item_get_time_label (ClocksWorldItem* self);
VALA_EXTERN const gchar* clocks_world_item_get_day_label (ClocksWorldItem* self);
VALA_EXTERN gchar* clocks_world_item_get_sunrise_label (ClocksWorldItem* self);
VALA_EXTERN gchar* clocks_world_item_get_sunset_label (ClocksWorldItem* self);
static void clocks_world_standalone_location_changed (ClocksWorldStandalone* self);
VALA_EXTERN gchar* clocks_world_item_get_state_name (ClocksWorldItem* self);
VALA_EXTERN gchar* clocks_world_item_get_city_name (ClocksWorldItem* self);
VALA_EXTERN void clocks_world_standalone_set_title (ClocksWorldStandalone* self,
                                        const gchar* value);
VALA_EXTERN gchar* clocks_world_item_get_country_name (ClocksWorldItem* self);
VALA_EXTERN void clocks_world_standalone_set_subtitle (ClocksWorldStandalone* self,
                                           const gchar* value);
static void _clocks_world_standalone_location_changed_g_object_notify (GObject* _sender,
                                                                GParamSpec* pspec,
                                                                gpointer self);
VALA_EXTERN ClocksWorldStandalone* clocks_world_standalone_new (void);
VALA_EXTERN ClocksWorldStandalone* clocks_world_standalone_construct (GType object_type);
VALA_EXTERN const gchar* clocks_world_standalone_get_title (ClocksWorldStandalone* self);
VALA_EXTERN const gchar* clocks_world_standalone_get_subtitle (ClocksWorldStandalone* self);
VALA_EXTERN void clocks_world_standalone_set_location (ClocksWorldStandalone* self,
                                           ClocksWorldItem* value);
static GObject * clocks_world_standalone_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties);
VALA_EXTERN GType clocks_utils_wall_clock_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksUtilsWallClock, g_object_unref)
VALA_EXTERN ClocksUtilsWallClock* clocks_utils_wall_clock_get_default (void);
static void _clocks_world_standalone_update_clocks_utils_wall_clock_tick (ClocksUtilsWallClock* _sender,
                                                                   gpointer self);
static void clocks_world_standalone_finalize (GObject * obj);
static GType clocks_world_standalone_get_type_once (void);
static void _vala_clocks_world_standalone_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_clocks_world_standalone_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
clocks_world_standalone_get_instance_private (ClocksWorldStandalone* self)
{
	return G_STRUCT_MEMBER_P (self, ClocksWorldStandalone_private_offset);
}

static void
clocks_world_standalone_update (ClocksWorldStandalone* self)
{
	ClocksWorldItem* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_location;
	if (_tmp0_ != NULL) {
		GtkLabel* _tmp1_;
		ClocksWorldItem* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		GtkLabel* _tmp6_;
		ClocksWorldItem* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		GtkLabel* _tmp10_;
		ClocksWorldItem* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		GtkLabel* _tmp15_;
		ClocksWorldItem* _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		_tmp1_ = self->priv->time_label;
		_tmp2_ = self->priv->_location;
		_tmp3_ = clocks_world_item_get_time_label (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, CLOCKS_WORLD_TYPE_ITEM, ClocksWorldItem));
		_tmp4_ = _tmp3_;
		_tmp5_ = _tmp4_;
		gtk_label_set_label (_tmp1_, _tmp5_);
		_g_free0 (_tmp5_);
		_tmp6_ = self->priv->day_label;
		_tmp7_ = self->priv->_location;
		_tmp8_ = clocks_world_item_get_day_label (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, CLOCKS_WORLD_TYPE_ITEM, ClocksWorldItem));
		_tmp9_ = _tmp8_;
		gtk_label_set_label (_tmp6_, (const gchar*) _tmp9_);
		_tmp10_ = self->priv->sunrise_label;
		_tmp11_ = self->priv->_location;
		_tmp12_ = clocks_world_item_get_sunrise_label (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, CLOCKS_WORLD_TYPE_ITEM, ClocksWorldItem));
		_tmp13_ = _tmp12_;
		_tmp14_ = _tmp13_;
		gtk_label_set_label (_tmp10_, _tmp14_);
		_g_free0 (_tmp14_);
		_tmp15_ = self->priv->sunset_label;
		_tmp16_ = self->priv->_location;
		_tmp17_ = clocks_world_item_get_sunset_label (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, CLOCKS_WORLD_TYPE_ITEM, ClocksWorldItem));
		_tmp18_ = _tmp17_;
		_tmp19_ = _tmp18_;
		gtk_label_set_label (_tmp15_, _tmp19_);
		_g_free0 (_tmp19_);
	}
}

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

static void
clocks_world_standalone_location_changed (ClocksWorldStandalone* self)
{
	ClocksWorldItem* _tmp0_;
	ClocksWorldItem* item = NULL;
	ClocksWorldItem* _tmp1_;
	ClocksWorldItem* _tmp2_;
	ClocksWorldItem* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gboolean _tmp7_;
	ClocksWorldItem* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_location;
	if (_tmp0_ == NULL) {
		return;
	}
	clocks_world_standalone_update (self);
	_tmp1_ = self->priv->_location;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, CLOCKS_WORLD_TYPE_ITEM, ClocksWorldItem));
	item = _tmp2_;
	_tmp3_ = item;
	_tmp4_ = clocks_world_item_get_state_name (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_ != NULL;
	_g_free0 (_tmp6_);
	if (_tmp7_) {
		ClocksWorldItem* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		ClocksWorldItem* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		_tmp8_ = item;
		_tmp9_ = clocks_world_item_get_city_name (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = _tmp10_;
		_tmp12_ = item;
		_tmp13_ = clocks_world_item_get_state_name (_tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = (gchar*) _tmp14_;
		_tmp16_ = g_strdup_printf ("%s, %s", _tmp11_, _tmp15_);
		_tmp17_ = _tmp16_;
		clocks_world_standalone_set_title (self, _tmp17_);
		_g_free0 (_tmp17_);
		_g_free0 (_tmp15_);
		_g_free0 (_tmp11_);
	} else {
		ClocksWorldItem* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		_tmp18_ = item;
		_tmp19_ = clocks_world_item_get_city_name (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = _tmp20_;
		clocks_world_standalone_set_title (self, _tmp21_);
		_g_free0 (_tmp21_);
	}
	_tmp22_ = item;
	_tmp23_ = clocks_world_item_get_country_name (_tmp22_);
	_tmp24_ = _tmp23_;
	_tmp25_ = (gchar*) _tmp24_;
	clocks_world_standalone_set_subtitle (self, _tmp25_);
	_g_free0 (_tmp25_);
	_g_object_unref0 (item);
}

static void
_clocks_world_standalone_location_changed_g_object_notify (GObject* _sender,
                                                           GParamSpec* pspec,
                                                           gpointer self)
{
	clocks_world_standalone_location_changed ((ClocksWorldStandalone*) self);
}

ClocksWorldStandalone*
clocks_world_standalone_construct (GType object_type)
{
	ClocksWorldStandalone * self = NULL;
	self = (ClocksWorldStandalone*) g_object_new (object_type, NULL);
	return self;
}

ClocksWorldStandalone*
clocks_world_standalone_new (void)
{
	return clocks_world_standalone_construct (CLOCKS_WORLD_TYPE_STANDALONE);
}

const gchar*
clocks_world_standalone_get_title (ClocksWorldStandalone* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title;
	result = _tmp0_;
	return result;
}

void
clocks_world_standalone_set_title (ClocksWorldStandalone* self,
                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = clocks_world_standalone_get_title (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_title);
		self->priv->_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, clocks_world_standalone_properties[CLOCKS_WORLD_STANDALONE_TITLE_PROPERTY]);
	}
}

const gchar*
clocks_world_standalone_get_subtitle (ClocksWorldStandalone* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_subtitle;
	result = _tmp0_;
	return result;
}

void
clocks_world_standalone_set_subtitle (ClocksWorldStandalone* self,
                                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = clocks_world_standalone_get_subtitle (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_subtitle);
		self->priv->_subtitle = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, clocks_world_standalone_properties[CLOCKS_WORLD_STANDALONE_SUBTITLE_PROPERTY]);
	}
}

ClocksWorldItem*
clocks_world_standalone_get_location (ClocksWorldStandalone* self)
{
	ClocksWorldItem* result;
	ClocksWorldItem* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_location;
	result = _tmp0_;
	return result;
}

void
clocks_world_standalone_set_location (ClocksWorldStandalone* self,
                                      ClocksWorldItem* value)
{
	ClocksWorldItem* old_value;
	g_return_if_fail (self != NULL);
	old_value = clocks_world_standalone_get_location (self);
	if (old_value != value) {
		ClocksWorldItem* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_location);
		self->priv->_location = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, clocks_world_standalone_properties[CLOCKS_WORLD_STANDALONE_LOCATION_PROPERTY]);
	}
}

static void
_clocks_world_standalone_update_clocks_utils_wall_clock_tick (ClocksUtilsWallClock* _sender,
                                                              gpointer self)
{
	clocks_world_standalone_update ((ClocksWorldStandalone*) self);
}

static GObject *
clocks_world_standalone_constructor (GType type,
                                     guint n_construct_properties,
                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ClocksWorldStandalone * self;
	ClocksUtilsWallClock* _tmp0_;
	ClocksUtilsWallClock* _tmp1_;
	parent_class = G_OBJECT_CLASS (clocks_world_standalone_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLOCKS_WORLD_TYPE_STANDALONE, ClocksWorldStandalone);
	_tmp0_ = clocks_utils_wall_clock_get_default ();
	_tmp1_ = _tmp0_;
	g_signal_connect_object (_tmp1_, "tick", (GCallback) _clocks_world_standalone_update_clocks_utils_wall_clock_tick, self, 0);
	_g_object_unref0 (_tmp1_);
	return obj;
}

static void
clocks_world_standalone_class_init (ClocksWorldStandaloneClass * klass,
                                    gpointer klass_data)
{
	clocks_world_standalone_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ClocksWorldStandalone_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_clocks_world_standalone_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_clocks_world_standalone_set_property;
	G_OBJECT_CLASS (klass)->constructor = clocks_world_standalone_constructor;
	G_OBJECT_CLASS (klass)->finalize = clocks_world_standalone_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_WORLD_STANDALONE_TITLE_PROPERTY, clocks_world_standalone_properties[CLOCKS_WORLD_STANDALONE_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_WORLD_STANDALONE_SUBTITLE_PROPERTY, clocks_world_standalone_properties[CLOCKS_WORLD_STANDALONE_SUBTITLE_PROPERTY] = g_param_spec_string ("subtitle", "subtitle", "subtitle", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_WORLD_STANDALONE_LOCATION_PROPERTY, clocks_world_standalone_properties[CLOCKS_WORLD_STANDALONE_LOCATION_PROPERTY] = g_param_spec_object ("location", "location", "location", CLOCKS_WORLD_TYPE_ITEM, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/clocks/ui/world-standalone.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "time_label", FALSE, ClocksWorldStandalone_private_offset + G_STRUCT_OFFSET (ClocksWorldStandalonePrivate, time_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "day_label", FALSE, ClocksWorldStandalone_private_offset + G_STRUCT_OFFSET (ClocksWorldStandalonePrivate, day_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "sunrise_label", FALSE, ClocksWorldStandalone_private_offset + G_STRUCT_OFFSET (ClocksWorldStandalonePrivate, sunrise_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "sunset_label", FALSE, ClocksWorldStandalone_private_offset + G_STRUCT_OFFSET (ClocksWorldStandalonePrivate, sunset_label));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "location_changed", G_CALLBACK(_clocks_world_standalone_location_changed_g_object_notify));
}

static void
clocks_world_standalone_instance_init (ClocksWorldStandalone * self,
                                       gpointer klass)
{
	gchar* _tmp0_;
	self->priv = clocks_world_standalone_get_instance_private (self);
	_tmp0_ = g_strdup (_ ("Clocks"));
	self->priv->_title = _tmp0_;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
clocks_world_standalone_finalize (GObject * obj)
{
	ClocksWorldStandalone * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLOCKS_WORLD_TYPE_STANDALONE, ClocksWorldStandalone);
	_g_free0 (self->priv->_title);
	_g_free0 (self->priv->_subtitle);
	_g_object_unref0 (self->priv->_location);
	G_OBJECT_CLASS (clocks_world_standalone_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
clocks_world_standalone_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ClocksWorldStandaloneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clocks_world_standalone_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ClocksWorldStandalone), 0, (GInstanceInitFunc) clocks_world_standalone_instance_init, NULL };
	GType clocks_world_standalone_type_id;
	clocks_world_standalone_type_id = g_type_register_static (gtk_box_get_type (), "ClocksWorldStandalone", &g_define_type_info, 0);
	ClocksWorldStandalone_private_offset = g_type_add_instance_private (clocks_world_standalone_type_id, sizeof (ClocksWorldStandalonePrivate));
	return clocks_world_standalone_type_id;
}

GType
clocks_world_standalone_get_type (void)
{
	static volatile gsize clocks_world_standalone_type_id__once = 0;
	if (g_once_init_enter (&clocks_world_standalone_type_id__once)) {
		GType clocks_world_standalone_type_id;
		clocks_world_standalone_type_id = clocks_world_standalone_get_type_once ();
		g_once_init_leave (&clocks_world_standalone_type_id__once, clocks_world_standalone_type_id);
	}
	return clocks_world_standalone_type_id__once;
}

static void
_vala_clocks_world_standalone_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	ClocksWorldStandalone * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_WORLD_TYPE_STANDALONE, ClocksWorldStandalone);
	switch (property_id) {
		case CLOCKS_WORLD_STANDALONE_TITLE_PROPERTY:
		g_value_set_string (value, clocks_world_standalone_get_title (self));
		break;
		case CLOCKS_WORLD_STANDALONE_SUBTITLE_PROPERTY:
		g_value_set_string (value, clocks_world_standalone_get_subtitle (self));
		break;
		case CLOCKS_WORLD_STANDALONE_LOCATION_PROPERTY:
		g_value_set_object (value, clocks_world_standalone_get_location (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_clocks_world_standalone_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	ClocksWorldStandalone * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_WORLD_TYPE_STANDALONE, ClocksWorldStandalone);
	switch (property_id) {
		case CLOCKS_WORLD_STANDALONE_TITLE_PROPERTY:
		clocks_world_standalone_set_title (self, g_value_get_string (value));
		break;
		case CLOCKS_WORLD_STANDALONE_SUBTITLE_PROPERTY:
		clocks_world_standalone_set_subtitle (self, g_value_get_string (value));
		break;
		case CLOCKS_WORLD_STANDALONE_LOCATION_PROPERTY:
		clocks_world_standalone_set_location (self, g_value_get_object (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;
}

