/* widgets.c generated by valac 0.18.0.77-c8a68, the Vala compiler
 * generated from widgets.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 <glib.h>
#include <glib-object.h>
#include <libgd/gd.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <cairo.h>
#include <gdk/gdk.h>
#include <float.h>
#include <math.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <pango/pango.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>


#define CLOCKS_TYPE_TOOLBAR (clocks_toolbar_get_type ())
#define CLOCKS_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TYPE_TOOLBAR, ClocksToolbar))
#define CLOCKS_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_TYPE_TOOLBAR, ClocksToolbarClass))
#define CLOCKS_IS_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TYPE_TOOLBAR))
#define CLOCKS_IS_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_TYPE_TOOLBAR))
#define CLOCKS_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_TYPE_TOOLBAR, ClocksToolbarClass))

typedef struct _ClocksToolbar ClocksToolbar;
typedef struct _ClocksToolbarClass ClocksToolbarClass;
typedef struct _ClocksToolbarPrivate ClocksToolbarPrivate;

#define CLOCKS_TYPE_CLOCK (clocks_clock_get_type ())
#define CLOCKS_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TYPE_CLOCK, ClocksClock))
#define CLOCKS_IS_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TYPE_CLOCK))
#define CLOCKS_CLOCK_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLOCKS_TYPE_CLOCK, ClocksClockIface))

typedef struct _ClocksClock ClocksClock;
typedef struct _ClocksClockIface ClocksClockIface;

#define CLOCKS_TOOLBAR_TYPE_MODE (clocks_toolbar_mode_get_type ())
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block5Data Block5Data;

#define CLOCKS_TYPE_DIGITAL_CLOCK_RENDERER (clocks_digital_clock_renderer_get_type ())
#define CLOCKS_DIGITAL_CLOCK_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TYPE_DIGITAL_CLOCK_RENDERER, ClocksDigitalClockRenderer))
#define CLOCKS_DIGITAL_CLOCK_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_TYPE_DIGITAL_CLOCK_RENDERER, ClocksDigitalClockRendererClass))
#define CLOCKS_IS_DIGITAL_CLOCK_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TYPE_DIGITAL_CLOCK_RENDERER))
#define CLOCKS_IS_DIGITAL_CLOCK_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_TYPE_DIGITAL_CLOCK_RENDERER))
#define CLOCKS_DIGITAL_CLOCK_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_TYPE_DIGITAL_CLOCK_RENDERER, ClocksDigitalClockRendererClass))

typedef struct _ClocksDigitalClockRenderer ClocksDigitalClockRenderer;
typedef struct _ClocksDigitalClockRendererClass ClocksDigitalClockRendererClass;
typedef struct _ClocksDigitalClockRendererPrivate ClocksDigitalClockRendererPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define __vala_PangoLayoutLine_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoLayoutLine_free (var), NULL)))

#define CLOCKS_TYPE_ICON_VIEW (clocks_icon_view_get_type ())
#define CLOCKS_ICON_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TYPE_ICON_VIEW, ClocksIconView))
#define CLOCKS_ICON_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_TYPE_ICON_VIEW, ClocksIconViewClass))
#define CLOCKS_IS_ICON_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TYPE_ICON_VIEW))
#define CLOCKS_IS_ICON_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_TYPE_ICON_VIEW))
#define CLOCKS_ICON_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_TYPE_ICON_VIEW, ClocksIconViewClass))

typedef struct _ClocksIconView ClocksIconView;
typedef struct _ClocksIconViewClass ClocksIconViewClass;
typedef struct _ClocksIconViewPrivate ClocksIconViewPrivate;

#define CLOCKS_ICON_VIEW_TYPE_MODE (clocks_icon_view_mode_get_type ())

#define CLOCKS_ICON_VIEW_TYPE_COLUMN (clocks_icon_view_column_get_type ())
#define _gtk_tree_path_free0(var) ((var == NULL) ? NULL : (var = (gtk_tree_path_free (var), NULL)))
typedef struct _Block6Data Block6Data;
#define __g_list_free__gtk_tree_path_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__gtk_tree_path_free0_ (var), NULL)))

#define CLOCKS_TYPE_CONTENT_VIEW (clocks_content_view_get_type ())
#define CLOCKS_CONTENT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TYPE_CONTENT_VIEW, ClocksContentView))
#define CLOCKS_CONTENT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_TYPE_CONTENT_VIEW, ClocksContentViewClass))
#define CLOCKS_IS_CONTENT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TYPE_CONTENT_VIEW))
#define CLOCKS_IS_CONTENT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_TYPE_CONTENT_VIEW))
#define CLOCKS_CONTENT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_TYPE_CONTENT_VIEW, ClocksContentViewClass))

typedef struct _ClocksContentView ClocksContentView;
typedef struct _ClocksContentViewClass ClocksContentViewClass;
typedef struct _ClocksContentViewPrivate ClocksContentViewPrivate;
typedef struct _Block7Data Block7Data;

#define CLOCKS_TYPE_AM_PM_TOGGLE_BUTTON (clocks_am_pm_toggle_button_get_type ())
#define CLOCKS_AM_PM_TOGGLE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TYPE_AM_PM_TOGGLE_BUTTON, ClocksAmPmToggleButton))
#define CLOCKS_AM_PM_TOGGLE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_TYPE_AM_PM_TOGGLE_BUTTON, ClocksAmPmToggleButtonClass))
#define CLOCKS_IS_AM_PM_TOGGLE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TYPE_AM_PM_TOGGLE_BUTTON))
#define CLOCKS_IS_AM_PM_TOGGLE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_TYPE_AM_PM_TOGGLE_BUTTON))
#define CLOCKS_AM_PM_TOGGLE_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_TYPE_AM_PM_TOGGLE_BUTTON, ClocksAmPmToggleButtonClass))

typedef struct _ClocksAmPmToggleButton ClocksAmPmToggleButton;
typedef struct _ClocksAmPmToggleButtonClass ClocksAmPmToggleButtonClass;
typedef struct _ClocksAmPmToggleButtonPrivate ClocksAmPmToggleButtonPrivate;

#define CLOCKS_AM_PM_TOGGLE_BUTTON_TYPE_AM_PM (clocks_am_pm_toggle_button_am_pm_get_type ())
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

struct _ClocksToolbar {
	GdMainToolbar parent_instance;
	ClocksToolbarPrivate * priv;
};

struct _ClocksToolbarClass {
	GdMainToolbarClass parent_class;
};

struct _ClocksClockIface {
	GTypeInterface parent_iface;
	void (*activate_new) (ClocksClock* self);
	void (*activate_select_all) (ClocksClock* self);
	void (*activate_select_none) (ClocksClock* self);
	void (*update_toolbar) (ClocksClock* self);
	const gchar* (*get_label) (ClocksClock* self);
	void (*set_label) (ClocksClock* self, const gchar* value);
	ClocksToolbar* (*get_toolbar) (ClocksClock* self);
	void (*set_toolbar) (ClocksClock* self, ClocksToolbar* value);
};

typedef enum  {
	CLOCKS_TOOLBAR_MODE_NORMAL,
	CLOCKS_TOOLBAR_MODE_SELECTION,
	CLOCKS_TOOLBAR_MODE_STANDALONE
} ClocksToolbarMode;

struct _ClocksToolbarPrivate {
	GList* buttons;
	GList* clocks;
	ClocksToolbarMode _mode;
};

struct _Block5Data {
	int _ref_count_;
	ClocksToolbar * self;
	GtkToggleButton* button;
	ClocksClock* clock;
};

struct _ClocksDigitalClockRenderer {
	GtkCellRendererPixbuf parent_instance;
	ClocksDigitalClockRendererPrivate * priv;
};

struct _ClocksDigitalClockRendererClass {
	GtkCellRendererPixbufClass parent_class;
};

struct _ClocksDigitalClockRendererPrivate {
	gchar* _text;
	gchar* _subtext;
	gchar* _css_class;
	gboolean _active;
	gboolean _toggle_visible;
};

struct _ClocksIconView {
	GtkIconView parent_instance;
	ClocksIconViewPrivate * priv;
};

struct _ClocksIconViewClass {
	GtkIconViewClass parent_class;
};

typedef enum  {
	CLOCKS_ICON_VIEW_MODE_NORMAL,
	CLOCKS_ICON_VIEW_MODE_SELECTION
} ClocksIconViewMode;

struct _ClocksIconViewPrivate {
	ClocksIconViewMode _mode;
	ClocksDigitalClockRenderer* thumb_renderer;
};

typedef enum  {
	CLOCKS_ICON_VIEW_COLUMN_SELECTED,
	CLOCKS_ICON_VIEW_COLUMN_LABEL,
	CLOCKS_ICON_VIEW_COLUMN_ITEM,
	CLOCKS_ICON_VIEW_COLUMN_COLUMNS
} ClocksIconViewColumn;

struct _Block6Data {
	int _ref_count_;
	ClocksIconView * self;
	GList* items;
};

struct _ClocksContentView {
	GtkBin parent_instance;
	ClocksContentViewPrivate * priv;
};

struct _ClocksContentViewClass {
	GtkBinClass parent_class;
};

struct _ClocksContentViewPrivate {
	gboolean _empty;
	GtkWidget* empty_page;
	ClocksIconView* icon_view;
	ClocksToolbar* main_toolbar;
	GMenuModel* selection_menu;
	GtkToolbar* selection_toolbar;
	GtkOverlay* overlay;
	GtkScrolledWindow* scrolled_window;
};

struct _Block7Data {
	int _ref_count_;
	ClocksContentView * self;
	GtkTreeModel* model;
};

struct _ClocksAmPmToggleButton {
	GtkButton parent_instance;
	ClocksAmPmToggleButtonPrivate * priv;
};

struct _ClocksAmPmToggleButtonClass {
	GtkButtonClass parent_class;
};

typedef enum  {
	CLOCKS_AM_PM_TOGGLE_BUTTON_AM_PM_AM,
	CLOCKS_AM_PM_TOGGLE_BUTTON_AM_PM_PM
} ClocksAmPmToggleButtonAmPm;

struct _ClocksAmPmToggleButtonPrivate {
	ClocksAmPmToggleButtonAmPm _choice;
	GdStack* stack;
	GtkLabel* am_label;
	GtkLabel* pm_label;
};


static gpointer clocks_toolbar_parent_class = NULL;
static gpointer clocks_digital_clock_renderer_parent_class = NULL;
static gpointer clocks_icon_view_parent_class = NULL;
static gpointer clocks_content_view_parent_class = NULL;
static gpointer clocks_am_pm_toggle_button_parent_class = NULL;

GType clocks_toolbar_get_type (void) G_GNUC_CONST;
GType clocks_clock_get_type (void) G_GNUC_CONST;
GType clocks_toolbar_mode_get_type (void) G_GNUC_CONST;
#define CLOCKS_TOOLBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CLOCKS_TYPE_TOOLBAR, ClocksToolbarPrivate))
enum  {
	CLOCKS_TOOLBAR_DUMMY_PROPERTY,
	CLOCKS_TOOLBAR_MODE
};
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
ClocksToolbar* clocks_toolbar_new (void);
ClocksToolbar* clocks_toolbar_construct (GType object_type);
void clocks_toolbar_add_clock (ClocksToolbar* self, ClocksClock* clock);
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (void * _userdata_);
const gchar* clocks_clock_get_label (ClocksClock* self);
static void __lambda2_ (Block5Data* _data5_);
static void ___lambda2__gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
GtkButton* clocks_toolbar_add_button (ClocksToolbar* self, const gchar* icon_name, const gchar* label, gboolean pack_start);
void clocks_toolbar_clear (ClocksToolbar* self);
ClocksToolbarMode clocks_toolbar_get_mode (ClocksToolbar* self);
void clocks_toolbar_set_mode (ClocksToolbar* self, ClocksToolbarMode value);
static void clocks_toolbar_finalize (GObject* obj);
static void _vala_clocks_toolbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_clocks_toolbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType clocks_digital_clock_renderer_get_type (void) G_GNUC_CONST;
#define CLOCKS_DIGITAL_CLOCK_RENDERER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CLOCKS_TYPE_DIGITAL_CLOCK_RENDERER, ClocksDigitalClockRendererPrivate))
enum  {
	CLOCKS_DIGITAL_CLOCK_RENDERER_DUMMY_PROPERTY,
	CLOCKS_DIGITAL_CLOCK_RENDERER_TEXT,
	CLOCKS_DIGITAL_CLOCK_RENDERER_SUBTEXT,
	CLOCKS_DIGITAL_CLOCK_RENDERER_CSS_CLASS,
	CLOCKS_DIGITAL_CLOCK_RENDERER_ACTIVE,
	CLOCKS_DIGITAL_CLOCK_RENDERER_TOGGLE_VISIBLE
};
#define CLOCKS_DIGITAL_CLOCK_RENDERER_CHECK_ICON_SIZE 40
ClocksDigitalClockRenderer* clocks_digital_clock_renderer_new (void);
ClocksDigitalClockRenderer* clocks_digital_clock_renderer_construct (GType object_type);
static void clocks_digital_clock_renderer_real_render (GtkCellRenderer* base, cairo_t* cr, GtkWidget* widget, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags);
const gchar* clocks_digital_clock_renderer_get_css_class (ClocksDigitalClockRenderer* self);
const gchar* clocks_digital_clock_renderer_get_text (ClocksDigitalClockRenderer* self);
const gchar* clocks_digital_clock_renderer_get_subtext (ClocksDigitalClockRenderer* self);
static PangoLayoutLine* _vala_PangoLayoutLine_copy (PangoLayoutLine* self);
static void _vala_PangoLayoutLine_free (PangoLayoutLine* self);
gboolean clocks_digital_clock_renderer_get_toggle_visible (ClocksDigitalClockRenderer* self);
gboolean clocks_digital_clock_renderer_get_active (ClocksDigitalClockRenderer* self);
static void clocks_digital_clock_renderer_real_get_size (GtkCellRenderer* base, GtkWidget* widget, GdkRectangle* cell_area, gint* x_offset, gint* y_offset, gint* width, gint* height);
void clocks_digital_clock_renderer_set_text (ClocksDigitalClockRenderer* self, const gchar* value);
void clocks_digital_clock_renderer_set_subtext (ClocksDigitalClockRenderer* self, const gchar* value);
void clocks_digital_clock_renderer_set_css_class (ClocksDigitalClockRenderer* self, const gchar* value);
void clocks_digital_clock_renderer_set_active (ClocksDigitalClockRenderer* self, gboolean value);
void clocks_digital_clock_renderer_set_toggle_visible (ClocksDigitalClockRenderer* self, gboolean value);
static void clocks_digital_clock_renderer_finalize (GObject* obj);
static void _vala_clocks_digital_clock_renderer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_clocks_digital_clock_renderer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType clocks_icon_view_get_type (void) G_GNUC_CONST;
GType clocks_icon_view_mode_get_type (void) G_GNUC_CONST;
#define CLOCKS_ICON_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CLOCKS_TYPE_ICON_VIEW, ClocksIconViewPrivate))
enum  {
	CLOCKS_ICON_VIEW_DUMMY_PROPERTY,
	CLOCKS_ICON_VIEW_MODE
};
GType clocks_icon_view_column_get_type (void) G_GNUC_CONST;
ClocksIconView* clocks_icon_view_new (GtkCellLayoutDataFunc thumb_data_func, void* thumb_data_func_target, GDestroyNotify thumb_data_func_target_destroy_notify);
ClocksIconView* clocks_icon_view_construct (GType object_type, GtkCellLayoutDataFunc thumb_data_func, void* thumb_data_func_target, GDestroyNotify thumb_data_func_target_destroy_notify);
static gboolean clocks_icon_view_real_button_press_event (GtkWidget* base, GdkEventButton* event);
ClocksIconViewMode clocks_icon_view_get_mode (ClocksIconView* self);
void clocks_icon_view_add_item (ClocksIconView* self, const gchar* name, GObject* item);
GList* clocks_icon_view_get_selected_items (ClocksIconView* self);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void _gtk_tree_path_free0_ (gpointer var);
static void _g_list_free__gtk_tree_path_free0_ (GList* self);
static void block6_data_unref (void * _userdata_);
static gboolean __lambda4_ (Block6Data* _data6_, GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter);
static gboolean ___lambda4__gtk_tree_model_foreach_func (GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter, gpointer self);
void clocks_icon_view_select_all (ClocksIconView* self);
static gboolean __lambda5_ (ClocksIconView* self, GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter);
static gboolean ___lambda5__gtk_tree_model_foreach_func (GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter, gpointer self);
void clocks_icon_view_unselect_all (ClocksIconView* self);
static gboolean __lambda3_ (ClocksIconView* self, GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter);
static gboolean ___lambda3__gtk_tree_model_foreach_func (GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter, gpointer self);
void clocks_icon_view_remove_selected (ClocksIconView* self);
void clocks_icon_view_set_mode (ClocksIconView* self, ClocksIconViewMode value);
static void clocks_icon_view_finalize (GObject* obj);
static void _vala_clocks_icon_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_clocks_icon_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType clocks_content_view_get_type (void) G_GNUC_CONST;
#define CLOCKS_CONTENT_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CLOCKS_TYPE_CONTENT_VIEW, ClocksContentViewPrivate))
enum  {
	CLOCKS_CONTENT_VIEW_DUMMY_PROPERTY,
	CLOCKS_CONTENT_VIEW_EMPTY
};
#define CLOCKS_CONTENT_VIEW_SELECTION_TOOLBAR_WIDTH 300
ClocksContentView* clocks_content_view_new (GtkWidget* e, ClocksIconView* iv, ClocksToolbar* t);
ClocksContentView* clocks_content_view_construct (GType object_type, GtkWidget* e, ClocksIconView* iv, ClocksToolbar* t);
static Block7Data* block7_data_ref (Block7Data* _data7_);
static void block7_data_unref (void * _userdata_);
GtkBuilder* clocks_utils_load_ui (const gchar* ui);
static GtkToolbar* clocks_content_view_create_selection_toolbar (ClocksContentView* self);
static void __lambda7_ (Block7Data* _data7_);
static void clocks_content_view_update_empty_view (ClocksContentView* self, GtkTreeModel* model);
static void ___lambda7__gtk_tree_model_row_inserted (GtkTreeModel* _sender, GtkTreePath* path, GtkTreeIter* iter, gpointer self);
static void __lambda8_ (Block7Data* _data7_);
static void ___lambda8__gtk_tree_model_row_deleted (GtkTreeModel* _sender, GtkTreePath* path, gpointer self);
static void __lambda9_ (ClocksContentView* self);
static void ___lambda9__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __lambda10_ (ClocksContentView* self);
static void ___lambda10__gtk_icon_view_selection_changed (GtkIconView* _sender, gpointer self);
static void __lambda6_ (ClocksContentView* self);
static void ___lambda6__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void clocks_content_view_set_empty (ClocksContentView* self, gboolean value);
void clocks_content_view_update_toolbar (ClocksContentView* self);
static void ___lambda11_ (ClocksContentView* self);
static void ____lambda11__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void ___lambda12_ (ClocksContentView* self);
static void ____lambda12__gtk_button_clicked (GtkButton* _sender, gpointer self);
gboolean clocks_content_view_get_empty (ClocksContentView* self);
static void clocks_content_view_finalize (GObject* obj);
static void _vala_clocks_content_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_clocks_content_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType clocks_am_pm_toggle_button_get_type (void) G_GNUC_CONST;
GType clocks_am_pm_toggle_button_am_pm_get_type (void) G_GNUC_CONST;
#define CLOCKS_AM_PM_TOGGLE_BUTTON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CLOCKS_TYPE_AM_PM_TOGGLE_BUTTON, ClocksAmPmToggleButtonPrivate))
enum  {
	CLOCKS_AM_PM_TOGGLE_BUTTON_DUMMY_PROPERTY,
	CLOCKS_AM_PM_TOGGLE_BUTTON_CHOICE
};
ClocksAmPmToggleButton* clocks_am_pm_toggle_button_new (void);
ClocksAmPmToggleButton* clocks_am_pm_toggle_button_construct (GType object_type);
static void __lambda32_ (ClocksAmPmToggleButton* self);
ClocksAmPmToggleButtonAmPm clocks_am_pm_toggle_button_get_choice (ClocksAmPmToggleButton* self);
void clocks_am_pm_toggle_button_set_choice (ClocksAmPmToggleButton* self, ClocksAmPmToggleButtonAmPm value);
static void ___lambda32__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void clocks_am_pm_toggle_button_finalize (GObject* obj);
static void _vala_clocks_am_pm_toggle_button_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_clocks_am_pm_toggle_button_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


GType clocks_toolbar_mode_get_type (void) {
	static volatile gsize clocks_toolbar_mode_type_id__volatile = 0;
	if (g_once_init_enter (&clocks_toolbar_mode_type_id__volatile)) {
		static const GEnumValue values[] = {{CLOCKS_TOOLBAR_MODE_NORMAL, "CLOCKS_TOOLBAR_MODE_NORMAL", "normal"}, {CLOCKS_TOOLBAR_MODE_SELECTION, "CLOCKS_TOOLBAR_MODE_SELECTION", "selection"}, {CLOCKS_TOOLBAR_MODE_STANDALONE, "CLOCKS_TOOLBAR_MODE_STANDALONE", "standalone"}, {0, NULL, NULL}};
		GType clocks_toolbar_mode_type_id;
		clocks_toolbar_mode_type_id = g_enum_register_static ("ClocksToolbarMode", values);
		g_once_init_leave (&clocks_toolbar_mode_type_id__volatile, clocks_toolbar_mode_type_id);
	}
	return clocks_toolbar_mode_type_id__volatile;
}


static void _g_object_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void _g_list_free__g_object_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
	g_list_free (self);
}


ClocksToolbar* clocks_toolbar_construct (GType object_type) {
	ClocksToolbar * self = NULL;
	GtkStyleContext* _tmp0_ = NULL;
	self = (ClocksToolbar*) g_object_new (object_type, "show-modes", TRUE, "vexpand", FALSE, NULL);
	_tmp0_ = gtk_widget_get_style_context ((GtkWidget*) self);
	gtk_style_context_add_class (_tmp0_, GTK_STYLE_CLASS_MENUBAR);
	return self;
}


ClocksToolbar* clocks_toolbar_new (void) {
	return clocks_toolbar_construct (CLOCKS_TYPE_TOOLBAR);
}


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


static Block5Data* block5_data_ref (Block5Data* _data5_) {
	g_atomic_int_inc (&_data5_->_ref_count_);
	return _data5_;
}


static void block5_data_unref (void * _userdata_) {
	Block5Data* _data5_;
	_data5_ = (Block5Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
		ClocksToolbar * self;
		self = _data5_->self;
		_g_object_unref0 (_data5_->button);
		_g_object_unref0 (_data5_->clock);
		_g_object_unref0 (self);
		g_slice_free (Block5Data, _data5_);
	}
}


static void __lambda2_ (Block5Data* _data5_) {
	ClocksToolbar * self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = _data5_->self;
	_tmp0_ = gtk_toggle_button_get_active (_data5_->button);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		ClocksClock* _tmp2_;
		_tmp2_ = _data5_->clock;
		g_signal_emit_by_name (self, "clock-changed", _tmp2_);
	}
}


static void ___lambda2__gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) {
	__lambda2_ (self);
}


void clocks_toolbar_add_clock (ClocksToolbar* self, ClocksClock* clock) {
	Block5Data* _data5_;
	ClocksClock* _tmp0_;
	ClocksClock* _tmp1_;
	ClocksClock* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GtkWidget* _tmp5_ = NULL;
	GtkToggleButton* _tmp6_;
	ClocksClock* _tmp7_;
	ClocksClock* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (clock != NULL);
	_data5_ = g_slice_new0 (Block5Data);
	_data5_->_ref_count_ = 1;
	_data5_->self = g_object_ref (self);
	_tmp0_ = clock;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (_data5_->clock);
	_data5_->clock = _tmp1_;
	_tmp2_ = _data5_->clock;
	_tmp3_ = clocks_clock_get_label (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = gd_main_toolbar_add_mode ((GdMainToolbar*) self, _tmp4_);
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, GTK_TYPE_TOGGLE_BUTTON) ? ((GtkToggleButton*) _tmp5_) : NULL);
	_data5_->button = _tmp6_;
	_tmp7_ = _data5_->clock;
	_tmp8_ = _g_object_ref0 (_tmp7_);
	self->priv->clocks = g_list_prepend (self->priv->clocks, _tmp8_);
	g_signal_connect_data (_data5_->button, "toggled", (GCallback) ___lambda2__gtk_toggle_button_toggled, block5_data_ref (_data5_), (GClosureNotify) block5_data_unref, 0);
	block5_data_unref (_data5_);
	_data5_ = NULL;
}


GtkButton* clocks_toolbar_add_button (ClocksToolbar* self, const gchar* icon_name, const gchar* label, gboolean pack_start) {
	GtkButton* result = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_;
	GtkWidget* _tmp3_ = NULL;
	GtkWidget* _tmp4_;
	GtkWidget* button;
	GtkWidget* _tmp5_;
	GtkButton* _tmp6_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = icon_name;
	_tmp1_ = label;
	_tmp2_ = pack_start;
	_tmp3_ = gd_main_toolbar_add_button (G_TYPE_CHECK_INSTANCE_CAST (self, gd_main_toolbar_get_type (), GdMainToolbar), _tmp0_, _tmp1_, _tmp2_);
	_tmp4_ = _g_object_ref0 (_tmp3_);
	button = _tmp4_;
	_tmp5_ = _g_object_ref0 (button);
	self->priv->buttons = g_list_prepend (self->priv->buttons, _tmp5_);
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (button, GTK_TYPE_BUTTON, GtkButton));
	result = _tmp6_;
	_g_object_unref0 (button);
	return result;
}


void clocks_toolbar_clear (ClocksToolbar* self) {
	GList* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->buttons;
	{
		GList* button_collection = NULL;
		GList* button_it = NULL;
		button_collection = _tmp0_;
		for (button_it = button_collection; button_it != NULL; button_it = button_it->next) {
			GtkWidget* _tmp1_;
			GtkWidget* button = NULL;
			_tmp1_ = _g_object_ref0 ((GtkWidget*) button_it->data);
			button = _tmp1_;
			{
				GtkWidget* _tmp2_;
				_tmp2_ = button;
				gtk_widget_destroy (_tmp2_);
				_g_object_unref0 (button);
			}
		}
	}
}


ClocksToolbarMode clocks_toolbar_get_mode (ClocksToolbar* self) {
	ClocksToolbarMode result;
	ClocksToolbarMode _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_mode;
	result = _tmp0_;
	return result;
}


void clocks_toolbar_set_mode (ClocksToolbar* self, ClocksToolbarMode value) {
	ClocksToolbarMode _tmp0_;
	ClocksToolbarMode _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_mode;
	_tmp1_ = value;
	if (_tmp0_ != _tmp1_) {
		ClocksToolbarMode _tmp2_;
		ClocksToolbarMode _tmp3_;
		ClocksToolbarMode _tmp4_;
		_tmp2_ = value;
		self->priv->_mode = _tmp2_;
		_tmp3_ = self->priv->_mode;
		gd_main_toolbar_set_show_modes ((GdMainToolbar*) self, _tmp3_ == CLOCKS_TOOLBAR_MODE_NORMAL);
		_tmp4_ = self->priv->_mode;
		if (_tmp4_ == CLOCKS_TOOLBAR_MODE_SELECTION) {
			GtkStyleContext* _tmp5_ = NULL;
			_tmp5_ = gtk_widget_get_style_context ((GtkWidget*) self);
			gtk_style_context_add_class (_tmp5_, "selection-mode");
		} else {
			GtkStyleContext* _tmp6_ = NULL;
			_tmp6_ = gtk_widget_get_style_context ((GtkWidget*) self);
			gtk_style_context_remove_class (_tmp6_, "selection-mode");
		}
		g_object_notify ((GObject*) self, "mode");
	}
}


static void clocks_toolbar_class_init (ClocksToolbarClass * klass) {
	clocks_toolbar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ClocksToolbarPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_clocks_toolbar_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_clocks_toolbar_set_property;
	G_OBJECT_CLASS (klass)->finalize = clocks_toolbar_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_TOOLBAR_MODE, g_param_spec_enum ("mode", "mode", "mode", CLOCKS_TOOLBAR_TYPE_MODE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_signal_new ("clock_changed", CLOCKS_TYPE_TOOLBAR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, CLOCKS_TYPE_CLOCK);
}


static void clocks_toolbar_instance_init (ClocksToolbar * self) {
	self->priv = CLOCKS_TOOLBAR_GET_PRIVATE (self);
}


static void clocks_toolbar_finalize (GObject* obj) {
	ClocksToolbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLOCKS_TYPE_TOOLBAR, ClocksToolbar);
	__g_list_free__g_object_unref0_0 (self->priv->buttons);
	__g_list_free__g_object_unref0_0 (self->priv->clocks);
	G_OBJECT_CLASS (clocks_toolbar_parent_class)->finalize (obj);
}


GType clocks_toolbar_get_type (void) {
	static volatile gsize clocks_toolbar_type_id__volatile = 0;
	if (g_once_init_enter (&clocks_toolbar_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ClocksToolbarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clocks_toolbar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ClocksToolbar), 0, (GInstanceInitFunc) clocks_toolbar_instance_init, NULL };
		GType clocks_toolbar_type_id;
		clocks_toolbar_type_id = g_type_register_static (gd_main_toolbar_get_type (), "ClocksToolbar", &g_define_type_info, 0);
		g_once_init_leave (&clocks_toolbar_type_id__volatile, clocks_toolbar_type_id);
	}
	return clocks_toolbar_type_id__volatile;
}


static void _vala_clocks_toolbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ClocksToolbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_TYPE_TOOLBAR, ClocksToolbar);
	switch (property_id) {
		case CLOCKS_TOOLBAR_MODE:
		g_value_set_enum (value, clocks_toolbar_get_mode (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_clocks_toolbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ClocksToolbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_TYPE_TOOLBAR, ClocksToolbar);
	switch (property_id) {
		case CLOCKS_TOOLBAR_MODE:
		clocks_toolbar_set_mode (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


ClocksDigitalClockRenderer* clocks_digital_clock_renderer_construct (GType object_type) {
	ClocksDigitalClockRenderer * self = NULL;
	self = (ClocksDigitalClockRenderer*) g_object_new (object_type, NULL);
	return self;
}


ClocksDigitalClockRenderer* clocks_digital_clock_renderer_new (void) {
	return clocks_digital_clock_renderer_construct (CLOCKS_TYPE_DIGITAL_CLOCK_RENDERER);
}


static PangoLayoutLine* _vala_PangoLayoutLine_copy (PangoLayoutLine* self) {
	return g_boxed_copy (pango_layout_line_get_type (), self);
}


static gpointer __vala_PangoLayoutLine_copy0 (gpointer self) {
	return self ? _vala_PangoLayoutLine_copy (self) : NULL;
}


static void _vala_PangoLayoutLine_free (PangoLayoutLine* self) {
	g_boxed_free (pango_layout_line_get_type (), self);
}


static void clocks_digital_clock_renderer_real_render (GtkCellRenderer* base, cairo_t* cr, GtkWidget* widget, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags) {
	ClocksDigitalClockRenderer * self;
	GtkWidget* _tmp0_;
	GtkStyleContext* _tmp1_ = NULL;
	GtkStyleContext* _tmp2_;
	GtkStyleContext* context;
	GtkStyleContext* _tmp3_;
	GtkStyleContext* _tmp4_;
	GtkStyleContext* _tmp5_;
	const gchar* _tmp6_;
	cairo_t* _tmp7_;
	cairo_t* _tmp8_;
	GdkRectangle _tmp9_;
	cairo_t* _tmp10_;
	GdkPixbuf* _tmp11_ = NULL;
	GdkPixbuf* _tmp12_;
	GdkPixbuf* _tmp13_;
	gboolean _tmp14_;
	cairo_t* _tmp40_;
	GdkRectangle _tmp41_;
	gint _tmp42_;
	GdkRectangle _tmp43_;
	gint _tmp44_;
	gint margin;
	GdkPixbuf* _tmp45_ = NULL;
	GdkPixbuf* _tmp46_;
	GdkPixbuf* _tmp47_;
	gboolean _tmp48_;
	GdkRectangle _tmp56_;
	gint _tmp57_;
	gint _tmp58_;
	gint w;
	GtkWidget* _tmp59_;
	PangoLayout* _tmp60_ = NULL;
	PangoLayout* layout;
	PangoLayout* _tmp61_;
	const gchar* _tmp62_;
	gchar* _tmp63_ = NULL;
	gchar* _tmp64_;
	PangoLayout* _tmp65_;
	gint _tmp66_;
	PangoLayout* _tmp67_;
	gint text_w = 0;
	gint text_h = 0;
	PangoLayout* _tmp68_;
	gint _tmp69_ = 0;
	gint _tmp70_ = 0;
	PangoLayout* layout_subtext;
	gint subtext_w;
	gint subtext_h;
	gint subtext_pad;
	const gchar* _tmp71_;
	gint stripe_h;
	gint _tmp92_;
	gint x;
	GdkRectangle _tmp93_;
	gint _tmp94_;
	gint _tmp95_;
	gint y;
	GtkStyleContext* _tmp96_;
	GtkStyleContext* _tmp97_;
	cairo_t* _tmp98_;
	gint _tmp99_;
	gint _tmp100_;
	gint _tmp101_;
	gint _tmp102_;
	GtkStyleContext* _tmp103_;
	cairo_t* _tmp104_;
	gint _tmp105_;
	gint _tmp106_;
	gint _tmp107_;
	gint _tmp108_;
	gint _tmp109_;
	gint _tmp110_;
	gint _tmp111_;
	gint _tmp112_;
	gint _tmp113_;
	GtkStyleContext* _tmp114_;
	cairo_t* _tmp115_;
	gint _tmp116_;
	gint _tmp117_;
	PangoLayout* _tmp118_;
	const gchar* _tmp119_;
	GtkStyleContext* _tmp128_;
	gboolean _tmp129_;
	cairo_t* _tmp151_;
	self = (ClocksDigitalClockRenderer*) base;
	g_return_if_fail (cr != NULL);
	g_return_if_fail (widget != NULL);
	g_return_if_fail (background_area != NULL);
	g_return_if_fail (cell_area != NULL);
	_tmp0_ = widget;
	_tmp1_ = gtk_widget_get_style_context (_tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	context = _tmp2_;
	_tmp3_ = context;
	gtk_style_context_save (_tmp3_);
	_tmp4_ = context;
	gtk_style_context_add_class (_tmp4_, "clocks-digital-renderer");
	_tmp5_ = context;
	_tmp6_ = self->priv->_css_class;
	gtk_style_context_add_class (_tmp5_, _tmp6_);
	_tmp7_ = cr;
	cairo_save (_tmp7_);
	_tmp8_ = cr;
	_tmp9_ = *cell_area;
	gdk_cairo_rectangle (_tmp8_, &_tmp9_);
	_tmp10_ = cr;
	cairo_clip (_tmp10_);
	g_object_get ((GtkCellRendererPixbuf*) self, "pixbuf", &_tmp11_, NULL);
	_tmp12_ = _tmp11_;
	_tmp13_ = _tmp12_;
	_tmp14_ = _tmp13_ != NULL;
	_g_object_unref0 (_tmp13_);
	if (_tmp14_) {
		cairo_t* _tmp15_;
		GtkWidget* _tmp16_;
		GdkRectangle _tmp17_;
		GdkRectangle _tmp18_;
		GtkCellRendererState _tmp19_;
		_tmp15_ = cr;
		_tmp16_ = widget;
		_tmp17_ = *background_area;
		_tmp18_ = *cell_area;
		_tmp19_ = flags;
		GTK_CELL_RENDERER_CLASS (clocks_digital_clock_renderer_parent_class)->render ((GtkCellRenderer*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_CELL_RENDERER_PIXBUF, GtkCellRendererPixbuf), _tmp15_, _tmp16_, &_tmp17_, &_tmp18_, _tmp19_);
	} else {
		GtkStyleContext* _tmp20_;
		cairo_t* _tmp21_;
		GdkRectangle _tmp22_;
		gint _tmp23_;
		GdkRectangle _tmp24_;
		gint _tmp25_;
		GdkRectangle _tmp26_;
		gint _tmp27_;
		GdkRectangle _tmp28_;
		gint _tmp29_;
		GtkStyleContext* _tmp30_;
		cairo_t* _tmp31_;
		GdkRectangle _tmp32_;
		gint _tmp33_;
		GdkRectangle _tmp34_;
		gint _tmp35_;
		GdkRectangle _tmp36_;
		gint _tmp37_;
		GdkRectangle _tmp38_;
		gint _tmp39_;
		_tmp20_ = context;
		_tmp21_ = cr;
		_tmp22_ = *cell_area;
		_tmp23_ = _tmp22_.x;
		_tmp24_ = *cell_area;
		_tmp25_ = _tmp24_.y;
		_tmp26_ = *cell_area;
		_tmp27_ = _tmp26_.width;
		_tmp28_ = *cell_area;
		_tmp29_ = _tmp28_.height;
		gtk_render_frame (_tmp20_, _tmp21_, (gdouble) _tmp23_, (gdouble) _tmp25_, (gdouble) _tmp27_, (gdouble) _tmp29_);
		_tmp30_ = context;
		_tmp31_ = cr;
		_tmp32_ = *cell_area;
		_tmp33_ = _tmp32_.x;
		_tmp34_ = *cell_area;
		_tmp35_ = _tmp34_.y;
		_tmp36_ = *cell_area;
		_tmp37_ = _tmp36_.width;
		_tmp38_ = *cell_area;
		_tmp39_ = _tmp38_.height;
		gtk_render_background (_tmp30_, _tmp31_, (gdouble) _tmp33_, (gdouble) _tmp35_, (gdouble) _tmp37_, (gdouble) _tmp39_);
	}
	_tmp40_ = cr;
	_tmp41_ = *cell_area;
	_tmp42_ = _tmp41_.x;
	_tmp43_ = *cell_area;
	_tmp44_ = _tmp43_.y;
	cairo_translate (_tmp40_, (gdouble) _tmp42_, (gdouble) _tmp44_);
	margin = 0;
	g_object_get ((GtkCellRendererPixbuf*) self, "pixbuf", &_tmp45_, NULL);
	_tmp46_ = _tmp45_;
	_tmp47_ = _tmp46_;
	_tmp48_ = _tmp47_ != NULL;
	_g_object_unref0 (_tmp47_);
	if (_tmp48_) {
		GdkRectangle _tmp49_;
		gint _tmp50_;
		GdkPixbuf* _tmp51_ = NULL;
		GdkPixbuf* _tmp52_;
		GdkPixbuf* _tmp53_;
		gint _tmp54_;
		gint _tmp55_;
		_tmp49_ = *cell_area;
		_tmp50_ = _tmp49_.width;
		g_object_get ((GtkCellRendererPixbuf*) self, "pixbuf", &_tmp51_, NULL);
		_tmp52_ = _tmp51_;
		_tmp53_ = _tmp52_;
		_tmp54_ = gdk_pixbuf_get_width (_tmp53_);
		_tmp55_ = _tmp54_;
		margin = (gint) ((_tmp50_ - _tmp55_) / 2);
		_g_object_unref0 (_tmp53_);
	}
	_tmp56_ = *cell_area;
	_tmp57_ = _tmp56_.width;
	_tmp58_ = margin;
	w = _tmp57_ - (2 * _tmp58_);
	_tmp59_ = widget;
	_tmp60_ = gtk_widget_create_pango_layout (_tmp59_, "");
	layout = _tmp60_;
	_tmp61_ = layout;
	_tmp62_ = self->priv->_text;
	_tmp63_ = g_strdup_printf ("<span font_desc=\"32.0\">%s</span>", _tmp62_);
	_tmp64_ = _tmp63_;
	pango_layout_set_markup (_tmp61_, _tmp64_, -1);
	_g_free0 (_tmp64_);
	_tmp65_ = layout;
	_tmp66_ = w;
	pango_layout_set_width (_tmp65_, _tmp66_ * PANGO_SCALE);
	_tmp67_ = layout;
	pango_layout_set_alignment (_tmp67_, PANGO_ALIGN_CENTER);
	_tmp68_ = layout;
	pango_layout_get_pixel_size (_tmp68_, &_tmp69_, &_tmp70_);
	text_w = _tmp69_;
	text_h = _tmp70_;
	layout_subtext = NULL;
	subtext_w = 0;
	subtext_h = 0;
	subtext_pad = 0;
	_tmp71_ = self->priv->_subtext;
	if (_tmp71_ != NULL) {
		GtkWidget* _tmp72_;
		PangoLayout* _tmp73_ = NULL;
		PangoLayout* _tmp74_;
		const gchar* _tmp75_;
		gchar* _tmp76_ = NULL;
		gchar* _tmp77_;
		PangoLayout* _tmp78_;
		gint _tmp79_;
		PangoLayout* _tmp80_;
		PangoLayout* _tmp81_;
		gint _tmp82_ = 0;
		gint _tmp83_ = 0;
		PangoLayout* _tmp84_;
		PangoLayoutLine* _tmp85_ = NULL;
		PangoLayoutLine* _tmp86_;
		PangoLayoutLine* line;
		PangoRectangle ink_rect = {0};
		PangoRectangle log_rect = {0};
		PangoLayoutLine* _tmp87_;
		PangoRectangle _tmp88_ = {0};
		PangoRectangle _tmp89_ = {0};
		PangoRectangle _tmp90_;
		gint _tmp91_;
		_tmp72_ = widget;
		_tmp73_ = gtk_widget_create_pango_layout (_tmp72_, "");
		_g_object_unref0 (layout_subtext);
		layout_subtext = _tmp73_;
		_tmp74_ = layout_subtext;
		_tmp75_ = self->priv->_subtext;
		_tmp76_ = g_strdup_printf ("<span font_desc=\"14.0\">%s</span>", _tmp75_);
		_tmp77_ = _tmp76_;
		pango_layout_set_markup (_tmp74_, _tmp77_, -1);
		_g_free0 (_tmp77_);
		_tmp78_ = layout_subtext;
		_tmp79_ = w;
		pango_layout_set_width (_tmp78_, _tmp79_ * PANGO_SCALE);
		_tmp80_ = layout_subtext;
		pango_layout_set_alignment (_tmp80_, PANGO_ALIGN_CENTER);
		_tmp81_ = layout_subtext;
		pango_layout_get_pixel_size (_tmp81_, &_tmp82_, &_tmp83_);
		subtext_w = _tmp82_;
		subtext_h = _tmp83_;
		subtext_pad = 4;
		_tmp84_ = layout_subtext;
		_tmp85_ = pango_layout_get_line (_tmp84_, 0);
		_tmp86_ = __vala_PangoLayoutLine_copy0 (_tmp85_);
		line = _tmp86_;
		_tmp87_ = line;
		pango_layout_line_get_pixel_extents (_tmp87_, &_tmp88_, &_tmp89_);
		ink_rect = _tmp88_;
		log_rect = _tmp89_;
		_tmp90_ = log_rect;
		_tmp91_ = _tmp90_.width;
		subtext_w = _tmp91_;
		__vala_PangoLayoutLine_free0 (line);
	}
	stripe_h = 128;
	_tmp92_ = margin;
	x = _tmp92_;
	_tmp93_ = *cell_area;
	_tmp94_ = _tmp93_.height;
	_tmp95_ = stripe_h;
	y = (_tmp94_ - _tmp95_) / 2;
	_tmp96_ = context;
	gtk_style_context_add_class (_tmp96_, "stripe");
	_tmp97_ = context;
	_tmp98_ = cr;
	_tmp99_ = x;
	_tmp100_ = y;
	_tmp101_ = w;
	_tmp102_ = stripe_h;
	gtk_render_frame (_tmp97_, _tmp98_, (gdouble) _tmp99_, (gdouble) _tmp100_, (gdouble) _tmp101_, (gdouble) _tmp102_);
	_tmp103_ = context;
	_tmp104_ = cr;
	_tmp105_ = x;
	_tmp106_ = y;
	_tmp107_ = w;
	_tmp108_ = stripe_h;
	gtk_render_background (_tmp103_, _tmp104_, (gdouble) _tmp105_, (gdouble) _tmp106_, (gdouble) _tmp107_, (gdouble) _tmp108_);
	_tmp109_ = y;
	_tmp110_ = stripe_h;
	_tmp111_ = text_h;
	_tmp112_ = subtext_h;
	_tmp113_ = subtext_pad;
	y = _tmp109_ + ((((_tmp110_ - _tmp111_) - _tmp112_) - _tmp113_) / 2);
	_tmp114_ = context;
	_tmp115_ = cr;
	_tmp116_ = x;
	_tmp117_ = y;
	_tmp118_ = layout;
	gtk_render_layout (_tmp114_, _tmp115_, (gdouble) _tmp116_, (gdouble) _tmp117_, _tmp118_);
	_tmp119_ = self->priv->_subtext;
	if (_tmp119_ != NULL) {
		gint _tmp120_;
		gint _tmp121_;
		gint _tmp122_;
		GtkStyleContext* _tmp123_;
		cairo_t* _tmp124_;
		gint _tmp125_;
		gint _tmp126_;
		PangoLayout* _tmp127_;
		_tmp120_ = y;
		_tmp121_ = text_h;
		_tmp122_ = subtext_pad;
		y = _tmp120_ + (_tmp121_ + _tmp122_);
		_tmp123_ = context;
		_tmp124_ = cr;
		_tmp125_ = x;
		_tmp126_ = y;
		_tmp127_ = layout_subtext;
		gtk_render_layout (_tmp123_, _tmp124_, (gdouble) _tmp125_, (gdouble) _tmp126_, _tmp127_);
	}
	_tmp128_ = context;
	gtk_style_context_restore (_tmp128_);
	_tmp129_ = self->priv->_toggle_visible;
	if (_tmp129_) {
		gint xpad = 0;
		gint ypad = 0;
		gint x_offset = 0;
		gint _tmp130_ = 0;
		gint _tmp131_ = 0;
		GtkWidget* _tmp132_;
		GtkTextDirection _tmp133_ = 0;
		gint _tmp138_;
		gint check_x;
		GdkRectangle _tmp139_;
		gint _tmp140_;
		gint _tmp141_;
		gint check_y;
		GtkStyleContext* _tmp142_;
		GtkStyleContext* _tmp143_;
		gboolean _tmp144_;
		GtkStyleContext* _tmp146_;
		cairo_t* _tmp147_;
		gint _tmp148_;
		gint _tmp149_;
		GtkStyleContext* _tmp150_;
		gtk_cell_renderer_get_padding ((GtkCellRenderer*) self, &_tmp130_, &_tmp131_);
		xpad = _tmp130_;
		ypad = _tmp131_;
		_tmp132_ = widget;
		_tmp133_ = gtk_widget_get_direction (_tmp132_);
		if (_tmp133_ == GTK_TEXT_DIR_RTL) {
			gint _tmp134_;
			_tmp134_ = xpad;
			x_offset = _tmp134_;
		} else {
			GdkRectangle _tmp135_;
			gint _tmp136_;
			gint _tmp137_;
			_tmp135_ = *cell_area;
			_tmp136_ = _tmp135_.width;
			_tmp137_ = xpad;
			x_offset = (_tmp136_ - CLOCKS_DIGITAL_CLOCK_RENDERER_CHECK_ICON_SIZE) - _tmp137_;
		}
		_tmp138_ = x_offset;
		check_x = _tmp138_;
		_tmp139_ = *cell_area;
		_tmp140_ = _tmp139_.height;
		_tmp141_ = ypad;
		check_y = (_tmp140_ - CLOCKS_DIGITAL_CLOCK_RENDERER_CHECK_ICON_SIZE) - _tmp141_;
		_tmp142_ = context;
		gtk_style_context_save (_tmp142_);
		_tmp143_ = context;
		gtk_style_context_add_class (_tmp143_, GTK_STYLE_CLASS_CHECK);
		_tmp144_ = self->priv->_active;
		if (_tmp144_) {
			GtkStyleContext* _tmp145_;
			_tmp145_ = context;
			gtk_style_context_set_state (_tmp145_, GTK_STATE_FLAG_ACTIVE);
		}
		_tmp146_ = context;
		_tmp147_ = cr;
		_tmp148_ = check_x;
		_tmp149_ = check_y;
		gtk_render_check (_tmp146_, _tmp147_, (gdouble) _tmp148_, (gdouble) _tmp149_, (gdouble) CLOCKS_DIGITAL_CLOCK_RENDERER_CHECK_ICON_SIZE, (gdouble) CLOCKS_DIGITAL_CLOCK_RENDERER_CHECK_ICON_SIZE);
		_tmp150_ = context;
		gtk_style_context_restore (_tmp150_);
	}
	_tmp151_ = cr;
	cairo_restore (_tmp151_);
	_g_object_unref0 (layout_subtext);
	_g_object_unref0 (layout);
	_g_object_unref0 (context);
}


static void clocks_digital_clock_renderer_real_get_size (GtkCellRenderer* base, GtkWidget* widget, GdkRectangle* cell_area, gint* x_offset, gint* y_offset, gint* width, gint* height) {
	ClocksDigitalClockRenderer * self;
	gint _vala_x_offset = 0;
	gint _vala_y_offset = 0;
	gint _vala_width = 0;
	gint _vala_height = 0;
	GtkWidget* _tmp0_;
	GdkRectangle* _tmp1_;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	gint _tmp6_;
	gint _tmp7_;
	self = (ClocksDigitalClockRenderer*) base;
	g_return_if_fail (widget != NULL);
	_tmp0_ = widget;
	_tmp1_ = cell_area;
	GTK_CELL_RENDERER_CLASS (clocks_digital_clock_renderer_parent_class)->get_size ((GtkCellRenderer*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_CELL_RENDERER_PIXBUF, GtkCellRendererPixbuf), _tmp0_, _tmp1_, &_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_);
	_vala_x_offset = _tmp2_;
	_vala_y_offset = _tmp3_;
	_vala_width = _tmp4_;
	_vala_height = _tmp5_;
	_tmp6_ = _vala_width;
	_vala_width = _tmp6_ + (CLOCKS_DIGITAL_CLOCK_RENDERER_CHECK_ICON_SIZE / 4);
	_tmp7_ = _vala_height;
	_vala_height = _tmp7_ + (CLOCKS_DIGITAL_CLOCK_RENDERER_CHECK_ICON_SIZE / 4);
	if (x_offset) {
		*x_offset = _vala_x_offset;
	}
	if (y_offset) {
		*y_offset = _vala_y_offset;
	}
	if (width) {
		*width = _vala_width;
	}
	if (height) {
		*height = _vala_height;
	}
}


const gchar* clocks_digital_clock_renderer_get_text (ClocksDigitalClockRenderer* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_text;
	result = _tmp0_;
	return result;
}


void clocks_digital_clock_renderer_set_text (ClocksDigitalClockRenderer* self, const gchar* value) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_text);
	self->priv->_text = _tmp1_;
	g_object_notify ((GObject *) self, "text");
}


const gchar* clocks_digital_clock_renderer_get_subtext (ClocksDigitalClockRenderer* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_subtext;
	result = _tmp0_;
	return result;
}


void clocks_digital_clock_renderer_set_subtext (ClocksDigitalClockRenderer* self, const gchar* value) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_subtext);
	self->priv->_subtext = _tmp1_;
	g_object_notify ((GObject *) self, "subtext");
}


const gchar* clocks_digital_clock_renderer_get_css_class (ClocksDigitalClockRenderer* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_css_class;
	result = _tmp0_;
	return result;
}


void clocks_digital_clock_renderer_set_css_class (ClocksDigitalClockRenderer* self, const gchar* value) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_css_class);
	self->priv->_css_class = _tmp1_;
	g_object_notify ((GObject *) self, "css-class");
}


gboolean clocks_digital_clock_renderer_get_active (ClocksDigitalClockRenderer* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_active;
	result = _tmp0_;
	return result;
}


void clocks_digital_clock_renderer_set_active (ClocksDigitalClockRenderer* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_active = _tmp0_;
	g_object_notify ((GObject *) self, "active");
}


gboolean clocks_digital_clock_renderer_get_toggle_visible (ClocksDigitalClockRenderer* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_toggle_visible;
	result = _tmp0_;
	return result;
}


void clocks_digital_clock_renderer_set_toggle_visible (ClocksDigitalClockRenderer* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_toggle_visible = _tmp0_;
	g_object_notify ((GObject *) self, "toggle-visible");
}


static void clocks_digital_clock_renderer_class_init (ClocksDigitalClockRendererClass * klass) {
	clocks_digital_clock_renderer_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ClocksDigitalClockRendererPrivate));
	GTK_CELL_RENDERER_CLASS (klass)->render = clocks_digital_clock_renderer_real_render;
	GTK_CELL_RENDERER_CLASS (klass)->get_size = clocks_digital_clock_renderer_real_get_size;
	G_OBJECT_CLASS (klass)->get_property = _vala_clocks_digital_clock_renderer_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_clocks_digital_clock_renderer_set_property;
	G_OBJECT_CLASS (klass)->finalize = clocks_digital_clock_renderer_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_DIGITAL_CLOCK_RENDERER_TEXT, g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_DIGITAL_CLOCK_RENDERER_SUBTEXT, g_param_spec_string ("subtext", "subtext", "subtext", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_DIGITAL_CLOCK_RENDERER_CSS_CLASS, g_param_spec_string ("css-class", "css-class", "css-class", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_DIGITAL_CLOCK_RENDERER_ACTIVE, g_param_spec_boolean ("active", "active", "active", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_DIGITAL_CLOCK_RENDERER_TOGGLE_VISIBLE, g_param_spec_boolean ("toggle-visible", "toggle-visible", "toggle-visible", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void clocks_digital_clock_renderer_instance_init (ClocksDigitalClockRenderer * self) {
	self->priv = CLOCKS_DIGITAL_CLOCK_RENDERER_GET_PRIVATE (self);
	self->priv->_active = FALSE;
	self->priv->_toggle_visible = FALSE;
}


static void clocks_digital_clock_renderer_finalize (GObject* obj) {
	ClocksDigitalClockRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLOCKS_TYPE_DIGITAL_CLOCK_RENDERER, ClocksDigitalClockRenderer);
	_g_free0 (self->priv->_text);
	_g_free0 (self->priv->_subtext);
	_g_free0 (self->priv->_css_class);
	G_OBJECT_CLASS (clocks_digital_clock_renderer_parent_class)->finalize (obj);
}


GType clocks_digital_clock_renderer_get_type (void) {
	static volatile gsize clocks_digital_clock_renderer_type_id__volatile = 0;
	if (g_once_init_enter (&clocks_digital_clock_renderer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ClocksDigitalClockRendererClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clocks_digital_clock_renderer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ClocksDigitalClockRenderer), 0, (GInstanceInitFunc) clocks_digital_clock_renderer_instance_init, NULL };
		GType clocks_digital_clock_renderer_type_id;
		clocks_digital_clock_renderer_type_id = g_type_register_static (GTK_TYPE_CELL_RENDERER_PIXBUF, "ClocksDigitalClockRenderer", &g_define_type_info, 0);
		g_once_init_leave (&clocks_digital_clock_renderer_type_id__volatile, clocks_digital_clock_renderer_type_id);
	}
	return clocks_digital_clock_renderer_type_id__volatile;
}


static void _vala_clocks_digital_clock_renderer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ClocksDigitalClockRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_TYPE_DIGITAL_CLOCK_RENDERER, ClocksDigitalClockRenderer);
	switch (property_id) {
		case CLOCKS_DIGITAL_CLOCK_RENDERER_TEXT:
		g_value_set_string (value, clocks_digital_clock_renderer_get_text (self));
		break;
		case CLOCKS_DIGITAL_CLOCK_RENDERER_SUBTEXT:
		g_value_set_string (value, clocks_digital_clock_renderer_get_subtext (self));
		break;
		case CLOCKS_DIGITAL_CLOCK_RENDERER_CSS_CLASS:
		g_value_set_string (value, clocks_digital_clock_renderer_get_css_class (self));
		break;
		case CLOCKS_DIGITAL_CLOCK_RENDERER_ACTIVE:
		g_value_set_boolean (value, clocks_digital_clock_renderer_get_active (self));
		break;
		case CLOCKS_DIGITAL_CLOCK_RENDERER_TOGGLE_VISIBLE:
		g_value_set_boolean (value, clocks_digital_clock_renderer_get_toggle_visible (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_clocks_digital_clock_renderer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ClocksDigitalClockRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_TYPE_DIGITAL_CLOCK_RENDERER, ClocksDigitalClockRenderer);
	switch (property_id) {
		case CLOCKS_DIGITAL_CLOCK_RENDERER_TEXT:
		clocks_digital_clock_renderer_set_text (self, g_value_get_string (value));
		break;
		case CLOCKS_DIGITAL_CLOCK_RENDERER_SUBTEXT:
		clocks_digital_clock_renderer_set_subtext (self, g_value_get_string (value));
		break;
		case CLOCKS_DIGITAL_CLOCK_RENDERER_CSS_CLASS:
		clocks_digital_clock_renderer_set_css_class (self, g_value_get_string (value));
		break;
		case CLOCKS_DIGITAL_CLOCK_RENDERER_ACTIVE:
		clocks_digital_clock_renderer_set_active (self, g_value_get_boolean (value));
		break;
		case CLOCKS_DIGITAL_CLOCK_RENDERER_TOGGLE_VISIBLE:
		clocks_digital_clock_renderer_set_toggle_visible (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


GType clocks_icon_view_mode_get_type (void) {
	static volatile gsize clocks_icon_view_mode_type_id__volatile = 0;
	if (g_once_init_enter (&clocks_icon_view_mode_type_id__volatile)) {
		static const GEnumValue values[] = {{CLOCKS_ICON_VIEW_MODE_NORMAL, "CLOCKS_ICON_VIEW_MODE_NORMAL", "normal"}, {CLOCKS_ICON_VIEW_MODE_SELECTION, "CLOCKS_ICON_VIEW_MODE_SELECTION", "selection"}, {0, NULL, NULL}};
		GType clocks_icon_view_mode_type_id;
		clocks_icon_view_mode_type_id = g_enum_register_static ("ClocksIconViewMode", values);
		g_once_init_leave (&clocks_icon_view_mode_type_id__volatile, clocks_icon_view_mode_type_id);
	}
	return clocks_icon_view_mode_type_id__volatile;
}


GType clocks_icon_view_column_get_type (void) {
	static volatile gsize clocks_icon_view_column_type_id__volatile = 0;
	if (g_once_init_enter (&clocks_icon_view_column_type_id__volatile)) {
		static const GEnumValue values[] = {{CLOCKS_ICON_VIEW_COLUMN_SELECTED, "CLOCKS_ICON_VIEW_COLUMN_SELECTED", "selected"}, {CLOCKS_ICON_VIEW_COLUMN_LABEL, "CLOCKS_ICON_VIEW_COLUMN_LABEL", "label"}, {CLOCKS_ICON_VIEW_COLUMN_ITEM, "CLOCKS_ICON_VIEW_COLUMN_ITEM", "item"}, {CLOCKS_ICON_VIEW_COLUMN_COLUMNS, "CLOCKS_ICON_VIEW_COLUMN_COLUMNS", "columns"}, {0, NULL, NULL}};
		GType clocks_icon_view_column_type_id;
		clocks_icon_view_column_type_id = g_enum_register_static ("ClocksIconViewColumn", values);
		g_once_init_leave (&clocks_icon_view_column_type_id__volatile, clocks_icon_view_column_type_id);
	}
	return clocks_icon_view_column_type_id__volatile;
}


ClocksIconView* clocks_icon_view_construct (GType object_type, GtkCellLayoutDataFunc thumb_data_func, void* thumb_data_func_target, GDestroyNotify thumb_data_func_target_destroy_notify) {
	ClocksIconView * self = NULL;
	GtkListStore* _tmp0_;
	GtkListStore* _tmp1_;
	GtkStyleContext* _tmp2_ = NULL;
	ClocksDigitalClockRenderer* _tmp3_;
	ClocksDigitalClockRenderer* _tmp4_;
	ClocksDigitalClockRenderer* _tmp5_;
	ClocksDigitalClockRenderer* _tmp6_;
	ClocksDigitalClockRenderer* _tmp7_;
	ClocksDigitalClockRenderer* _tmp8_;
	GtkCellLayoutDataFunc _tmp9_;
	void* _tmp9__target;
	GDestroyNotify _tmp9__target_destroy_notify;
	GtkCellRendererText* _tmp10_;
	GtkCellRendererText* text_renderer;
	self = (ClocksIconView*) g_object_new (object_type, "selection-mode", GTK_SELECTION_NONE, "mode", CLOCKS_ICON_VIEW_MODE_NORMAL, NULL);
	_tmp0_ = gtk_list_store_new ((gint) CLOCKS_ICON_VIEW_COLUMN_COLUMNS, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_OBJECT);
	_tmp1_ = _tmp0_;
	gtk_icon_view_set_model ((GtkIconView*) self, (GtkTreeModel*) _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = gtk_widget_get_style_context ((GtkWidget*) self);
	gtk_style_context_add_class (_tmp2_, "content-view");
	gtk_icon_view_set_column_spacing ((GtkIconView*) self, 20);
	gtk_icon_view_set_margin ((GtkIconView*) self, 16);
	_tmp3_ = clocks_digital_clock_renderer_new ();
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->thumb_renderer);
	self->priv->thumb_renderer = _tmp3_;
	_tmp4_ = self->priv->thumb_renderer;
	gtk_cell_renderer_set_alignment ((GtkCellRenderer*) _tmp4_, 0.5f, 0.5f);
	_tmp5_ = self->priv->thumb_renderer;
	gtk_cell_renderer_set_fixed_size ((GtkCellRenderer*) _tmp5_, 256, 256);
	_tmp6_ = self->priv->thumb_renderer;
	gtk_cell_layout_pack_start ((GtkCellLayout*) self, (GtkCellRenderer*) _tmp6_, FALSE);
	_tmp7_ = self->priv->thumb_renderer;
	gtk_cell_layout_add_attribute ((GtkCellLayout*) self, (GtkCellRenderer*) _tmp7_, "active", (gint) CLOCKS_ICON_VIEW_COLUMN_SELECTED);
	_tmp8_ = self->priv->thumb_renderer;
	_tmp9_ = thumb_data_func;
	_tmp9__target = thumb_data_func_target;
	_tmp9__target_destroy_notify = thumb_data_func_target_destroy_notify;
	thumb_data_func_target_destroy_notify = NULL;
	gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) self, (GtkCellRenderer*) _tmp8_, _tmp9_, _tmp9__target, _tmp9__target_destroy_notify);
	_tmp10_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp10_);
	text_renderer = _tmp10_;
	gtk_cell_renderer_set_alignment ((GtkCellRenderer*) text_renderer, 0.5f, 0.5f);
	gtk_cell_renderer_set_fixed_size ((GtkCellRenderer*) text_renderer, 256, -1);
	g_object_set (text_renderer, "alignment", PANGO_ALIGN_CENTER, NULL);
	g_object_set (text_renderer, "wrap-width", 220, NULL);
	g_object_set (text_renderer, "wrap-mode", PANGO_WRAP_WORD_CHAR, NULL);
	gtk_cell_layout_pack_start ((GtkCellLayout*) self, (GtkCellRenderer*) text_renderer, TRUE);
	gtk_cell_layout_add_attribute ((GtkCellLayout*) self, (GtkCellRenderer*) text_renderer, "markup", (gint) CLOCKS_ICON_VIEW_COLUMN_LABEL);
	_g_object_unref0 (text_renderer);
	(thumb_data_func_target_destroy_notify == NULL) ? NULL : (thumb_data_func_target_destroy_notify (thumb_data_func_target), NULL);
	thumb_data_func = NULL;
	thumb_data_func_target = NULL;
	thumb_data_func_target_destroy_notify = NULL;
	return self;
}


ClocksIconView* clocks_icon_view_new (GtkCellLayoutDataFunc thumb_data_func, void* thumb_data_func_target, GDestroyNotify thumb_data_func_target_destroy_notify) {
	return clocks_icon_view_construct (CLOCKS_TYPE_ICON_VIEW, thumb_data_func, thumb_data_func_target, thumb_data_func_target_destroy_notify);
}


static gpointer _gtk_tree_path_copy0 (gpointer self) {
	return self ? gtk_tree_path_copy (self) : NULL;
}


static gboolean clocks_icon_view_real_button_press_event (GtkWidget* base, GdkEventButton* event) {
	ClocksIconView * self;
	gboolean result = FALSE;
	GdkEventButton _tmp0_;
	gdouble _tmp1_;
	GdkEventButton _tmp2_;
	gdouble _tmp3_;
	GtkTreePath* _tmp4_ = NULL;
	GtkTreePath* _tmp5_;
	GtkTreePath* path;
	GtkTreePath* _tmp6_;
	self = (ClocksIconView*) base;
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = *event;
	_tmp1_ = _tmp0_.x;
	_tmp2_ = *event;
	_tmp3_ = _tmp2_.y;
	_tmp4_ = gtk_icon_view_get_path_at_pos ((GtkIconView*) self, (gint) _tmp1_, (gint) _tmp3_);
	_tmp5_ = _gtk_tree_path_copy0 (_tmp4_);
	path = _tmp5_;
	_tmp6_ = path;
	if (_tmp6_ != NULL) {
		ClocksIconViewMode _tmp7_;
		ClocksIconViewMode _tmp8_;
		_tmp7_ = clocks_icon_view_get_mode (self);
		_tmp8_ = _tmp7_;
		if (_tmp8_ == CLOCKS_ICON_VIEW_MODE_SELECTION) {
			GtkTreeModel* _tmp9_;
			GtkTreeModel* _tmp10_;
			GtkListStore* _tmp11_;
			GtkListStore* store;
			GtkTreeIter i = {0};
			GtkListStore* _tmp12_;
			GtkTreePath* _tmp13_;
			GtkTreeIter _tmp14_ = {0};
			gboolean _tmp15_ = FALSE;
			_tmp9_ = gtk_icon_view_get_model ((GtkIconView*) self);
			_tmp10_ = _tmp9_;
			_tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GTK_TYPE_LIST_STORE, GtkListStore));
			store = _tmp11_;
			_tmp12_ = store;
			_tmp13_ = path;
			_tmp15_ = gtk_tree_model_get_iter ((GtkTreeModel*) _tmp12_, &_tmp14_, _tmp13_);
			i = _tmp14_;
			if (_tmp15_) {
				gboolean selected = FALSE;
				GtkListStore* _tmp16_;
				GtkTreeIter _tmp17_;
				GtkListStore* _tmp18_;
				GtkTreeIter _tmp19_;
				gboolean _tmp20_;
				_tmp16_ = store;
				_tmp17_ = i;
				gtk_tree_model_get ((GtkTreeModel*) _tmp16_, &_tmp17_, CLOCKS_ICON_VIEW_COLUMN_SELECTED, &selected, -1);
				_tmp18_ = store;
				_tmp19_ = i;
				_tmp20_ = selected;
				gtk_list_store_set (_tmp18_, &_tmp19_, CLOCKS_ICON_VIEW_COLUMN_SELECTED, !_tmp20_, -1);
				g_signal_emit_by_name ((GtkIconView*) self, "selection-changed");
			}
			_g_object_unref0 (store);
		} else {
			GtkTreePath* _tmp21_;
			_tmp21_ = path;
			gtk_icon_view_item_activated ((GtkIconView*) self, _tmp21_);
		}
	}
	result = FALSE;
	_gtk_tree_path_free0 (path);
	return result;
}


void clocks_icon_view_add_item (ClocksIconView* self, const gchar* name, GObject* item) {
	GtkTreeModel* _tmp0_;
	GtkTreeModel* _tmp1_;
	GtkListStore* _tmp2_;
	GtkListStore* store;
	const gchar* _tmp3_;
	gchar* _tmp4_ = NULL;
	gchar* label;
	GtkTreeIter i = {0};
	GtkTreeIter _tmp5_ = {0};
	GtkTreeIter _tmp6_;
	GObject* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = gtk_icon_view_get_model ((GtkIconView*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GTK_TYPE_LIST_STORE, GtkListStore));
	store = _tmp2_;
	_tmp3_ = name;
	_tmp4_ = g_markup_escape_text (_tmp3_, (gssize) (-1));
	label = _tmp4_;
	gtk_list_store_append (store, &_tmp5_);
	i = _tmp5_;
	_tmp6_ = i;
	_tmp7_ = item;
	gtk_list_store_set (store, &_tmp6_, CLOCKS_ICON_VIEW_COLUMN_SELECTED, FALSE, CLOCKS_ICON_VIEW_COLUMN_LABEL, label, CLOCKS_ICON_VIEW_COLUMN_ITEM, _tmp7_, -1);
	_g_free0 (label);
	_g_object_unref0 (store);
}


static Block6Data* block6_data_ref (Block6Data* _data6_) {
	g_atomic_int_inc (&_data6_->_ref_count_);
	return _data6_;
}


static void _gtk_tree_path_free0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (gtk_tree_path_free (var), NULL));
}


static void _g_list_free__gtk_tree_path_free0_ (GList* self) {
	g_list_foreach (self, (GFunc) _gtk_tree_path_free0_, NULL);
	g_list_free (self);
}


static void block6_data_unref (void * _userdata_) {
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
		ClocksIconView * self;
		self = _data6_->self;
		__g_list_free__gtk_tree_path_free0_0 (_data6_->items);
		_g_object_unref0 (self);
		g_slice_free (Block6Data, _data6_);
	}
}


static gboolean __lambda4_ (Block6Data* _data6_, GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter) {
	ClocksIconView * self;
	gboolean result = FALSE;
	gboolean selected = FALSE;
	GtkTreeModel* _tmp0_;
	GtkTreeIter _tmp1_;
	gboolean _tmp2_;
	self = _data6_->self;
	g_return_val_if_fail (model != NULL, FALSE);
	g_return_val_if_fail (path != NULL, FALSE);
	g_return_val_if_fail (iter != NULL, FALSE);
	_tmp0_ = model;
	_tmp1_ = *iter;
	gtk_tree_model_get ((GtkTreeModel*) G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GTK_TYPE_LIST_STORE, GtkListStore), &_tmp1_, CLOCKS_ICON_VIEW_COLUMN_SELECTED, &selected, -1);
	_tmp2_ = selected;
	if (_tmp2_) {
		GtkTreePath* _tmp3_;
		GtkTreePath* _tmp4_;
		_tmp3_ = path;
		_tmp4_ = _gtk_tree_path_copy0 (_tmp3_);
		_data6_->items = g_list_prepend (_data6_->items, _tmp4_);
	}
	result = FALSE;
	return result;
}


static gboolean ___lambda4__gtk_tree_model_foreach_func (GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter, gpointer self) {
	gboolean result;
	result = __lambda4_ (self, model, path, iter);
	return result;
}


GList* clocks_icon_view_get_selected_items (ClocksIconView* self) {
	GList* result = NULL;
	Block6Data* _data6_;
	GtkTreeModel* _tmp0_;
	GtkTreeModel* _tmp1_;
	GList* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_data6_ = g_slice_new0 (Block6Data);
	_data6_->_ref_count_ = 1;
	_data6_->self = g_object_ref (self);
	_data6_->items = NULL;
	_tmp0_ = gtk_icon_view_get_model ((GtkIconView*) self);
	_tmp1_ = _tmp0_;
	gtk_tree_model_foreach (_tmp1_, ___lambda4__gtk_tree_model_foreach_func, _data6_);
	_data6_->items = g_list_reverse (_data6_->items);
	_tmp2_ = _data6_->items;
	_data6_->items = NULL;
	result = _tmp2_;
	block6_data_unref (_data6_);
	_data6_ = NULL;
	return result;
}


static gboolean __lambda5_ (ClocksIconView* self, GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter) {
	gboolean result = FALSE;
	GtkTreeModel* _tmp0_;
	GtkTreeIter _tmp1_;
	g_return_val_if_fail (model != NULL, FALSE);
	g_return_val_if_fail (path != NULL, FALSE);
	g_return_val_if_fail (iter != NULL, FALSE);
	_tmp0_ = model;
	_tmp1_ = *iter;
	gtk_list_store_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GTK_TYPE_LIST_STORE, GtkListStore), &_tmp1_, CLOCKS_ICON_VIEW_COLUMN_SELECTED, TRUE, -1);
	result = FALSE;
	return result;
}


static gboolean ___lambda5__gtk_tree_model_foreach_func (GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter, gpointer self) {
	gboolean result;
	result = __lambda5_ (self, model, path, iter);
	return result;
}


void clocks_icon_view_select_all (ClocksIconView* self) {
	GtkTreeModel* _tmp0_ = NULL;
	GtkListStore* _tmp1_;
	GtkListStore* model;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_icon_view_get_model ((GtkIconView*) self);
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GTK_TYPE_LIST_STORE) ? ((GtkListStore*) _tmp0_) : NULL);
	model = _tmp1_;
	gtk_tree_model_foreach ((GtkTreeModel*) model, ___lambda5__gtk_tree_model_foreach_func, self);
	g_signal_emit_by_name ((GtkIconView*) self, "selection-changed");
	_g_object_unref0 (model);
}


static gboolean __lambda3_ (ClocksIconView* self, GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter) {
	gboolean result = FALSE;
	GtkTreeModel* _tmp0_;
	GtkTreeIter _tmp1_;
	g_return_val_if_fail (model != NULL, FALSE);
	g_return_val_if_fail (path != NULL, FALSE);
	g_return_val_if_fail (iter != NULL, FALSE);
	_tmp0_ = model;
	_tmp1_ = *iter;
	gtk_list_store_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GTK_TYPE_LIST_STORE, GtkListStore), &_tmp1_, CLOCKS_ICON_VIEW_COLUMN_SELECTED, FALSE, -1);
	result = FALSE;
	return result;
}


static gboolean ___lambda3__gtk_tree_model_foreach_func (GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter, gpointer self) {
	gboolean result;
	result = __lambda3_ (self, model, path, iter);
	return result;
}


void clocks_icon_view_unselect_all (ClocksIconView* self) {
	GtkTreeModel* _tmp0_ = NULL;
	GtkListStore* _tmp1_;
	GtkListStore* model;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_icon_view_get_model ((GtkIconView*) self);
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GTK_TYPE_LIST_STORE) ? ((GtkListStore*) _tmp0_) : NULL);
	model = _tmp1_;
	gtk_tree_model_foreach ((GtkTreeModel*) model, ___lambda3__gtk_tree_model_foreach_func, self);
	g_signal_emit_by_name ((GtkIconView*) self, "selection-changed");
	_g_object_unref0 (model);
}


void clocks_icon_view_remove_selected (ClocksIconView* self) {
	GList* _tmp0_ = NULL;
	GList* paths;
	GList* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = clocks_icon_view_get_selected_items (self);
	paths = _tmp0_;
	paths = g_list_reverse (paths);
	_tmp1_ = paths;
	{
		GList* path_collection = NULL;
		GList* path_it = NULL;
		path_collection = _tmp1_;
		for (path_it = path_collection; path_it != NULL; path_it = path_it->next) {
			GtkTreePath* _tmp2_;
			GtkTreePath* path = NULL;
			_tmp2_ = _gtk_tree_path_copy0 ((GtkTreePath*) path_it->data);
			path = _tmp2_;
			{
				GtkTreeIter i = {0};
				GtkTreeModel* _tmp3_;
				GtkTreeModel* _tmp4_;
				GtkTreePath* _tmp5_;
				GtkTreeIter _tmp6_ = {0};
				gboolean _tmp7_ = FALSE;
				_tmp3_ = gtk_icon_view_get_model ((GtkIconView*) self);
				_tmp4_ = _tmp3_;
				_tmp5_ = path;
				_tmp7_ = gtk_tree_model_get_iter ((GtkTreeModel*) G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GTK_TYPE_LIST_STORE, GtkListStore), &_tmp6_, _tmp5_);
				i = _tmp6_;
				if (_tmp7_) {
					GtkTreeModel* _tmp8_;
					GtkTreeModel* _tmp9_;
					GtkTreeIter _tmp10_;
					_tmp8_ = gtk_icon_view_get_model ((GtkIconView*) self);
					_tmp9_ = _tmp8_;
					_tmp10_ = i;
					gtk_list_store_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GTK_TYPE_LIST_STORE, GtkListStore), &_tmp10_);
				}
				_gtk_tree_path_free0 (path);
			}
		}
	}
	g_signal_emit_by_name ((GtkIconView*) self, "selection-changed");
	__g_list_free__gtk_tree_path_free0_0 (paths);
}


ClocksIconViewMode clocks_icon_view_get_mode (ClocksIconView* self) {
	ClocksIconViewMode result;
	ClocksIconViewMode _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_mode;
	result = _tmp0_;
	return result;
}


void clocks_icon_view_set_mode (ClocksIconView* self, ClocksIconViewMode value) {
	ClocksIconViewMode _tmp0_;
	ClocksIconViewMode _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_mode;
	_tmp1_ = value;
	if (_tmp0_ != _tmp1_) {
		ClocksIconViewMode _tmp2_;
		ClocksIconViewMode _tmp3_;
		ClocksDigitalClockRenderer* _tmp4_;
		ClocksIconViewMode _tmp5_;
		_tmp2_ = value;
		self->priv->_mode = _tmp2_;
		_tmp3_ = self->priv->_mode;
		if (_tmp3_ != CLOCKS_ICON_VIEW_MODE_SELECTION) {
			clocks_icon_view_unselect_all (self);
		}
		_tmp4_ = self->priv->thumb_renderer;
		_tmp5_ = self->priv->_mode;
		clocks_digital_clock_renderer_set_toggle_visible (_tmp4_, _tmp5_ == CLOCKS_ICON_VIEW_MODE_SELECTION);
		gtk_widget_queue_draw ((GtkWidget*) self);
	}
	g_object_notify ((GObject *) self, "mode");
}


static void clocks_icon_view_class_init (ClocksIconViewClass * klass) {
	clocks_icon_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ClocksIconViewPrivate));
	GTK_WIDGET_CLASS (klass)->button_press_event = clocks_icon_view_real_button_press_event;
	G_OBJECT_CLASS (klass)->get_property = _vala_clocks_icon_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_clocks_icon_view_set_property;
	G_OBJECT_CLASS (klass)->finalize = clocks_icon_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_ICON_VIEW_MODE, g_param_spec_enum ("mode", "mode", "mode", CLOCKS_ICON_VIEW_TYPE_MODE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void clocks_icon_view_instance_init (ClocksIconView * self) {
	self->priv = CLOCKS_ICON_VIEW_GET_PRIVATE (self);
}


static void clocks_icon_view_finalize (GObject* obj) {
	ClocksIconView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLOCKS_TYPE_ICON_VIEW, ClocksIconView);
	_g_object_unref0 (self->priv->thumb_renderer);
	G_OBJECT_CLASS (clocks_icon_view_parent_class)->finalize (obj);
}


GType clocks_icon_view_get_type (void) {
	static volatile gsize clocks_icon_view_type_id__volatile = 0;
	if (g_once_init_enter (&clocks_icon_view_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ClocksIconViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clocks_icon_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ClocksIconView), 0, (GInstanceInitFunc) clocks_icon_view_instance_init, NULL };
		GType clocks_icon_view_type_id;
		clocks_icon_view_type_id = g_type_register_static (GTK_TYPE_ICON_VIEW, "ClocksIconView", &g_define_type_info, 0);
		g_once_init_leave (&clocks_icon_view_type_id__volatile, clocks_icon_view_type_id);
	}
	return clocks_icon_view_type_id__volatile;
}


static void _vala_clocks_icon_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ClocksIconView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_TYPE_ICON_VIEW, ClocksIconView);
	switch (property_id) {
		case CLOCKS_ICON_VIEW_MODE:
		g_value_set_enum (value, clocks_icon_view_get_mode (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_clocks_icon_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ClocksIconView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_TYPE_ICON_VIEW, ClocksIconView);
	switch (property_id) {
		case CLOCKS_ICON_VIEW_MODE:
		clocks_icon_view_set_mode (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static Block7Data* block7_data_ref (Block7Data* _data7_) {
	g_atomic_int_inc (&_data7_->_ref_count_);
	return _data7_;
}


static void block7_data_unref (void * _userdata_) {
	Block7Data* _data7_;
	_data7_ = (Block7Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
		ClocksContentView * self;
		self = _data7_->self;
		_g_object_unref0 (_data7_->model);
		_g_object_unref0 (self);
		g_slice_free (Block7Data, _data7_);
	}
}


static void __lambda7_ (Block7Data* _data7_) {
	ClocksContentView * self;
	self = _data7_->self;
	clocks_content_view_update_empty_view (self, _data7_->model);
}


static void ___lambda7__gtk_tree_model_row_inserted (GtkTreeModel* _sender, GtkTreePath* path, GtkTreeIter* iter, gpointer self) {
	__lambda7_ (self);
}


static void __lambda8_ (Block7Data* _data7_) {
	ClocksContentView * self;
	self = _data7_->self;
	clocks_content_view_update_empty_view (self, _data7_->model);
}


static void ___lambda8__gtk_tree_model_row_deleted (GtkTreeModel* _sender, GtkTreePath* path, gpointer self) {
	__lambda8_ (self);
}


static void __lambda9_ (ClocksContentView* self) {
	ClocksIconView* _tmp0_;
	ClocksIconViewMode _tmp1_;
	ClocksIconViewMode _tmp2_;
	_tmp0_ = self->priv->icon_view;
	_tmp1_ = clocks_icon_view_get_mode (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == CLOCKS_ICON_VIEW_MODE_SELECTION) {
		ClocksToolbar* _tmp3_;
		_tmp3_ = self->priv->main_toolbar;
		clocks_toolbar_set_mode (_tmp3_, CLOCKS_TOOLBAR_MODE_SELECTION);
	} else {
		ClocksIconView* _tmp4_;
		ClocksIconViewMode _tmp5_;
		ClocksIconViewMode _tmp6_;
		_tmp4_ = self->priv->icon_view;
		_tmp5_ = clocks_icon_view_get_mode (_tmp4_);
		_tmp6_ = _tmp5_;
		if (_tmp6_ == CLOCKS_ICON_VIEW_MODE_NORMAL) {
			ClocksToolbar* _tmp7_;
			_tmp7_ = self->priv->main_toolbar;
			clocks_toolbar_set_mode (_tmp7_, CLOCKS_TOOLBAR_MODE_NORMAL);
		}
	}
}


static void ___lambda9__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda9_ (self);
}


static void __lambda10_ (ClocksContentView* self) {
	ClocksIconView* _tmp0_;
	GList* _tmp1_ = NULL;
	GList* items;
	GList* _tmp2_;
	guint _tmp3_ = 0U;
	guint n_items;
	gchar* label = NULL;
	guint _tmp4_;
	ClocksToolbar* _tmp11_;
	const gchar* _tmp12_;
	GtkToolbar* _tmp13_;
	guint _tmp14_;
	_tmp0_ = self->priv->icon_view;
	_tmp1_ = clocks_icon_view_get_selected_items (_tmp0_);
	items = _tmp1_;
	_tmp2_ = items;
	_tmp3_ = g_list_length (_tmp2_);
	n_items = _tmp3_;
	_tmp4_ = n_items;
	if (_tmp4_ == ((guint) 0)) {
		const gchar* _tmp5_ = NULL;
		gchar* _tmp6_;
		_tmp5_ = _ ("Click on items to select them");
		_tmp6_ = g_strdup (_tmp5_);
		_g_free0 (label);
		label = _tmp6_;
	} else {
		guint _tmp7_;
		const gchar* _tmp8_ = NULL;
		guint _tmp9_;
		gchar* _tmp10_ = NULL;
		_tmp7_ = n_items;
		_tmp8_ = ngettext ("%d selected", "%d selected", (gulong) _tmp7_);
		_tmp9_ = n_items;
		_tmp10_ = g_strdup_printf (_tmp8_, _tmp9_);
		_g_free0 (label);
		label = _tmp10_;
	}
	_tmp11_ = self->priv->main_toolbar;
	_tmp12_ = label;
	gd_main_toolbar_set_labels ((GdMainToolbar*) _tmp11_, _tmp12_, NULL);
	_tmp13_ = self->priv->selection_toolbar;
	_tmp14_ = n_items;
	gtk_widget_set_visible ((GtkWidget*) _tmp13_, _tmp14_ != ((guint) 0));
	_g_free0 (label);
	__g_list_free__gtk_tree_path_free0_0 (items);
}


static void ___lambda10__gtk_icon_view_selection_changed (GtkIconView* _sender, gpointer self) {
	__lambda10_ (self);
}


ClocksContentView* clocks_content_view_construct (GType object_type, GtkWidget* e, ClocksIconView* iv, ClocksToolbar* t) {
	ClocksContentView * self = NULL;
	Block7Data* _data7_;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	ClocksIconView* _tmp2_;
	ClocksIconView* _tmp3_;
	ClocksToolbar* _tmp4_;
	ClocksToolbar* _tmp5_;
	GtkBuilder* _tmp6_ = NULL;
	GtkBuilder* builder;
	GObject* _tmp7_ = NULL;
	GMenuModel* _tmp8_;
	GtkOverlay* _tmp9_;
	GtkOverlay* _tmp10_;
	ClocksIconView* _tmp11_;
	GtkToolbar* _tmp12_ = NULL;
	GtkOverlay* _tmp13_;
	GtkToolbar* _tmp14_;
	GtkScrolledWindow* _tmp15_;
	GtkScrolledWindow* _tmp16_;
	GtkOverlay* _tmp17_;
	ClocksIconView* _tmp18_;
	GtkTreeModel* _tmp19_ = NULL;
	GtkTreeModel* _tmp20_;
	ClocksIconView* _tmp21_;
	ClocksIconView* _tmp22_;
	GtkWidget* _tmp23_;
	g_return_val_if_fail (e != NULL, NULL);
	g_return_val_if_fail (iv != NULL, NULL);
	g_return_val_if_fail (t != NULL, NULL);
	_data7_ = g_slice_new0 (Block7Data);
	_data7_->_ref_count_ = 1;
	self = (ClocksContentView*) g_object_new (object_type, NULL);
	_data7_->self = g_object_ref (self);
	_tmp0_ = e;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->empty_page);
	self->priv->empty_page = _tmp1_;
	_tmp2_ = iv;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->priv->icon_view);
	self->priv->icon_view = _tmp3_;
	_tmp4_ = t;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_g_object_unref0 (self->priv->main_toolbar);
	self->priv->main_toolbar = _tmp5_;
	_tmp6_ = clocks_utils_load_ui ("menu.ui");
	builder = _tmp6_;
	_tmp7_ = gtk_builder_get_object (builder, "selection-menu");
	_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, g_menu_model_get_type ()) ? ((GMenuModel*) _tmp7_) : NULL);
	_g_object_unref0 (self->priv->selection_menu);
	self->priv->selection_menu = _tmp8_;
	_tmp9_ = (GtkOverlay*) gtk_overlay_new ();
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->overlay);
	self->priv->overlay = _tmp9_;
	_tmp10_ = self->priv->overlay;
	_tmp11_ = self->priv->icon_view;
	gtk_container_add ((GtkContainer*) _tmp10_, (GtkWidget*) _tmp11_);
	_tmp12_ = clocks_content_view_create_selection_toolbar (self);
	_g_object_unref0 (self->priv->selection_toolbar);
	self->priv->selection_toolbar = _tmp12_;
	_tmp13_ = self->priv->overlay;
	_tmp14_ = self->priv->selection_toolbar;
	gtk_overlay_add_overlay (_tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->priv->scrolled_window);
	self->priv->scrolled_window = _tmp15_;
	_tmp16_ = self->priv->scrolled_window;
	_tmp17_ = self->priv->overlay;
	gtk_container_add ((GtkContainer*) _tmp16_, (GtkWidget*) _tmp17_);
	_tmp18_ = self->priv->icon_view;
	_tmp19_ = gtk_icon_view_get_model ((GtkIconView*) _tmp18_);
	_tmp20_ = _g_object_ref0 (_tmp19_);
	_data7_->model = _tmp20_;
	g_signal_connect_data (_data7_->model, "row-inserted", (GCallback) ___lambda7__gtk_tree_model_row_inserted, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
	g_signal_connect_data (_data7_->model, "row-deleted", (GCallback) ___lambda8__gtk_tree_model_row_deleted, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
	_tmp21_ = self->priv->icon_view;
	g_signal_connect_object ((GObject*) _tmp21_, "notify::mode", (GCallback) ___lambda9__g_object_notify, self, 0);
	_tmp22_ = self->priv->icon_view;
	g_signal_connect_object ((GtkIconView*) _tmp22_, "selection-changed", (GCallback) ___lambda10__gtk_icon_view_selection_changed, self, 0);
	_tmp23_ = self->priv->empty_page;
	gtk_container_add ((GtkContainer*) self, _tmp23_);
	_g_object_unref0 (builder);
	block7_data_unref (_data7_);
	_data7_ = NULL;
	return self;
}


ClocksContentView* clocks_content_view_new (GtkWidget* e, ClocksIconView* iv, ClocksToolbar* t) {
	return clocks_content_view_construct (CLOCKS_TYPE_CONTENT_VIEW, e, iv, t);
}


static void __lambda6_ (ClocksContentView* self) {
	g_signal_emit_by_name (self, "delete-selected");
}


static void ___lambda6__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda6_ (self);
}


static GtkToolbar* clocks_content_view_create_selection_toolbar (ClocksContentView* self) {
	GtkToolbar* result = NULL;
	GtkToolbar* _tmp0_;
	GtkToolbar* toolbar;
	GtkStyleContext* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	GtkButton* _tmp3_;
	GtkButton* delete_button;
	GtkBox* _tmp4_;
	GtkBox* hbox;
	GtkToolItem* _tmp5_;
	GtkToolItem* item;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkToolbar*) gtk_toolbar_new ();
	g_object_ref_sink (_tmp0_);
	toolbar = _tmp0_;
	gtk_toolbar_set_show_arrow (toolbar, FALSE);
	gtk_toolbar_set_icon_size (toolbar, (gint) GTK_ICON_SIZE_LARGE_TOOLBAR);
	gtk_widget_set_halign ((GtkWidget*) toolbar, GTK_ALIGN_CENTER);
	gtk_widget_set_valign ((GtkWidget*) toolbar, GTK_ALIGN_END);
	gtk_widget_set_margin_bottom ((GtkWidget*) toolbar, 40);
	_tmp1_ = gtk_widget_get_style_context ((GtkWidget*) toolbar);
	gtk_style_context_add_class (_tmp1_, "osd");
	gtk_widget_set_size_request ((GtkWidget*) toolbar, CLOCKS_CONTENT_VIEW_SELECTION_TOOLBAR_WIDTH, -1);
	gtk_widget_set_no_show_all ((GtkWidget*) toolbar, TRUE);
	_tmp2_ = _ ("Delete");
	_tmp3_ = (GtkButton*) gtk_button_new_with_label (_tmp2_);
	g_object_ref_sink (_tmp3_);
	delete_button = _tmp3_;
	gtk_widget_set_hexpand ((GtkWidget*) delete_button, TRUE);
	g_signal_connect_object (delete_button, "clicked", (GCallback) ___lambda6__gtk_button_clicked, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp4_);
	hbox = _tmp4_;
	gtk_widget_set_hexpand ((GtkWidget*) hbox, TRUE);
	gtk_container_add ((GtkContainer*) hbox, (GtkWidget*) delete_button);
	_tmp5_ = gtk_tool_item_new ();
	g_object_ref_sink (_tmp5_);
	item = _tmp5_;
	gtk_tool_item_set_expand (item, TRUE);
	gtk_container_add ((GtkContainer*) item, (GtkWidget*) hbox);
	gtk_widget_show_all ((GtkWidget*) item);
	gtk_toolbar_insert (toolbar, item, -1);
	result = toolbar;
	_g_object_unref0 (item);
	_g_object_unref0 (hbox);
	_g_object_unref0 (delete_button);
	return result;
}


static void clocks_content_view_update_empty_view (ClocksContentView* self, GtkTreeModel* model) {
	GtkTreeIter i = {0};
	GtkWidget* _tmp0_ = NULL;
	GtkWidget* _tmp1_;
	GtkWidget* child;
	GtkTreeModel* _tmp2_;
	GtkTreeIter _tmp3_ = {0};
	gboolean _tmp4_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (model != NULL);
	_tmp0_ = gtk_bin_get_child ((GtkBin*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	child = _tmp1_;
	_tmp2_ = model;
	_tmp4_ = gtk_tree_model_get_iter_first (_tmp2_, &_tmp3_);
	i = _tmp3_;
	if (_tmp4_) {
		GtkWidget* _tmp5_;
		GtkScrolledWindow* _tmp6_;
		_tmp5_ = child;
		_tmp6_ = self->priv->scrolled_window;
		if (_tmp5_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GTK_TYPE_WIDGET, GtkWidget)) {
			GtkWidget* _tmp7_;
			GtkScrolledWindow* _tmp8_;
			_tmp7_ = child;
			gtk_container_remove ((GtkContainer*) self, _tmp7_);
			_tmp8_ = self->priv->scrolled_window;
			gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp8_);
			clocks_content_view_set_empty (self, FALSE);
		}
	} else {
		GtkWidget* _tmp9_;
		GtkWidget* _tmp10_;
		_tmp9_ = child;
		_tmp10_ = self->priv->empty_page;
		if (_tmp9_ != _tmp10_) {
			GtkWidget* _tmp11_;
			GtkWidget* _tmp12_;
			_tmp11_ = child;
			gtk_container_remove ((GtkContainer*) self, _tmp11_);
			_tmp12_ = self->priv->empty_page;
			gtk_container_add ((GtkContainer*) self, _tmp12_);
			clocks_content_view_set_empty (self, TRUE);
		}
	}
	gtk_widget_show_all ((GtkWidget*) self);
	_g_object_unref0 (child);
}


static void ___lambda11_ (ClocksContentView* self) {
	GtkToolbar* _tmp0_;
	ClocksIconView* _tmp1_;
	_tmp0_ = self->priv->selection_toolbar;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
	_tmp1_ = self->priv->icon_view;
	clocks_icon_view_set_mode (_tmp1_, CLOCKS_ICON_VIEW_MODE_NORMAL);
}


static void ____lambda11__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	___lambda11_ (self);
}


static void ___lambda12_ (ClocksContentView* self) {
	ClocksIconView* _tmp0_;
	_tmp0_ = self->priv->icon_view;
	clocks_icon_view_set_mode (_tmp0_, CLOCKS_ICON_VIEW_MODE_SELECTION);
}


static void ____lambda12__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	___lambda12_ (self);
}


void clocks_content_view_update_toolbar (ClocksContentView* self) {
	ClocksToolbar* _tmp0_;
	ClocksToolbarMode _tmp1_;
	ClocksToolbarMode _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->main_toolbar;
	_tmp1_ = clocks_toolbar_get_mode (_tmp0_);
	_tmp2_ = _tmp1_;
	switch (_tmp2_) {
		case CLOCKS_TOOLBAR_MODE_SELECTION:
		{
			ClocksToolbar* _tmp3_;
			const gchar* _tmp4_ = NULL;
			GtkButton* _tmp5_ = NULL;
			GtkButton* done_button;
			ClocksToolbar* _tmp6_;
			const gchar* _tmp7_ = NULL;
			ClocksToolbar* _tmp8_;
			GMenuModel* _tmp9_;
			GtkButton* _tmp10_;
			GtkStyleContext* _tmp11_ = NULL;
			GtkButton* _tmp12_;
			_tmp3_ = self->priv->main_toolbar;
			_tmp4_ = _ ("Done");
			_tmp5_ = clocks_toolbar_add_button (_tmp3_, NULL, _tmp4_, FALSE);
			done_button = _tmp5_;
			_tmp6_ = self->priv->main_toolbar;
			_tmp7_ = _ ("Click on items to select them");
			gd_main_toolbar_set_labels ((GdMainToolbar*) _tmp6_, _tmp7_, NULL);
			_tmp8_ = self->priv->main_toolbar;
			_tmp9_ = self->priv->selection_menu;
			gd_main_toolbar_set_labels_menu ((GdMainToolbar*) _tmp8_, _tmp9_);
			_tmp10_ = done_button;
			_tmp11_ = gtk_widget_get_style_context ((GtkWidget*) _tmp10_);
			gtk_style_context_add_class (_tmp11_, "suggested-action");
			_tmp12_ = done_button;
			g_signal_connect_object (_tmp12_, "clicked", (GCallback) ____lambda11__gtk_button_clicked, self, 0);
			_g_object_unref0 (done_button);
			break;
		}
		case CLOCKS_TOOLBAR_MODE_NORMAL:
		{
			ClocksToolbar* _tmp13_;
			ClocksToolbar* _tmp14_;
			ClocksToolbar* _tmp15_;
			GtkButton* _tmp16_ = NULL;
			GtkButton* select_button;
			GtkButton* _tmp17_;
			GtkButton* _tmp18_;
			_tmp13_ = self->priv->main_toolbar;
			gd_main_toolbar_set_labels ((GdMainToolbar*) _tmp13_, NULL, NULL);
			_tmp14_ = self->priv->main_toolbar;
			gd_main_toolbar_set_labels_menu ((GdMainToolbar*) _tmp14_, NULL);
			_tmp15_ = self->priv->main_toolbar;
			_tmp16_ = clocks_toolbar_add_button (_tmp15_, "object-select-symbolic", NULL, FALSE);
			select_button = _tmp16_;
			_tmp17_ = select_button;
			g_signal_connect_object (_tmp17_, "clicked", (GCallback) ____lambda12__gtk_button_clicked, self, 0);
			_tmp18_ = select_button;
			g_object_bind_property_with_closures ((GObject*) self, "empty", (GObject*) _tmp18_, "sensitive", G_BINDING_SYNC_CREATE | G_BINDING_INVERT_BOOLEAN, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)));
			_g_object_unref0 (select_button);
			break;
		}
		default:
		break;
	}
}


gboolean clocks_content_view_get_empty (ClocksContentView* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_empty;
	result = _tmp0_;
	return result;
}


static void clocks_content_view_set_empty (ClocksContentView* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_empty = _tmp0_;
	g_object_notify ((GObject *) self, "empty");
}


static void clocks_content_view_class_init (ClocksContentViewClass * klass) {
	clocks_content_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ClocksContentViewPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_clocks_content_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_clocks_content_view_set_property;
	G_OBJECT_CLASS (klass)->finalize = clocks_content_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_CONTENT_VIEW_EMPTY, g_param_spec_boolean ("empty", "empty", "empty", TRUE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_signal_new ("delete_selected", CLOCKS_TYPE_CONTENT_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}


static void clocks_content_view_instance_init (ClocksContentView * self) {
	self->priv = CLOCKS_CONTENT_VIEW_GET_PRIVATE (self);
	self->priv->_empty = TRUE;
}


static void clocks_content_view_finalize (GObject* obj) {
	ClocksContentView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLOCKS_TYPE_CONTENT_VIEW, ClocksContentView);
	_g_object_unref0 (self->priv->empty_page);
	_g_object_unref0 (self->priv->icon_view);
	_g_object_unref0 (self->priv->main_toolbar);
	_g_object_unref0 (self->priv->selection_menu);
	_g_object_unref0 (self->priv->selection_toolbar);
	_g_object_unref0 (self->priv->overlay);
	_g_object_unref0 (self->priv->scrolled_window);
	G_OBJECT_CLASS (clocks_content_view_parent_class)->finalize (obj);
}


GType clocks_content_view_get_type (void) {
	static volatile gsize clocks_content_view_type_id__volatile = 0;
	if (g_once_init_enter (&clocks_content_view_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ClocksContentViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clocks_content_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ClocksContentView), 0, (GInstanceInitFunc) clocks_content_view_instance_init, NULL };
		GType clocks_content_view_type_id;
		clocks_content_view_type_id = g_type_register_static (GTK_TYPE_BIN, "ClocksContentView", &g_define_type_info, 0);
		g_once_init_leave (&clocks_content_view_type_id__volatile, clocks_content_view_type_id);
	}
	return clocks_content_view_type_id__volatile;
}


static void _vala_clocks_content_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ClocksContentView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_TYPE_CONTENT_VIEW, ClocksContentView);
	switch (property_id) {
		case CLOCKS_CONTENT_VIEW_EMPTY:
		g_value_set_boolean (value, clocks_content_view_get_empty (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_clocks_content_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ClocksContentView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_TYPE_CONTENT_VIEW, ClocksContentView);
	switch (property_id) {
		case CLOCKS_CONTENT_VIEW_EMPTY:
		clocks_content_view_set_empty (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


GType clocks_am_pm_toggle_button_am_pm_get_type (void) {
	static volatile gsize clocks_am_pm_toggle_button_am_pm_type_id__volatile = 0;
	if (g_once_init_enter (&clocks_am_pm_toggle_button_am_pm_type_id__volatile)) {
		static const GEnumValue values[] = {{CLOCKS_AM_PM_TOGGLE_BUTTON_AM_PM_AM, "CLOCKS_AM_PM_TOGGLE_BUTTON_AM_PM_AM", "am"}, {CLOCKS_AM_PM_TOGGLE_BUTTON_AM_PM_PM, "CLOCKS_AM_PM_TOGGLE_BUTTON_AM_PM_PM", "pm"}, {0, NULL, NULL}};
		GType clocks_am_pm_toggle_button_am_pm_type_id;
		clocks_am_pm_toggle_button_am_pm_type_id = g_enum_register_static ("ClocksAmPmToggleButtonAmPm", values);
		g_once_init_leave (&clocks_am_pm_toggle_button_am_pm_type_id__volatile, clocks_am_pm_toggle_button_am_pm_type_id);
	}
	return clocks_am_pm_toggle_button_am_pm_type_id__volatile;
}


static void __lambda32_ (ClocksAmPmToggleButton* self) {
	ClocksAmPmToggleButtonAmPm _tmp0_ = 0;
	ClocksAmPmToggleButtonAmPm _tmp1_;
	ClocksAmPmToggleButtonAmPm _tmp2_;
	ClocksAmPmToggleButtonAmPm _tmp3_;
	_tmp1_ = clocks_am_pm_toggle_button_get_choice (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == CLOCKS_AM_PM_TOGGLE_BUTTON_AM_PM_AM) {
		_tmp0_ = CLOCKS_AM_PM_TOGGLE_BUTTON_AM_PM_PM;
	} else {
		_tmp0_ = CLOCKS_AM_PM_TOGGLE_BUTTON_AM_PM_AM;
	}
	_tmp3_ = _tmp0_;
	clocks_am_pm_toggle_button_set_choice (self, _tmp3_);
}


static void ___lambda32__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda32_ (self);
}


ClocksAmPmToggleButton* clocks_am_pm_toggle_button_construct (GType object_type) {
	ClocksAmPmToggleButton * self = NULL;
	GdStack* _tmp0_;
	GdStack* _tmp1_;
	GDateTime* _tmp2_;
	GDateTime* _tmp3_;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_;
	gchar* str;
	const gchar* _tmp6_;
	GtkLabel* _tmp7_;
	GDateTime* _tmp8_;
	GDateTime* _tmp9_;
	gchar* _tmp10_ = NULL;
	const gchar* _tmp11_;
	GtkLabel* _tmp12_;
	GdStack* _tmp13_;
	GtkLabel* _tmp14_;
	GdStack* _tmp15_;
	GtkLabel* _tmp16_;
	GdStack* _tmp17_;
	GdStack* _tmp18_;
	GtkLabel* _tmp19_;
	self = (ClocksAmPmToggleButton*) g_object_new (object_type, NULL);
	_tmp0_ = (GdStack*) gd_stack_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->stack);
	self->priv->stack = _tmp0_;
	_tmp1_ = self->priv->stack;
	gd_stack_set_duration (_tmp1_, 0);
	_tmp2_ = g_date_time_new_utc (1, 1, 1, 0, 0, (gdouble) 0);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_date_time_format (_tmp3_, "%p");
	_tmp5_ = _tmp4_;
	_g_date_time_unref0 (_tmp3_);
	str = _tmp5_;
	_tmp6_ = str;
	_tmp7_ = (GtkLabel*) gtk_label_new (_tmp6_);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->am_label);
	self->priv->am_label = _tmp7_;
	_tmp8_ = g_date_time_new_utc (1, 1, 1, 12, 0, (gdouble) 0);
	_tmp9_ = _tmp8_;
	_tmp10_ = g_date_time_format (_tmp9_, "%p");
	_g_free0 (str);
	str = _tmp10_;
	_g_date_time_unref0 (_tmp9_);
	_tmp11_ = str;
	_tmp12_ = (GtkLabel*) gtk_label_new (_tmp11_);
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->pm_label);
	self->priv->pm_label = _tmp12_;
	_tmp13_ = self->priv->stack;
	_tmp14_ = self->priv->am_label;
	gtk_container_add ((GtkContainer*) _tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = self->priv->stack;
	_tmp16_ = self->priv->pm_label;
	gtk_container_add ((GtkContainer*) _tmp15_, (GtkWidget*) _tmp16_);
	_tmp17_ = self->priv->stack;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp17_);
	g_signal_connect_object ((GtkButton*) self, "clicked", (GCallback) ___lambda32__gtk_button_clicked, self, 0);
	clocks_am_pm_toggle_button_set_choice (self, CLOCKS_AM_PM_TOGGLE_BUTTON_AM_PM_AM);
	_tmp18_ = self->priv->stack;
	_tmp19_ = self->priv->am_label;
	gd_stack_set_visible_child (_tmp18_, (GtkWidget*) _tmp19_);
	gtk_widget_show_all ((GtkWidget*) self);
	_g_free0 (str);
	return self;
}


ClocksAmPmToggleButton* clocks_am_pm_toggle_button_new (void) {
	return clocks_am_pm_toggle_button_construct (CLOCKS_TYPE_AM_PM_TOGGLE_BUTTON);
}


ClocksAmPmToggleButtonAmPm clocks_am_pm_toggle_button_get_choice (ClocksAmPmToggleButton* self) {
	ClocksAmPmToggleButtonAmPm result;
	ClocksAmPmToggleButtonAmPm _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_choice;
	result = _tmp0_;
	return result;
}


void clocks_am_pm_toggle_button_set_choice (ClocksAmPmToggleButton* self, ClocksAmPmToggleButtonAmPm value) {
	ClocksAmPmToggleButtonAmPm _tmp0_;
	ClocksAmPmToggleButtonAmPm _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_choice;
	_tmp1_ = value;
	if (_tmp0_ != _tmp1_) {
		ClocksAmPmToggleButtonAmPm _tmp2_;
		GtkLabel* _tmp3_ = NULL;
		ClocksAmPmToggleButtonAmPm _tmp4_;
		GdStack* _tmp7_;
		GtkLabel* _tmp8_;
		_tmp2_ = value;
		self->priv->_choice = _tmp2_;
		_tmp4_ = self->priv->_choice;
		if (_tmp4_ == CLOCKS_AM_PM_TOGGLE_BUTTON_AM_PM_AM) {
			GtkLabel* _tmp5_;
			_tmp5_ = self->priv->am_label;
			_tmp3_ = _tmp5_;
		} else {
			GtkLabel* _tmp6_;
			_tmp6_ = self->priv->pm_label;
			_tmp3_ = _tmp6_;
		}
		_tmp7_ = self->priv->stack;
		_tmp8_ = _tmp3_;
		gd_stack_set_visible_child (_tmp7_, (GtkWidget*) _tmp8_);
	}
	g_object_notify ((GObject *) self, "choice");
}


static void clocks_am_pm_toggle_button_class_init (ClocksAmPmToggleButtonClass * klass) {
	clocks_am_pm_toggle_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ClocksAmPmToggleButtonPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_clocks_am_pm_toggle_button_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_clocks_am_pm_toggle_button_set_property;
	G_OBJECT_CLASS (klass)->finalize = clocks_am_pm_toggle_button_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_AM_PM_TOGGLE_BUTTON_CHOICE, g_param_spec_enum ("choice", "choice", "choice", CLOCKS_AM_PM_TOGGLE_BUTTON_TYPE_AM_PM, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void clocks_am_pm_toggle_button_instance_init (ClocksAmPmToggleButton * self) {
	self->priv = CLOCKS_AM_PM_TOGGLE_BUTTON_GET_PRIVATE (self);
}


static void clocks_am_pm_toggle_button_finalize (GObject* obj) {
	ClocksAmPmToggleButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLOCKS_TYPE_AM_PM_TOGGLE_BUTTON, ClocksAmPmToggleButton);
	_g_object_unref0 (self->priv->stack);
	_g_object_unref0 (self->priv->am_label);
	_g_object_unref0 (self->priv->pm_label);
	G_OBJECT_CLASS (clocks_am_pm_toggle_button_parent_class)->finalize (obj);
}


GType clocks_am_pm_toggle_button_get_type (void) {
	static volatile gsize clocks_am_pm_toggle_button_type_id__volatile = 0;
	if (g_once_init_enter (&clocks_am_pm_toggle_button_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ClocksAmPmToggleButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clocks_am_pm_toggle_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ClocksAmPmToggleButton), 0, (GInstanceInitFunc) clocks_am_pm_toggle_button_instance_init, NULL };
		GType clocks_am_pm_toggle_button_type_id;
		clocks_am_pm_toggle_button_type_id = g_type_register_static (GTK_TYPE_BUTTON, "ClocksAmPmToggleButton", &g_define_type_info, 0);
		g_once_init_leave (&clocks_am_pm_toggle_button_type_id__volatile, clocks_am_pm_toggle_button_type_id);
	}
	return clocks_am_pm_toggle_button_type_id__volatile;
}


static void _vala_clocks_am_pm_toggle_button_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ClocksAmPmToggleButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_TYPE_AM_PM_TOGGLE_BUTTON, ClocksAmPmToggleButton);
	switch (property_id) {
		case CLOCKS_AM_PM_TOGGLE_BUTTON_CHOICE:
		g_value_set_enum (value, clocks_am_pm_toggle_button_get_choice (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_clocks_am_pm_toggle_button_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ClocksAmPmToggleButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_TYPE_AM_PM_TOGGLE_BUTTON, ClocksAmPmToggleButton);
	switch (property_id) {
		case CLOCKS_AM_PM_TOGGLE_BUTTON_CHOICE:
		clocks_am_pm_toggle_button_set_choice (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



