/* widgets.c generated by valac 0.19.0.3-f335-dirty, 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 <pango/pango.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>


#define CLOCKS_TYPE_HEADER_BAR (clocks_header_bar_get_type ())
#define CLOCKS_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TYPE_HEADER_BAR, ClocksHeaderBar))
#define CLOCKS_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_TYPE_HEADER_BAR, ClocksHeaderBarClass))
#define CLOCKS_IS_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TYPE_HEADER_BAR))
#define CLOCKS_IS_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_TYPE_HEADER_BAR))
#define CLOCKS_HEADER_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_TYPE_HEADER_BAR, ClocksHeaderBarClass))

typedef struct _ClocksHeaderBar ClocksHeaderBar;
typedef struct _ClocksHeaderBarClass ClocksHeaderBarClass;
typedef struct _ClocksHeaderBarPrivate ClocksHeaderBarPrivate;

#define CLOCKS_HEADER_BAR_TYPE_MODE (clocks_header_bar_mode_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))

#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_CONTENT_ITEM (clocks_content_item_get_type ())
#define CLOCKS_CONTENT_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TYPE_CONTENT_ITEM, ClocksContentItem))
#define CLOCKS_IS_CONTENT_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TYPE_CONTENT_ITEM))
#define CLOCKS_CONTENT_ITEM_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLOCKS_TYPE_CONTENT_ITEM, ClocksContentItemIface))

typedef struct _ClocksContentItem ClocksContentItem;
typedef struct _ClocksContentItemIface ClocksContentItemIface;

#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;
typedef struct _Block8Data Block8Data;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))

#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 _ClocksHeaderBar {
	GdHeaderBar parent_instance;
	ClocksHeaderBarPrivate * priv;
};

struct _ClocksHeaderBarClass {
	GdHeaderBarClass parent_class;
};

typedef enum  {
	CLOCKS_HEADER_BAR_MODE_NORMAL,
	CLOCKS_HEADER_BAR_MODE_SELECTION,
	CLOCKS_HEADER_BAR_MODE_STANDALONE
} ClocksHeaderBarMode;

struct _ClocksHeaderBarPrivate {
	GdStackSwitcher* stack_switcher;
	ClocksHeaderBarMode _mode;
};

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 _ClocksContentItemIface {
	GTypeInterface parent_iface;
	void (*get_thumb_properties) (ClocksContentItem* self, gchar** text, gchar** subtext, GdkPixbuf** pixbuf, gchar** css_class);
	const gchar* (*get_name) (ClocksContentItem* self);
	void (*set_name) (ClocksContentItem* self, const gchar* value);
};

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_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;
	void (*delete_selected) (ClocksContentView* self);
};

struct _ClocksContentViewPrivate {
	gboolean _empty;
	GtkWidget* empty_page;
	ClocksIconView* icon_view;
	ClocksHeaderBar* header_bar;
	GdHeaderSimpleButton* select_button;
	GdHeaderSimpleButton* done_button;
	GMenuModel* selection_menu;
	GdHeaderMenuButton* selection_menubutton;
	GtkToolbar* selection_toolbar;
	GtkOverlay* overlay;
};

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

struct _Block8Data {
	int _ref_count_;
	ClocksContentView * self;
	GtkWidget* w;
};

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_header_bar_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_header_bar_get_type (void) G_GNUC_CONST;
GType clocks_header_bar_mode_get_type (void) G_GNUC_CONST;
#define CLOCKS_HEADER_BAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CLOCKS_TYPE_HEADER_BAR, ClocksHeaderBarPrivate))
enum  {
	CLOCKS_HEADER_BAR_DUMMY_PROPERTY,
	CLOCKS_HEADER_BAR_MODE
};
void clocks_header_bar_set_stack (ClocksHeaderBar* self, GdStack* stack);
void clocks_header_bar_clear (ClocksHeaderBar* self);
ClocksHeaderBar* clocks_header_bar_new (void);
ClocksHeaderBar* clocks_header_bar_construct (GType object_type);
ClocksHeaderBarMode clocks_header_bar_get_mode (ClocksHeaderBar* self);
void clocks_header_bar_set_mode (ClocksHeaderBar* self, ClocksHeaderBarMode value);
static GObject * clocks_header_bar_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void _clocks_header_bar___lambda2_ (ClocksHeaderBar* self);
static void __clocks_header_bar___lambda2__gtk_widget_realize (GtkWidget* _sender, gpointer self);
static void clocks_header_bar_finalize (GObject* obj);
static void _vala_clocks_header_bar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_clocks_header_bar_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_TILE_SIZE 256
#define CLOCKS_DIGITAL_CLOCK_RENDERER_CHECK_ICON_SIZE 40
#define CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_MARGIN (CLOCKS_DIGITAL_CLOCK_RENDERER_CHECK_ICON_SIZE / 4)
#define CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_MARGIN_BOTTOM (CLOCKS_DIGITAL_CLOCK_RENDERER_CHECK_ICON_SIZE / 8)
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);
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_content_item_get_type (void) G_GNUC_CONST;
void clocks_content_item_get_thumb_properties (ClocksContentItem* self, gchar** text, gchar** subtext, GdkPixbuf** pixbuf, gchar** css_class);
const gchar* clocks_content_item_get_name (ClocksContentItem* self);
void clocks_content_item_set_name (ClocksContentItem* self, const gchar* value);
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 (void);
ClocksIconView* clocks_icon_view_construct (GType object_type);
static void __lambda3_ (ClocksIconView* self, GtkCellLayout* column, GtkCellRenderer* cell, GtkTreeModel* model, GtkTreeIter* iter);
static void ___lambda3__gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self);
static void __lambda4_ (ClocksIconView* self, GtkCellLayout* column, GtkCellRenderer* cell, GtkTreeModel* model, GtkTreeIter* iter);
static void ___lambda4__gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self);
static gboolean clocks_icon_view_real_button_press_event (GtkWidget* base, GdkEventButton* event);
void clocks_icon_view_set_mode (ClocksIconView* self, ClocksIconViewMode value);
ClocksIconViewMode clocks_icon_view_get_mode (ClocksIconView* self);
void clocks_icon_view_add_item (ClocksIconView* self, 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 __lambda6_ (Block6Data* _data6_, GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter);
static gboolean ___lambda6__gtk_tree_model_foreach_func (GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter, gpointer self);
void clocks_icon_view_select_all (ClocksIconView* self);
static gboolean __lambda7_ (ClocksIconView* self, GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter);
static gboolean ___lambda7__gtk_tree_model_foreach_func (GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter, gpointer self);
void clocks_icon_view_unselect_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_remove_selected (ClocksIconView* self);
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, ClocksHeaderBar* b);
ClocksContentView* clocks_content_view_construct (GType object_type, GtkWidget* e, ClocksHeaderBar* b);
static Block7Data* block7_data_ref (Block7Data* _data7_);
static void block7_data_unref (void * _userdata_);
static void __lambda8_ (ClocksContentView* self);
static void ___lambda8__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void __lambda9_ (ClocksContentView* self);
static void ___lambda9__gtk_button_clicked (GtkButton* _sender, gpointer self);
GtkBuilder* clocks_utils_load_ui (const gchar* ui);
static GtkToolbar* clocks_content_view_create_selection_toolbar (ClocksContentView* self);
static void __lambda11_ (Block7Data* _data7_);
static void clocks_content_view_update_empty_view (ClocksContentView* self, GtkTreeModel* model);
static void ___lambda11__gtk_tree_model_row_inserted (GtkTreeModel* _sender, GtkTreePath* path, GtkTreeIter* iter, gpointer self);
static void __lambda12_ (Block7Data* _data7_);
static void ___lambda12__gtk_tree_model_row_deleted (GtkTreeModel* _sender, GtkTreePath* path, gpointer self);
static void __lambda13_ (ClocksContentView* self);
static void ___lambda13__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __lambda14_ (ClocksContentView* self);
static void clocks_content_view_fade_in (ClocksContentView* self, GtkWidget* w);
static void clocks_content_view_fade_out (ClocksContentView* self, GtkWidget* w);
static void ___lambda14__gtk_icon_view_selection_changed (GtkIconView* _sender, gpointer self);
static void __lambda16_ (ClocksContentView* self, GtkTreePath* path);
static void ___lambda16__gtk_icon_view_item_activated (GtkIconView* _sender, GtkTreePath* path, gpointer self);
static void __lambda10_ (ClocksContentView* self);
static void ___lambda10__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void clocks_content_view_set_empty (ClocksContentView* self, gboolean value);
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void block8_data_unref (void * _userdata_);
static gboolean ___lambda15_ (Block8Data* _data8_);
static gboolean ____lambda15__gsource_func (gpointer self);
void clocks_content_view_add_item (ClocksContentView* self, ClocksContentItem* item);
GList* clocks_content_view_get_selected_items (ClocksContentView* self);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
void clocks_content_view_select_all (ClocksContentView* self);
void clocks_content_view_unselect_all (ClocksContentView* self);
gboolean clocks_content_view_escape_pressed (ClocksContentView* self);
void clocks_content_view_update_header_bar (ClocksContentView* self);
gboolean clocks_content_view_get_empty (ClocksContentView* self);
static void clocks_content_view_real_delete_selected (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 __lambda37_ (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 ___lambda37__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_header_bar_mode_get_type (void) {
	static volatile gsize clocks_header_bar_mode_type_id__volatile = 0;
	if (g_once_init_enter (&clocks_header_bar_mode_type_id__volatile)) {
		static const GEnumValue values[] = {{CLOCKS_HEADER_BAR_MODE_NORMAL, "CLOCKS_HEADER_BAR_MODE_NORMAL", "normal"}, {CLOCKS_HEADER_BAR_MODE_SELECTION, "CLOCKS_HEADER_BAR_MODE_SELECTION", "selection"}, {CLOCKS_HEADER_BAR_MODE_STANDALONE, "CLOCKS_HEADER_BAR_MODE_STANDALONE", "standalone"}, {0, NULL, NULL}};
		GType clocks_header_bar_mode_type_id;
		clocks_header_bar_mode_type_id = g_enum_register_static ("ClocksHeaderBarMode", values);
		g_once_init_leave (&clocks_header_bar_mode_type_id__volatile, clocks_header_bar_mode_type_id);
	}
	return clocks_header_bar_mode_type_id__volatile;
}


void clocks_header_bar_set_stack (ClocksHeaderBar* self, GdStack* stack) {
	GdStackSwitcher* _tmp0_;
	GdStack* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stack != NULL);
	_tmp0_ = self->priv->stack_switcher;
	_tmp1_ = stack;
	gd_stack_switcher_set_stack (_tmp0_, _tmp1_);
}


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


void clocks_header_bar_clear (ClocksHeaderBar* self) {
	GList* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_container_get_children ((GtkContainer*) self);
	{
		GList* w_collection = NULL;
		GList* w_it = NULL;
		w_collection = _tmp0_;
		for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
			GtkWidget* _tmp1_;
			GtkWidget* w = NULL;
			_tmp1_ = _g_object_ref0 ((GtkWidget*) w_it->data);
			w = _tmp1_;
			{
				GtkWidget* _tmp2_;
				_tmp2_ = w;
				gtk_widget_hide (_tmp2_);
				_g_object_unref0 (w);
			}
		}
		_g_list_free0 (w_collection);
	}
}


ClocksHeaderBar* clocks_header_bar_construct (GType object_type) {
	ClocksHeaderBar * self = NULL;
	self = (ClocksHeaderBar*) g_object_new (object_type, NULL);
	return self;
}


ClocksHeaderBar* clocks_header_bar_new (void) {
	return clocks_header_bar_construct (CLOCKS_TYPE_HEADER_BAR);
}


ClocksHeaderBarMode clocks_header_bar_get_mode (ClocksHeaderBar* self) {
	ClocksHeaderBarMode result;
	ClocksHeaderBarMode _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_mode;
	result = _tmp0_;
	return result;
}


void clocks_header_bar_set_mode (ClocksHeaderBar* self, ClocksHeaderBarMode value) {
	gboolean _tmp0_ = FALSE;
	ClocksHeaderBarMode _tmp1_;
	ClocksHeaderBarMode _tmp2_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_mode;
	_tmp2_ = value;
	if (_tmp1_ != _tmp2_) {
		gboolean _tmp3_ = FALSE;
		_tmp3_ = gtk_widget_get_realized ((GtkWidget*) self);
		_tmp0_ = _tmp3_;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp4_ = _tmp0_;
	if (_tmp4_) {
		ClocksHeaderBarMode _tmp5_;
		GdStackSwitcher* _tmp6_ = NULL;
		ClocksHeaderBarMode _tmp7_;
		GdStackSwitcher* _tmp9_;
		ClocksHeaderBarMode _tmp10_;
		_tmp5_ = value;
		self->priv->_mode = _tmp5_;
		_tmp7_ = self->priv->_mode;
		if (_tmp7_ == CLOCKS_HEADER_BAR_MODE_NORMAL) {
			GdStackSwitcher* _tmp8_;
			_tmp8_ = self->priv->stack_switcher;
			_tmp6_ = _tmp8_;
		} else {
			_tmp6_ = NULL;
		}
		_tmp9_ = _tmp6_;
		gd_header_bar_set_custom_title ((GdHeaderBar*) self, (GtkWidget*) _tmp9_);
		_tmp10_ = self->priv->_mode;
		if (_tmp10_ == CLOCKS_HEADER_BAR_MODE_SELECTION) {
			GtkStyleContext* _tmp11_ = NULL;
			_tmp11_ = gtk_widget_get_style_context ((GtkWidget*) self);
			gtk_style_context_add_class (_tmp11_, "selection-mode");
		} else {
			GtkStyleContext* _tmp12_ = NULL;
			_tmp12_ = gtk_widget_get_style_context ((GtkWidget*) self);
			gtk_style_context_remove_class (_tmp12_, "selection-mode");
		}
		g_object_notify ((GObject*) self, "mode");
	}
}


static void _clocks_header_bar___lambda2_ (ClocksHeaderBar* self) {
	GdStackSwitcher* _tmp0_;
	_tmp0_ = self->priv->stack_switcher;
	gd_header_bar_set_custom_title ((GdHeaderBar*) self, (GtkWidget*) _tmp0_);
}


static void __clocks_header_bar___lambda2__gtk_widget_realize (GtkWidget* _sender, gpointer self) {
	_clocks_header_bar___lambda2_ (self);
}


static GObject * clocks_header_bar_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	ClocksHeaderBar * self;
	GdStackSwitcher* _tmp0_;
	parent_class = G_OBJECT_CLASS (clocks_header_bar_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLOCKS_TYPE_HEADER_BAR, ClocksHeaderBar);
	_tmp0_ = (GdStackSwitcher*) gd_stack_switcher_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->stack_switcher);
	self->priv->stack_switcher = _tmp0_;
	g_signal_connect_object ((GtkWidget*) self, "realize", (GCallback) __clocks_header_bar___lambda2__gtk_widget_realize, self, 0);
	return obj;
}


static void clocks_header_bar_class_init (ClocksHeaderBarClass * klass) {
	clocks_header_bar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ClocksHeaderBarPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_clocks_header_bar_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_clocks_header_bar_set_property;
	G_OBJECT_CLASS (klass)->constructor = clocks_header_bar_constructor;
	G_OBJECT_CLASS (klass)->finalize = clocks_header_bar_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_HEADER_BAR_MODE, g_param_spec_enum ("mode", "mode", "mode", CLOCKS_HEADER_BAR_TYPE_MODE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void clocks_header_bar_instance_init (ClocksHeaderBar * self) {
	self->priv = CLOCKS_HEADER_BAR_GET_PRIVATE (self);
}


static void clocks_header_bar_finalize (GObject* obj) {
	ClocksHeaderBar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLOCKS_TYPE_HEADER_BAR, ClocksHeaderBar);
	_g_object_unref0 (self->priv->stack_switcher);
	G_OBJECT_CLASS (clocks_header_bar_parent_class)->finalize (obj);
}


GType clocks_header_bar_get_type (void) {
	static volatile gsize clocks_header_bar_type_id__volatile = 0;
	if (g_once_init_enter (&clocks_header_bar_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ClocksHeaderBarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clocks_header_bar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ClocksHeaderBar), 0, (GInstanceInitFunc) clocks_header_bar_instance_init, NULL };
		GType clocks_header_bar_type_id;
		clocks_header_bar_type_id = g_type_register_static (gd_header_bar_get_type (), "ClocksHeaderBar", &g_define_type_info, 0);
		g_once_init_leave (&clocks_header_bar_type_id__volatile, clocks_header_bar_type_id);
	}
	return clocks_header_bar_type_id__volatile;
}


static void _vala_clocks_header_bar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ClocksHeaderBar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_TYPE_HEADER_BAR, ClocksHeaderBar);
	switch (property_id) {
		case CLOCKS_HEADER_BAR_MODE:
		g_value_set_enum (value, clocks_header_bar_get_mode (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_clocks_header_bar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ClocksHeaderBar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_TYPE_HEADER_BAR, ClocksHeaderBar);
	switch (property_id) {
		case CLOCKS_HEADER_BAR_MODE:
		clocks_header_bar_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_;
	cairo_t* _tmp11_;
	GdkRectangle _tmp12_;
	gint _tmp13_;
	GdkRectangle _tmp14_;
	gint _tmp15_;
	GdkRectangle _tmp16_;
	gint _tmp17_;
	gint _tmp18_ = 0;
	gint margin;
	GdkPixbuf* _tmp19_ = NULL;
	GdkPixbuf* _tmp20_;
	GdkPixbuf* _tmp21_;
	gboolean _tmp22_;
	GdkRectangle _tmp39_;
	gint _tmp40_;
	gint _tmp41_;
	gint w;
	GtkWidget* _tmp42_;
	PangoLayout* _tmp43_ = NULL;
	PangoLayout* layout;
	PangoLayout* _tmp44_;
	const gchar* _tmp45_;
	gchar* _tmp46_ = NULL;
	gchar* _tmp47_;
	PangoLayout* _tmp48_;
	gint _tmp49_;
	PangoLayout* _tmp50_;
	gint text_w = 0;
	gint text_h = 0;
	PangoLayout* _tmp51_;
	gint _tmp52_ = 0;
	gint _tmp53_ = 0;
	PangoLayout* layout_subtext;
	gint subtext_w;
	gint subtext_h;
	gint subtext_pad;
	const gchar* _tmp54_;
	gint stripe_h;
	gint _tmp75_;
	gint x;
	GdkRectangle _tmp76_;
	gint _tmp77_;
	gint _tmp78_;
	gint y;
	GtkStyleContext* _tmp79_;
	GtkStyleContext* _tmp80_;
	cairo_t* _tmp81_;
	gint _tmp82_;
	gint _tmp83_;
	gint _tmp84_;
	gint _tmp85_;
	GtkStyleContext* _tmp86_;
	cairo_t* _tmp87_;
	gint _tmp88_;
	gint _tmp89_;
	gint _tmp90_;
	gint _tmp91_;
	gint _tmp92_;
	gint _tmp93_;
	gint _tmp94_;
	gint _tmp95_;
	gint _tmp96_;
	GtkStyleContext* _tmp97_;
	cairo_t* _tmp98_;
	gint _tmp99_;
	gint _tmp100_;
	PangoLayout* _tmp101_;
	const gchar* _tmp102_;
	GtkStyleContext* _tmp111_;
	gboolean _tmp112_;
	cairo_t* _tmp134_;
	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_);
	_tmp11_ = cr;
	_tmp12_ = *cell_area;
	_tmp13_ = _tmp12_.x;
	_tmp14_ = *cell_area;
	_tmp15_ = _tmp14_.y;
	cairo_translate (_tmp11_, (gdouble) _tmp13_, (gdouble) _tmp15_);
	_tmp16_ = *cell_area;
	_tmp17_ = _tmp16_.width;
	_tmp18_ = MAX (CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_MARGIN, (gint) ((_tmp17_ - CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_SIZE) / 2));
	margin = _tmp18_;
	g_object_get ((GtkCellRendererPixbuf*) self, "pixbuf", &_tmp19_, NULL);
	_tmp20_ = _tmp19_;
	_tmp21_ = _tmp20_;
	_tmp22_ = _tmp21_ != NULL;
	_g_object_unref0 (_tmp21_);
	if (_tmp22_) {
		gint _tmp23_;
		gint _tmp24_;
		GdkRectangle _tmp25_ = {0};
		GdkRectangle area;
		cairo_t* _tmp26_;
		GtkWidget* _tmp27_;
		GdkRectangle _tmp28_;
		GdkRectangle _tmp29_;
		GtkCellRendererState _tmp30_;
		_tmp23_ = margin;
		_tmp24_ = margin;
		_tmp25_.x = _tmp23_;
		_tmp25_.y = _tmp24_;
		_tmp25_.width = CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_SIZE;
		_tmp25_.height = CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_SIZE;
		area = _tmp25_;
		_tmp26_ = cr;
		_tmp27_ = widget;
		_tmp28_ = area;
		_tmp29_ = area;
		_tmp30_ = 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), _tmp26_, _tmp27_, &_tmp28_, &_tmp29_, _tmp30_);
	} else {
		GtkStyleContext* _tmp31_;
		cairo_t* _tmp32_;
		gint _tmp33_;
		gint _tmp34_;
		GtkStyleContext* _tmp35_;
		cairo_t* _tmp36_;
		gint _tmp37_;
		gint _tmp38_;
		_tmp31_ = context;
		_tmp32_ = cr;
		_tmp33_ = margin;
		_tmp34_ = margin;
		gtk_render_frame (_tmp31_, _tmp32_, (gdouble) _tmp33_, (gdouble) _tmp34_, (gdouble) CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_SIZE, (gdouble) CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_SIZE);
		_tmp35_ = context;
		_tmp36_ = cr;
		_tmp37_ = margin;
		_tmp38_ = margin;
		gtk_render_background (_tmp35_, _tmp36_, (gdouble) _tmp37_, (gdouble) _tmp38_, (gdouble) CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_SIZE, (gdouble) CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_SIZE);
	}
	_tmp39_ = *cell_area;
	_tmp40_ = _tmp39_.width;
	_tmp41_ = margin;
	w = _tmp40_ - (2 * _tmp41_);
	_tmp42_ = widget;
	_tmp43_ = gtk_widget_create_pango_layout (_tmp42_, "");
	layout = _tmp43_;
	_tmp44_ = layout;
	_tmp45_ = self->priv->_text;
	_tmp46_ = g_strdup_printf ("<span font_desc=\"32.0\">%s</span>", _tmp45_);
	_tmp47_ = _tmp46_;
	pango_layout_set_markup (_tmp44_, _tmp47_, -1);
	_g_free0 (_tmp47_);
	_tmp48_ = layout;
	_tmp49_ = w;
	pango_layout_set_width (_tmp48_, _tmp49_ * PANGO_SCALE);
	_tmp50_ = layout;
	pango_layout_set_alignment (_tmp50_, PANGO_ALIGN_CENTER);
	_tmp51_ = layout;
	pango_layout_get_pixel_size (_tmp51_, &_tmp52_, &_tmp53_);
	text_w = _tmp52_;
	text_h = _tmp53_;
	layout_subtext = NULL;
	subtext_w = 0;
	subtext_h = 0;
	subtext_pad = 0;
	_tmp54_ = self->priv->_subtext;
	if (_tmp54_ != NULL) {
		GtkWidget* _tmp55_;
		PangoLayout* _tmp56_ = NULL;
		PangoLayout* _tmp57_;
		const gchar* _tmp58_;
		gchar* _tmp59_ = NULL;
		gchar* _tmp60_;
		PangoLayout* _tmp61_;
		gint _tmp62_;
		PangoLayout* _tmp63_;
		PangoLayout* _tmp64_;
		gint _tmp65_ = 0;
		gint _tmp66_ = 0;
		PangoLayout* _tmp67_;
		PangoLayoutLine* _tmp68_ = NULL;
		PangoLayoutLine* _tmp69_;
		PangoLayoutLine* line;
		PangoRectangle ink_rect = {0};
		PangoRectangle log_rect = {0};
		PangoLayoutLine* _tmp70_;
		PangoRectangle _tmp71_ = {0};
		PangoRectangle _tmp72_ = {0};
		PangoRectangle _tmp73_;
		gint _tmp74_;
		_tmp55_ = widget;
		_tmp56_ = gtk_widget_create_pango_layout (_tmp55_, "");
		_g_object_unref0 (layout_subtext);
		layout_subtext = _tmp56_;
		_tmp57_ = layout_subtext;
		_tmp58_ = self->priv->_subtext;
		_tmp59_ = g_strdup_printf ("<span font_desc=\"14.0\">%s</span>", _tmp58_);
		_tmp60_ = _tmp59_;
		pango_layout_set_markup (_tmp57_, _tmp60_, -1);
		_g_free0 (_tmp60_);
		_tmp61_ = layout_subtext;
		_tmp62_ = w;
		pango_layout_set_width (_tmp61_, _tmp62_ * PANGO_SCALE);
		_tmp63_ = layout_subtext;
		pango_layout_set_alignment (_tmp63_, PANGO_ALIGN_CENTER);
		_tmp64_ = layout_subtext;
		pango_layout_get_pixel_size (_tmp64_, &_tmp65_, &_tmp66_);
		subtext_w = _tmp65_;
		subtext_h = _tmp66_;
		subtext_pad = 4;
		_tmp67_ = layout_subtext;
		_tmp68_ = pango_layout_get_line (_tmp67_, 0);
		_tmp69_ = __vala_PangoLayoutLine_copy0 (_tmp68_);
		line = _tmp69_;
		_tmp70_ = line;
		pango_layout_line_get_pixel_extents (_tmp70_, &_tmp71_, &_tmp72_);
		ink_rect = _tmp71_;
		log_rect = _tmp72_;
		_tmp73_ = log_rect;
		_tmp74_ = _tmp73_.width;
		subtext_w = _tmp74_;
		__vala_PangoLayoutLine_free0 (line);
	}
	stripe_h = 128;
	_tmp75_ = margin;
	x = _tmp75_;
	_tmp76_ = *cell_area;
	_tmp77_ = _tmp76_.height;
	_tmp78_ = stripe_h;
	y = (_tmp77_ - _tmp78_) / 2;
	_tmp79_ = context;
	gtk_style_context_add_class (_tmp79_, "stripe");
	_tmp80_ = context;
	_tmp81_ = cr;
	_tmp82_ = x;
	_tmp83_ = y;
	_tmp84_ = w;
	_tmp85_ = stripe_h;
	gtk_render_frame (_tmp80_, _tmp81_, (gdouble) _tmp82_, (gdouble) _tmp83_, (gdouble) _tmp84_, (gdouble) _tmp85_);
	_tmp86_ = context;
	_tmp87_ = cr;
	_tmp88_ = x;
	_tmp89_ = y;
	_tmp90_ = w;
	_tmp91_ = stripe_h;
	gtk_render_background (_tmp86_, _tmp87_, (gdouble) _tmp88_, (gdouble) _tmp89_, (gdouble) _tmp90_, (gdouble) _tmp91_);
	_tmp92_ = y;
	_tmp93_ = stripe_h;
	_tmp94_ = text_h;
	_tmp95_ = subtext_h;
	_tmp96_ = subtext_pad;
	y = _tmp92_ + ((((_tmp93_ - _tmp94_) - _tmp95_) - _tmp96_) / 2);
	_tmp97_ = context;
	_tmp98_ = cr;
	_tmp99_ = x;
	_tmp100_ = y;
	_tmp101_ = layout;
	gtk_render_layout (_tmp97_, _tmp98_, (gdouble) _tmp99_, (gdouble) _tmp100_, _tmp101_);
	_tmp102_ = self->priv->_subtext;
	if (_tmp102_ != NULL) {
		gint _tmp103_;
		gint _tmp104_;
		gint _tmp105_;
		GtkStyleContext* _tmp106_;
		cairo_t* _tmp107_;
		gint _tmp108_;
		gint _tmp109_;
		PangoLayout* _tmp110_;
		_tmp103_ = y;
		_tmp104_ = text_h;
		_tmp105_ = subtext_pad;
		y = _tmp103_ + (_tmp104_ + _tmp105_);
		_tmp106_ = context;
		_tmp107_ = cr;
		_tmp108_ = x;
		_tmp109_ = y;
		_tmp110_ = layout_subtext;
		gtk_render_layout (_tmp106_, _tmp107_, (gdouble) _tmp108_, (gdouble) _tmp109_, _tmp110_);
	}
	_tmp111_ = context;
	gtk_style_context_restore (_tmp111_);
	_tmp112_ = self->priv->_toggle_visible;
	if (_tmp112_) {
		gint xpad = 0;
		gint ypad = 0;
		gint x_offset = 0;
		gint _tmp113_ = 0;
		gint _tmp114_ = 0;
		GtkWidget* _tmp115_;
		GtkTextDirection _tmp116_ = 0;
		gint _tmp121_;
		gint check_x;
		GdkRectangle _tmp122_;
		gint _tmp123_;
		gint _tmp124_;
		gint check_y;
		GtkStyleContext* _tmp125_;
		GtkStyleContext* _tmp126_;
		gboolean _tmp127_;
		GtkStyleContext* _tmp129_;
		cairo_t* _tmp130_;
		gint _tmp131_;
		gint _tmp132_;
		GtkStyleContext* _tmp133_;
		gtk_cell_renderer_get_padding ((GtkCellRenderer*) self, &_tmp113_, &_tmp114_);
		xpad = _tmp113_;
		ypad = _tmp114_;
		_tmp115_ = widget;
		_tmp116_ = gtk_widget_get_direction (_tmp115_);
		if (_tmp116_ == GTK_TEXT_DIR_RTL) {
			gint _tmp117_;
			_tmp117_ = xpad;
			x_offset = _tmp117_;
		} else {
			GdkRectangle _tmp118_;
			gint _tmp119_;
			gint _tmp120_;
			_tmp118_ = *cell_area;
			_tmp119_ = _tmp118_.width;
			_tmp120_ = xpad;
			x_offset = (_tmp119_ - CLOCKS_DIGITAL_CLOCK_RENDERER_CHECK_ICON_SIZE) - _tmp120_;
		}
		_tmp121_ = x_offset;
		check_x = _tmp121_;
		_tmp122_ = *cell_area;
		_tmp123_ = _tmp122_.height;
		_tmp124_ = ypad;
		check_y = (_tmp123_ - CLOCKS_DIGITAL_CLOCK_RENDERER_CHECK_ICON_SIZE) - _tmp124_;
		_tmp125_ = context;
		gtk_style_context_save (_tmp125_);
		_tmp126_ = context;
		gtk_style_context_add_class (_tmp126_, GTK_STYLE_CLASS_CHECK);
		_tmp127_ = self->priv->_active;
		if (_tmp127_) {
			GtkStyleContext* _tmp128_;
			_tmp128_ = context;
			gtk_style_context_set_state (_tmp128_, GTK_STATE_FLAG_ACTIVE);
		}
		_tmp129_ = context;
		_tmp130_ = cr;
		_tmp131_ = check_x;
		_tmp132_ = check_y;
		gtk_render_check (_tmp129_, _tmp130_, (gdouble) _tmp131_, (gdouble) _tmp132_, (gdouble) CLOCKS_DIGITAL_CLOCK_RENDERER_CHECK_ICON_SIZE, (gdouble) CLOCKS_DIGITAL_CLOCK_RENDERER_CHECK_ICON_SIZE);
		_tmp133_ = context;
		gtk_style_context_restore (_tmp133_);
	}
	_tmp134_ = cr;
	cairo_restore (_tmp134_);
	_g_object_unref0 (layout_subtext);
	_g_object_unref0 (layout);
	_g_object_unref0 (context);
}


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;
	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;
	}
}


void clocks_content_item_get_thumb_properties (ClocksContentItem* self, gchar** text, gchar** subtext, GdkPixbuf** pixbuf, gchar** css_class) {
	g_return_if_fail (self != NULL);
	CLOCKS_CONTENT_ITEM_GET_INTERFACE (self)->get_thumb_properties (self, text, subtext, pixbuf, css_class);
}


const gchar* clocks_content_item_get_name (ClocksContentItem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return CLOCKS_CONTENT_ITEM_GET_INTERFACE (self)->get_name (self);
}


void clocks_content_item_set_name (ClocksContentItem* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	CLOCKS_CONTENT_ITEM_GET_INTERFACE (self)->set_name (self, value);
}


static void clocks_content_item_base_init (ClocksContentItemIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		g_object_interface_install_property (iface, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	}
}


GType clocks_content_item_get_type (void) {
	static volatile gsize clocks_content_item_type_id__volatile = 0;
	if (g_once_init_enter (&clocks_content_item_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ClocksContentItemIface), (GBaseInitFunc) clocks_content_item_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType clocks_content_item_type_id;
		clocks_content_item_type_id = g_type_register_static (G_TYPE_INTERFACE, "ClocksContentItem", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (clocks_content_item_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&clocks_content_item_type_id__volatile, clocks_content_item_type_id);
	}
	return clocks_content_item_type_id__volatile;
}


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_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;
}


static void __lambda3_ (ClocksIconView* self, GtkCellLayout* column, GtkCellRenderer* cell, GtkTreeModel* model, GtkTreeIter* iter) {
	ClocksContentItem* item = NULL;
	GtkTreeModel* _tmp0_;
	GtkTreeIter _tmp1_;
	GtkCellRenderer* _tmp2_;
	ClocksDigitalClockRenderer* _tmp3_;
	ClocksDigitalClockRenderer* renderer;
	gchar* text = NULL;
	gchar* subtext = NULL;
	GdkPixbuf* pixbuf = NULL;
	gchar* css_class = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	GdkPixbuf* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	g_return_if_fail (column != NULL);
	g_return_if_fail (cell != NULL);
	g_return_if_fail (model != NULL);
	g_return_if_fail (iter != NULL);
	_tmp0_ = model;
	_tmp1_ = *iter;
	gtk_tree_model_get (_tmp0_, &_tmp1_, CLOCKS_ICON_VIEW_COLUMN_ITEM, &item, -1);
	_tmp2_ = cell;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, CLOCKS_TYPE_DIGITAL_CLOCK_RENDERER, ClocksDigitalClockRenderer));
	renderer = _tmp3_;
	clocks_content_item_get_thumb_properties (item, &_tmp4_, &_tmp5_, &_tmp6_, &_tmp7_);
	_g_free0 (text);
	text = _tmp4_;
	_g_free0 (subtext);
	subtext = _tmp5_;
	_g_object_unref0 (pixbuf);
	pixbuf = _tmp6_;
	_g_free0 (css_class);
	css_class = _tmp7_;
	clocks_digital_clock_renderer_set_text (renderer, text);
	clocks_digital_clock_renderer_set_subtext (renderer, subtext);
	g_object_set ((GtkCellRendererPixbuf*) renderer, "pixbuf", pixbuf, NULL);
	clocks_digital_clock_renderer_set_css_class (renderer, css_class);
	_g_free0 (css_class);
	_g_object_unref0 (pixbuf);
	_g_free0 (subtext);
	_g_free0 (text);
	_g_object_unref0 (renderer);
	_g_object_unref0 (item);
}


static void ___lambda3__gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self) {
	__lambda3_ (self, cell_layout, cell, tree_model, iter);
}


static void __lambda4_ (ClocksIconView* self, GtkCellLayout* column, GtkCellRenderer* cell, GtkTreeModel* model, GtkTreeIter* iter) {
	ClocksContentItem* item = NULL;
	GtkTreeModel* _tmp0_;
	GtkTreeIter _tmp1_;
	GtkCellRenderer* _tmp2_;
	GtkCellRendererText* _tmp3_;
	GtkCellRendererText* renderer;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_;
	g_return_if_fail (column != NULL);
	g_return_if_fail (cell != NULL);
	g_return_if_fail (model != NULL);
	g_return_if_fail (iter != NULL);
	_tmp0_ = model;
	_tmp1_ = *iter;
	gtk_tree_model_get (_tmp0_, &_tmp1_, CLOCKS_ICON_VIEW_COLUMN_ITEM, &item, -1);
	_tmp2_ = cell;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GTK_TYPE_CELL_RENDERER_TEXT, GtkCellRendererText));
	renderer = _tmp3_;
	_tmp4_ = clocks_content_item_get_name (item);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_markup_escape_text (_tmp5_, (gssize) (-1));
	_tmp7_ = _tmp6_;
	g_object_set (renderer, "markup", _tmp7_, NULL);
	_g_free0 (_tmp7_);
	_g_object_unref0 (renderer);
	_g_object_unref0 (item);
}


static void ___lambda4__gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self) {
	__lambda4_ (self, cell_layout, cell, tree_model, iter);
}


ClocksIconView* clocks_icon_view_construct (GType object_type) {
	ClocksIconView * self = NULL;
	GtkListStore* _tmp0_;
	GtkListStore* _tmp1_;
	GtkStyleContext* _tmp2_ = NULL;
	gint tile_width;
	gint tile_height;
	ClocksDigitalClockRenderer* _tmp3_;
	ClocksDigitalClockRenderer* _tmp4_;
	ClocksDigitalClockRenderer* _tmp5_;
	ClocksDigitalClockRenderer* _tmp6_;
	ClocksDigitalClockRenderer* _tmp7_;
	ClocksDigitalClockRenderer* _tmp8_;
	GtkCellRendererText* _tmp9_;
	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, CLOCKS_TYPE_CONTENT_ITEM);
	_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_item_padding ((GtkIconView*) self, 0);
	gtk_icon_view_set_margin ((GtkIconView*) self, 12);
	tile_width = CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_SIZE + (2 * CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_MARGIN);
	tile_height = (CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_SIZE + CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_MARGIN) + CLOCKS_DIGITAL_CLOCK_RENDERER_TILE_MARGIN_BOTTOM;
	_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_, tile_width, tile_height);
	_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;
	gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) self, (GtkCellRenderer*) _tmp8_, ___lambda3__gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
	_tmp9_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp9_);
	text_renderer = _tmp9_;
	gtk_cell_renderer_set_alignment ((GtkCellRenderer*) text_renderer, 0.5f, 0.5f);
	gtk_cell_renderer_set_fixed_size ((GtkCellRenderer*) text_renderer, tile_width, -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_set_cell_data_func ((GtkCellLayout*) self, (GtkCellRenderer*) text_renderer, ___lambda4__gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
	_g_object_unref0 (text_renderer);
	return self;
}


ClocksIconView* clocks_icon_view_new (void) {
	return clocks_icon_view_construct (CLOCKS_TYPE_ICON_VIEW);
}


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) {
		GdkEventButton _tmp7_;
		guint _tmp8_;
		ClocksIconViewMode _tmp9_;
		ClocksIconViewMode _tmp10_;
		_tmp7_ = *event;
		_tmp8_ = _tmp7_.button;
		if (_tmp8_ == ((guint) GDK_BUTTON_SECONDARY)) {
			clocks_icon_view_set_mode (self, CLOCKS_ICON_VIEW_MODE_SELECTION);
		}
		_tmp9_ = clocks_icon_view_get_mode (self);
		_tmp10_ = _tmp9_;
		if (_tmp10_ == CLOCKS_ICON_VIEW_MODE_SELECTION) {
			GtkTreeModel* _tmp11_;
			GtkTreeModel* _tmp12_;
			GtkListStore* _tmp13_;
			GtkListStore* store;
			GtkTreeIter i = {0};
			GtkListStore* _tmp14_;
			GtkTreePath* _tmp15_;
			GtkTreeIter _tmp16_ = {0};
			gboolean _tmp17_ = FALSE;
			_tmp11_ = gtk_icon_view_get_model ((GtkIconView*) self);
			_tmp12_ = _tmp11_;
			_tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GTK_TYPE_LIST_STORE, GtkListStore));
			store = _tmp13_;
			_tmp14_ = store;
			_tmp15_ = path;
			_tmp17_ = gtk_tree_model_get_iter ((GtkTreeModel*) _tmp14_, &_tmp16_, _tmp15_);
			i = _tmp16_;
			if (_tmp17_) {
				gboolean selected = FALSE;
				GtkListStore* _tmp18_;
				GtkTreeIter _tmp19_;
				GtkListStore* _tmp20_;
				GtkTreeIter _tmp21_;
				gboolean _tmp22_;
				_tmp18_ = store;
				_tmp19_ = i;
				gtk_tree_model_get ((GtkTreeModel*) _tmp18_, &_tmp19_, CLOCKS_ICON_VIEW_COLUMN_SELECTED, &selected, -1);
				_tmp20_ = store;
				_tmp21_ = i;
				_tmp22_ = selected;
				gtk_list_store_set (_tmp20_, &_tmp21_, CLOCKS_ICON_VIEW_COLUMN_SELECTED, !_tmp22_, -1);
				g_signal_emit_by_name ((GtkIconView*) self, "selection-changed");
			}
			_g_object_unref0 (store);
		} else {
			GtkTreePath* _tmp23_;
			_tmp23_ = path;
			gtk_icon_view_item_activated ((GtkIconView*) self, _tmp23_);
		}
	}
	result = FALSE;
	_gtk_tree_path_free0 (path);
	return result;
}


void clocks_icon_view_add_item (ClocksIconView* self, GObject* item) {
	GtkTreeModel* _tmp0_;
	GtkTreeModel* _tmp1_;
	GtkListStore* _tmp2_;
	GtkListStore* store;
	GtkTreeIter i = {0};
	GtkTreeIter _tmp3_ = {0};
	GtkTreeIter _tmp4_;
	GObject* _tmp5_;
	g_return_if_fail (self != 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_;
	gtk_list_store_append (store, &_tmp3_);
	i = _tmp3_;
	_tmp4_ = i;
	_tmp5_ = item;
	gtk_list_store_set (store, &_tmp4_, CLOCKS_ICON_VIEW_COLUMN_SELECTED, FALSE, CLOCKS_ICON_VIEW_COLUMN_ITEM, _tmp5_, -1);
	_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 __lambda6_ (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 ___lambda6__gtk_tree_model_foreach_func (GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter, gpointer self) {
	gboolean result;
	result = __lambda6_ (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_, ___lambda6__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 __lambda7_ (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 ___lambda7__gtk_tree_model_foreach_func (GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter, gpointer self) {
	gboolean result;
	result = __lambda7_ (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, ___lambda7__gtk_tree_model_foreach_func, self);
	g_signal_emit_by_name ((GtkIconView*) self, "selection-changed");
	_g_object_unref0 (model);
}


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, FALSE, -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_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, ___lambda5__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 __lambda8_ (ClocksContentView* self) {
	ClocksIconView* _tmp0_;
	_tmp0_ = self->priv->icon_view;
	clocks_icon_view_set_mode (_tmp0_, CLOCKS_ICON_VIEW_MODE_SELECTION);
}


static void ___lambda8__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda8_ (self);
}


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


static void ___lambda9__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda9_ (self);
}


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


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


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


static void ___lambda12__gtk_tree_model_row_deleted (GtkTreeModel* _sender, GtkTreePath* path, gpointer self) {
	__lambda12_ (self);
}


static void __lambda13_ (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) {
		ClocksHeaderBar* _tmp3_;
		_tmp3_ = self->priv->header_bar;
		clocks_header_bar_set_mode (_tmp3_, CLOCKS_HEADER_BAR_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) {
			ClocksHeaderBar* _tmp7_;
			_tmp7_ = self->priv->header_bar;
			clocks_header_bar_set_mode (_tmp7_, CLOCKS_HEADER_BAR_MODE_NORMAL);
		}
	}
}


static void ___lambda13__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda13_ (self);
}


static void __lambda14_ (ClocksContentView* self) {
	ClocksIconView* _tmp0_;
	GList* _tmp1_ = NULL;
	GList* items;
	GList* _tmp2_;
	guint _tmp3_ = 0U;
	guint n_items;
	gchar* label = NULL;
	guint _tmp4_;
	GdHeaderMenuButton* _tmp11_;
	const gchar* _tmp12_;
	guint _tmp13_;
	_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->selection_menubutton;
	_tmp12_ = label;
	g_object_set ((GdHeaderButton*) _tmp11_, "label", _tmp12_, NULL);
	_tmp13_ = n_items;
	if (_tmp13_ != ((guint) 0)) {
		GtkToolbar* _tmp14_;
		_tmp14_ = self->priv->selection_toolbar;
		clocks_content_view_fade_in (self, (GtkWidget*) _tmp14_);
	} else {
		GtkToolbar* _tmp15_;
		_tmp15_ = self->priv->selection_toolbar;
		clocks_content_view_fade_out (self, (GtkWidget*) _tmp15_);
	}
	_g_free0 (label);
	__g_list_free__gtk_tree_path_free0_0 (items);
}


static void ___lambda14__gtk_icon_view_selection_changed (GtkIconView* _sender, gpointer self) {
	__lambda14_ (self);
}


static void __lambda16_ (ClocksContentView* self, GtkTreePath* path) {
	ClocksIconView* _tmp0_;
	GtkTreeModel* _tmp1_;
	GtkTreeModel* _tmp2_;
	GtkListStore* _tmp3_;
	GtkListStore* store;
	GtkTreeIter i = {0};
	GtkListStore* _tmp4_;
	GtkTreePath* _tmp5_;
	GtkTreeIter _tmp6_ = {0};
	gboolean _tmp7_ = FALSE;
	g_return_if_fail (path != NULL);
	_tmp0_ = self->priv->icon_view;
	_tmp1_ = gtk_icon_view_get_model ((GtkIconView*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GTK_TYPE_LIST_STORE, GtkListStore));
	store = _tmp3_;
	_tmp4_ = store;
	_tmp5_ = path;
	_tmp7_ = gtk_tree_model_get_iter ((GtkTreeModel*) _tmp4_, &_tmp6_, _tmp5_);
	i = _tmp6_;
	if (_tmp7_) {
		GObject* item = NULL;
		GtkListStore* _tmp8_;
		GtkTreeIter _tmp9_;
		GObject* _tmp10_;
		_tmp8_ = store;
		_tmp9_ = i;
		gtk_tree_model_get ((GtkTreeModel*) _tmp8_, &_tmp9_, CLOCKS_ICON_VIEW_COLUMN_ITEM, &item, -1);
		_tmp10_ = item;
		g_signal_emit_by_name (self, "item-activated", _tmp10_);
		_g_object_unref0 (item);
	}
	_g_object_unref0 (store);
}


static void ___lambda16__gtk_icon_view_item_activated (GtkIconView* _sender, GtkTreePath* path, gpointer self) {
	__lambda16_ (self, path);
}


ClocksContentView* clocks_content_view_construct (GType object_type, GtkWidget* e, ClocksHeaderBar* b) {
	ClocksContentView * self = NULL;
	Block7Data* _data7_;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	ClocksHeaderBar* _tmp2_;
	ClocksHeaderBar* _tmp3_;
	ClocksIconView* _tmp4_;
	GdHeaderSimpleButton* _tmp5_;
	GdHeaderSimpleButton* _tmp6_;
	GdHeaderSimpleButton* _tmp7_;
	GdHeaderSimpleButton* _tmp8_;
	GdHeaderSimpleButton* _tmp9_;
	ClocksHeaderBar* _tmp10_;
	GdHeaderSimpleButton* _tmp11_;
	GdHeaderSimpleButton* _tmp12_;
	GdHeaderSimpleButton* _tmp13_;
	const gchar* _tmp14_ = NULL;
	GdHeaderSimpleButton* _tmp15_;
	GdHeaderSimpleButton* _tmp16_;
	GtkStyleContext* _tmp17_ = NULL;
	GdHeaderSimpleButton* _tmp18_;
	ClocksHeaderBar* _tmp19_;
	GdHeaderSimpleButton* _tmp20_;
	GtkBuilder* _tmp21_ = NULL;
	GtkBuilder* builder;
	GObject* _tmp22_ = NULL;
	GMenuModel* _tmp23_;
	GdHeaderMenuButton* _tmp24_;
	GdHeaderMenuButton* _tmp25_;
	const gchar* _tmp26_ = NULL;
	GdHeaderMenuButton* _tmp27_;
	GMenuModel* _tmp28_;
	GdHeaderMenuButton* _tmp29_;
	GtkStyleContext* _tmp30_ = NULL;
	GtkScrolledWindow* _tmp31_;
	GtkScrolledWindow* scrolled_window;
	ClocksIconView* _tmp32_;
	GtkOverlay* _tmp33_;
	GtkOverlay* _tmp34_;
	GtkToolbar* _tmp35_ = NULL;
	GtkOverlay* _tmp36_;
	GtkToolbar* _tmp37_;
	ClocksIconView* _tmp38_;
	GtkTreeModel* _tmp39_ = NULL;
	GtkTreeModel* _tmp40_;
	ClocksIconView* _tmp41_;
	ClocksIconView* _tmp42_;
	ClocksIconView* _tmp43_;
	GtkWidget* _tmp44_;
	g_return_val_if_fail (e != NULL, NULL);
	g_return_val_if_fail (b != 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_ = b;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->priv->header_bar);
	self->priv->header_bar = _tmp3_;
	_tmp4_ = clocks_icon_view_new ();
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->icon_view);
	self->priv->icon_view = _tmp4_;
	_tmp5_ = (GdHeaderSimpleButton*) gd_header_simple_button_new ();
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->select_button);
	self->priv->select_button = _tmp5_;
	_tmp6_ = self->priv->select_button;
	g_object_set ((GdHeaderButton*) _tmp6_, "symbolic-icon-name", "object-select-symbolic", NULL);
	_tmp7_ = self->priv->select_button;
	gtk_widget_set_no_show_all ((GtkWidget*) _tmp7_, TRUE);
	_tmp8_ = self->priv->select_button;
	g_object_bind_property_with_closures ((GObject*) self, "empty", (GObject*) _tmp8_, "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)));
	_tmp9_ = self->priv->select_button;
	g_signal_connect_object ((GtkButton*) _tmp9_, "clicked", (GCallback) ___lambda8__gtk_button_clicked, self, 0);
	_tmp10_ = self->priv->header_bar;
	_tmp11_ = self->priv->select_button;
	gd_header_bar_pack_end ((GdHeaderBar*) _tmp10_, (GtkWidget*) _tmp11_);
	_tmp12_ = (GdHeaderSimpleButton*) gd_header_simple_button_new ();
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->done_button);
	self->priv->done_button = _tmp12_;
	_tmp13_ = self->priv->done_button;
	_tmp14_ = _ ("Done");
	g_object_set ((GdHeaderButton*) _tmp13_, "label", _tmp14_, NULL);
	_tmp15_ = self->priv->done_button;
	gtk_widget_set_no_show_all ((GtkWidget*) _tmp15_, TRUE);
	_tmp16_ = self->priv->done_button;
	_tmp17_ = gtk_widget_get_style_context ((GtkWidget*) _tmp16_);
	gtk_style_context_add_class (_tmp17_, "suggested-action");
	_tmp18_ = self->priv->done_button;
	g_signal_connect_object ((GtkButton*) _tmp18_, "clicked", (GCallback) ___lambda9__gtk_button_clicked, self, 0);
	_tmp19_ = self->priv->header_bar;
	_tmp20_ = self->priv->done_button;
	gd_header_bar_pack_end ((GdHeaderBar*) _tmp19_, (GtkWidget*) _tmp20_);
	_tmp21_ = clocks_utils_load_ui ("menu.ui");
	builder = _tmp21_;
	_tmp22_ = gtk_builder_get_object (builder, "selection-menu");
	_tmp23_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp22_, g_menu_model_get_type ()) ? ((GMenuModel*) _tmp22_) : NULL);
	_g_object_unref0 (self->priv->selection_menu);
	self->priv->selection_menu = _tmp23_;
	_tmp24_ = (GdHeaderMenuButton*) gd_header_menu_button_new ();
	g_object_ref_sink (_tmp24_);
	_g_object_unref0 (self->priv->selection_menubutton);
	self->priv->selection_menubutton = _tmp24_;
	_tmp25_ = self->priv->selection_menubutton;
	_tmp26_ = _ ("Click on items to select them");
	g_object_set ((GdHeaderButton*) _tmp25_, "label", _tmp26_, NULL);
	_tmp27_ = self->priv->selection_menubutton;
	_tmp28_ = self->priv->selection_menu;
	gtk_menu_button_set_menu_model ((GtkMenuButton*) _tmp27_, _tmp28_);
	_tmp29_ = self->priv->selection_menubutton;
	_tmp30_ = gtk_widget_get_style_context ((GtkWidget*) _tmp29_);
	gtk_style_context_add_class (_tmp30_, "selection-menu");
	_tmp31_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp31_);
	scrolled_window = _tmp31_;
	_tmp32_ = self->priv->icon_view;
	gtk_container_add ((GtkContainer*) scrolled_window, (GtkWidget*) _tmp32_);
	_tmp33_ = (GtkOverlay*) gtk_overlay_new ();
	g_object_ref_sink (_tmp33_);
	_g_object_unref0 (self->priv->overlay);
	self->priv->overlay = _tmp33_;
	_tmp34_ = self->priv->overlay;
	gtk_container_add ((GtkContainer*) _tmp34_, (GtkWidget*) scrolled_window);
	_tmp35_ = clocks_content_view_create_selection_toolbar (self);
	_g_object_unref0 (self->priv->selection_toolbar);
	self->priv->selection_toolbar = _tmp35_;
	_tmp36_ = self->priv->overlay;
	_tmp37_ = self->priv->selection_toolbar;
	gtk_overlay_add_overlay (_tmp36_, (GtkWidget*) _tmp37_);
	_tmp38_ = self->priv->icon_view;
	_tmp39_ = gtk_icon_view_get_model ((GtkIconView*) _tmp38_);
	_tmp40_ = _g_object_ref0 (_tmp39_);
	_data7_->model = _tmp40_;
	g_signal_connect_data (_data7_->model, "row-inserted", (GCallback) ___lambda11__gtk_tree_model_row_inserted, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
	g_signal_connect_data (_data7_->model, "row-deleted", (GCallback) ___lambda12__gtk_tree_model_row_deleted, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
	_tmp41_ = self->priv->icon_view;
	g_signal_connect_object ((GObject*) _tmp41_, "notify::mode", (GCallback) ___lambda13__g_object_notify, self, 0);
	_tmp42_ = self->priv->icon_view;
	g_signal_connect_object ((GtkIconView*) _tmp42_, "selection-changed", (GCallback) ___lambda14__gtk_icon_view_selection_changed, self, 0);
	_tmp43_ = self->priv->icon_view;
	g_signal_connect_object ((GtkIconView*) _tmp43_, "item-activated", (GCallback) ___lambda16__gtk_icon_view_item_activated, self, 0);
	_tmp44_ = self->priv->empty_page;
	gtk_container_add ((GtkContainer*) self, _tmp44_);
	_g_object_unref0 (scrolled_window);
	_g_object_unref0 (builder);
	block7_data_unref (_data7_);
	_data7_ = NULL;
	return self;
}


ClocksContentView* clocks_content_view_new (GtkWidget* e, ClocksHeaderBar* b) {
	return clocks_content_view_construct (CLOCKS_TYPE_CONTENT_VIEW, e, b);
}


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


static void ___lambda10__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda10_ (self);
}


static GtkToolbar* clocks_content_view_create_selection_toolbar (ClocksContentView* self) {
	GtkToolbar* result = NULL;
	GtkToolbar* _tmp0_;
	GtkToolbar* toolbar;
	GtkStyleContext* _tmp1_ = NULL;
	GtkStyleContext* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GtkButton* _tmp4_;
	GtkButton* delete_button;
	GtkBox* _tmp5_;
	GtkBox* hbox;
	GtkToolItem* _tmp6_;
	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");
	_tmp2_ = gtk_widget_get_style_context ((GtkWidget*) toolbar);
	gtk_style_context_add_class (_tmp2_, "clocks-fade");
	gtk_widget_set_size_request ((GtkWidget*) toolbar, CLOCKS_CONTENT_VIEW_SELECTION_TOOLBAR_WIDTH, -1);
	gtk_widget_set_no_show_all ((GtkWidget*) toolbar, TRUE);
	_tmp3_ = _ ("Delete");
	_tmp4_ = (GtkButton*) gtk_button_new_with_label (_tmp3_);
	g_object_ref_sink (_tmp4_);
	delete_button = _tmp4_;
	gtk_widget_set_hexpand ((GtkWidget*) delete_button, TRUE);
	g_signal_connect_object (delete_button, "clicked", (GCallback) ___lambda10__gtk_button_clicked, self, 0);
	_tmp5_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp5_);
	hbox = _tmp5_;
	gtk_widget_set_hexpand ((GtkWidget*) hbox, TRUE);
	gtk_container_add ((GtkContainer*) hbox, (GtkWidget*) delete_button);
	_tmp6_ = gtk_tool_item_new ();
	g_object_ref_sink (_tmp6_);
	item = _tmp6_;
	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_;
		GtkOverlay* _tmp6_;
		_tmp5_ = child;
		_tmp6_ = self->priv->overlay;
		if (_tmp5_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GTK_TYPE_WIDGET, GtkWidget)) {
			GtkWidget* _tmp7_;
			GtkOverlay* _tmp8_;
			_tmp7_ = child;
			gtk_container_remove ((GtkContainer*) self, _tmp7_);
			_tmp8_ = self->priv->overlay;
			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 clocks_content_view_fade_in (ClocksContentView* self, GtkWidget* w) {
	GtkWidget* _tmp0_;
	gconstpointer _tmp1_ = NULL;
	guint timeout_id;
	guint _tmp2_;
	GtkWidget* _tmp5_;
	GtkWidget* _tmp6_;
	GtkStyleContext* _tmp7_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (w != NULL);
	_tmp0_ = w;
	_tmp1_ = g_object_get_data ((GObject*) _tmp0_, "cloks-fade-out-timeout-id");
	timeout_id = (guint) ((guintptr) _tmp1_);
	_tmp2_ = timeout_id;
	if (_tmp2_ != ((guint) 0)) {
		guint _tmp3_;
		GtkWidget* _tmp4_;
		_tmp3_ = timeout_id;
		g_source_remove (_tmp3_);
		_tmp4_ = w;
		g_object_set_data_full ((GObject*) _tmp4_, "cloks-fade-out-timeout-id", (gpointer) ((guintptr) ((guint) 0)), NULL);
	}
	_tmp5_ = w;
	gtk_widget_show (_tmp5_);
	_tmp6_ = w;
	_tmp7_ = gtk_widget_get_style_context (_tmp6_);
	gtk_style_context_add_class (_tmp7_, "clocks-fade-in");
}


static Block8Data* block8_data_ref (Block8Data* _data8_) {
	g_atomic_int_inc (&_data8_->_ref_count_);
	return _data8_;
}


static void block8_data_unref (void * _userdata_) {
	Block8Data* _data8_;
	_data8_ = (Block8Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
		ClocksContentView * self;
		self = _data8_->self;
		_g_object_unref0 (_data8_->w);
		_g_object_unref0 (self);
		g_slice_free (Block8Data, _data8_);
	}
}


static gboolean ___lambda15_ (Block8Data* _data8_) {
	ClocksContentView * self;
	gboolean result = FALSE;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	self = _data8_->self;
	_tmp0_ = _data8_->w;
	g_object_set_data_full ((GObject*) _tmp0_, "cloks-fade-out-timeout-id", (gpointer) ((guintptr) ((guint) 0)), NULL);
	_tmp1_ = _data8_->w;
	gtk_widget_hide (_tmp1_);
	result = FALSE;
	return result;
}


static gboolean ____lambda15__gsource_func (gpointer self) {
	gboolean result;
	result = ___lambda15_ (self);
	return result;
}


static void clocks_content_view_fade_out (ClocksContentView* self, GtkWidget* w) {
	Block8Data* _data8_;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	gconstpointer _tmp3_ = NULL;
	guint timeout_id;
	guint _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (w != NULL);
	_data8_ = g_slice_new0 (Block8Data);
	_data8_->_ref_count_ = 1;
	_data8_->self = g_object_ref (self);
	_tmp0_ = w;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (_data8_->w);
	_data8_->w = _tmp1_;
	_tmp2_ = _data8_->w;
	_tmp3_ = g_object_get_data ((GObject*) _tmp2_, "cloks-fade-out-timeout-id");
	timeout_id = (guint) ((guintptr) _tmp3_);
	_tmp4_ = timeout_id;
	if (_tmp4_ == ((guint) 0)) {
		GtkWidget* _tmp5_;
		GtkStyleContext* _tmp6_ = NULL;
		guint _tmp7_ = 0U;
		GtkWidget* _tmp8_;
		guint _tmp9_;
		_tmp5_ = _data8_->w;
		_tmp6_ = gtk_widget_get_style_context (_tmp5_);
		gtk_style_context_remove_class (_tmp6_, "clocks-fade-in");
		_tmp7_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 300, ____lambda15__gsource_func, block8_data_ref (_data8_), block8_data_unref);
		timeout_id = _tmp7_;
		_tmp8_ = _data8_->w;
		_tmp9_ = timeout_id;
		g_object_set_data_full ((GObject*) _tmp8_, "cloks-fade-out-timeout-id", (gpointer) ((guintptr) _tmp9_), NULL);
	}
	block8_data_unref (_data8_);
	_data8_ = NULL;
}


void clocks_content_view_add_item (ClocksContentView* self, ClocksContentItem* item) {
	ClocksIconView* _tmp0_;
	ClocksContentItem* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->icon_view;
	_tmp1_ = item;
	clocks_icon_view_add_item (_tmp0_, (GObject*) _tmp1_);
}


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);
}


GList* clocks_content_view_get_selected_items (ClocksContentView* self) {
	GList* result = NULL;
	GList* items;
	ClocksIconView* _tmp0_;
	GtkTreeModel* _tmp1_;
	GtkTreeModel* _tmp2_;
	GtkListStore* _tmp3_;
	GtkListStore* store;
	ClocksIconView* _tmp4_;
	GList* _tmp5_ = NULL;
	GList* _tmp15_;
	g_return_val_if_fail (self != NULL, NULL);
	items = NULL;
	_tmp0_ = self->priv->icon_view;
	_tmp1_ = gtk_icon_view_get_model ((GtkIconView*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GTK_TYPE_LIST_STORE, GtkListStore));
	store = _tmp3_;
	_tmp4_ = self->priv->icon_view;
	_tmp5_ = clocks_icon_view_get_selected_items (_tmp4_);
	{
		GList* path_collection = NULL;
		GList* path_it = NULL;
		path_collection = _tmp5_;
		for (path_it = path_collection; path_it != NULL; path_it = path_it->next) {
			GtkTreePath* _tmp6_;
			GtkTreePath* path = NULL;
			_tmp6_ = _gtk_tree_path_copy0 ((GtkTreePath*) path_it->data);
			path = _tmp6_;
			{
				GtkTreeIter i = {0};
				GtkListStore* _tmp7_;
				GtkTreePath* _tmp8_;
				GtkTreeIter _tmp9_ = {0};
				gboolean _tmp10_ = FALSE;
				_tmp7_ = store;
				_tmp8_ = path;
				_tmp10_ = gtk_tree_model_get_iter ((GtkTreeModel*) _tmp7_, &_tmp9_, _tmp8_);
				i = _tmp9_;
				if (_tmp10_) {
					GObject* item = NULL;
					GtkListStore* _tmp11_;
					GtkTreeIter _tmp12_;
					GObject* _tmp13_;
					GObject* _tmp14_;
					_tmp11_ = store;
					_tmp12_ = i;
					gtk_tree_model_get ((GtkTreeModel*) _tmp11_, &_tmp12_, CLOCKS_ICON_VIEW_COLUMN_ITEM, &item, -1);
					_tmp13_ = item;
					_tmp14_ = _g_object_ref0 (_tmp13_);
					items = g_list_prepend (items, _tmp14_);
					_g_object_unref0 (item);
				}
				_gtk_tree_path_free0 (path);
			}
		}
		__g_list_free__gtk_tree_path_free0_0 (path_collection);
	}
	items = g_list_reverse (items);
	_tmp15_ = items;
	items = NULL;
	result = _tmp15_;
	_g_object_unref0 (store);
	__g_list_free__g_object_unref0_0 (items);
	return result;
}


void clocks_content_view_select_all (ClocksContentView* self) {
	ClocksIconView* _tmp0_;
	ClocksIconView* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->icon_view;
	clocks_icon_view_set_mode (_tmp0_, CLOCKS_ICON_VIEW_MODE_SELECTION);
	_tmp1_ = self->priv->icon_view;
	clocks_icon_view_select_all (_tmp1_);
}


void clocks_content_view_unselect_all (ClocksContentView* self) {
	ClocksIconView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->icon_view;
	clocks_icon_view_unselect_all (_tmp0_);
}


gboolean clocks_content_view_escape_pressed (ClocksContentView* self) {
	gboolean result = FALSE;
	ClocksIconView* _tmp0_;
	ClocksIconViewMode _tmp1_;
	ClocksIconViewMode _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->icon_view;
	_tmp1_ = clocks_icon_view_get_mode (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == CLOCKS_ICON_VIEW_MODE_SELECTION) {
		ClocksIconView* _tmp3_;
		_tmp3_ = self->priv->icon_view;
		clocks_icon_view_set_mode (_tmp3_, CLOCKS_ICON_VIEW_MODE_NORMAL);
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}


void clocks_content_view_update_header_bar (ClocksContentView* self) {
	ClocksHeaderBar* _tmp0_;
	ClocksHeaderBarMode _tmp1_;
	ClocksHeaderBarMode _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->header_bar;
	_tmp1_ = clocks_header_bar_get_mode (_tmp0_);
	_tmp2_ = _tmp1_;
	switch (_tmp2_) {
		case CLOCKS_HEADER_BAR_MODE_SELECTION:
		{
			ClocksHeaderBar* _tmp3_;
			GdHeaderMenuButton* _tmp4_;
			GdHeaderSimpleButton* _tmp5_;
			_tmp3_ = self->priv->header_bar;
			_tmp4_ = self->priv->selection_menubutton;
			gd_header_bar_set_custom_title ((GdHeaderBar*) _tmp3_, (GtkWidget*) _tmp4_);
			_tmp5_ = self->priv->done_button;
			gtk_widget_show ((GtkWidget*) _tmp5_);
			break;
		}
		case CLOCKS_HEADER_BAR_MODE_NORMAL:
		{
			GdHeaderSimpleButton* _tmp6_;
			_tmp6_ = self->priv->select_button;
			gtk_widget_show ((GtkWidget*) _tmp6_);
			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_real_delete_selected (ClocksContentView* self) {
	ClocksIconView* _tmp0_;
	_tmp0_ = self->priv->icon_view;
	clocks_icon_view_remove_selected (_tmp0_);
}


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));
	CLOCKS_CONTENT_VIEW_CLASS (klass)->delete_selected = clocks_content_view_real_delete_selected;
	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 ("item_activated", CLOCKS_TYPE_CONTENT_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT);
	g_signal_new ("delete_selected", CLOCKS_TYPE_CONTENT_VIEW, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ClocksContentViewClass, delete_selected), 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->header_bar);
	_g_object_unref0 (self->priv->select_button);
	_g_object_unref0 (self->priv->done_button);
	_g_object_unref0 (self->priv->selection_menu);
	_g_object_unref0 (self->priv->selection_menubutton);
	_g_object_unref0 (self->priv->selection_toolbar);
	_g_object_unref0 (self->priv->overlay);
	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 __lambda37_ (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 ___lambda37__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda37_ (self);
}


ClocksAmPmToggleButton* clocks_am_pm_toggle_button_construct (GType object_type) {
	ClocksAmPmToggleButton * self = NULL;
	GdStack* _tmp0_;
	GtkStyleContext* _tmp1_ = NULL;
	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_ = gtk_widget_get_style_context ((GtkWidget*) self);
	gtk_style_context_add_class (_tmp1_, "clocks-ampm-toggle-button");
	_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) ___lambda37__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;
	}
}



