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

/*
 * Copyright (C) 2013  Paolo Borelli <pborelli@gnome.org>
 * Copyright (C) 2020  Bilal Elmoussaoui <bilal.elmoussaoui@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 <adwaita.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

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

typedef struct _ClocksClock ClocksClock;
typedef struct _ClocksClockIface ClocksClockIface;
typedef enum  {
	CLOCKS_PANEL_ID_WORLD,
	CLOCKS_PANEL_ID_ALARM,
	CLOCKS_PANEL_ID_STOPWATCH,
	CLOCKS_PANEL_ID_TIMER
} ClocksPanelId;

#define CLOCKS_TYPE_PANEL_ID (clocks_panel_id_get_type ())
typedef enum  {
	CLOCKS_BUTTON_MODE_NEW,
	CLOCKS_BUTTON_MODE_NONE
} ClocksButtonMode;

#define CLOCKS_TYPE_BUTTON_MODE (clocks_button_mode_get_type ())

#define CLOCKS_TIMER_TYPE_FACE (clocks_timer_face_get_type ())
#define CLOCKS_TIMER_FACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TIMER_TYPE_FACE, ClocksTimerFace))
#define CLOCKS_TIMER_FACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_TIMER_TYPE_FACE, ClocksTimerFaceClass))
#define CLOCKS_TIMER_IS_FACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TIMER_TYPE_FACE))
#define CLOCKS_TIMER_IS_FACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_TIMER_TYPE_FACE))
#define CLOCKS_TIMER_FACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_TIMER_TYPE_FACE, ClocksTimerFaceClass))

typedef struct _ClocksTimerFace ClocksTimerFace;
typedef struct _ClocksTimerFaceClass ClocksTimerFaceClass;
typedef struct _ClocksTimerFacePrivate ClocksTimerFacePrivate;

#define CLOCKS_TIMER_TYPE_SETUP (clocks_timer_setup_get_type ())
#define CLOCKS_TIMER_SETUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TIMER_TYPE_SETUP, ClocksTimerSetup))
#define CLOCKS_TIMER_SETUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_TIMER_TYPE_SETUP, ClocksTimerSetupClass))
#define CLOCKS_TIMER_IS_SETUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TIMER_TYPE_SETUP))
#define CLOCKS_TIMER_IS_SETUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_TIMER_TYPE_SETUP))
#define CLOCKS_TIMER_SETUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_TIMER_TYPE_SETUP, ClocksTimerSetupClass))

typedef struct _ClocksTimerSetup ClocksTimerSetup;
typedef struct _ClocksTimerSetupClass ClocksTimerSetupClass;

#define CLOCKS_TYPE_CONTENT_STORE (clocks_content_store_get_type ())
#define CLOCKS_CONTENT_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TYPE_CONTENT_STORE, ClocksContentStore))
#define CLOCKS_CONTENT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_TYPE_CONTENT_STORE, ClocksContentStoreClass))
#define CLOCKS_IS_CONTENT_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TYPE_CONTENT_STORE))
#define CLOCKS_IS_CONTENT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_TYPE_CONTENT_STORE))
#define CLOCKS_CONTENT_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_TYPE_CONTENT_STORE, ClocksContentStoreClass))

typedef struct _ClocksContentStore ClocksContentStore;
typedef struct _ClocksContentStoreClass ClocksContentStoreClass;

#define CLOCKS_UTILS_TYPE_BELL (clocks_utils_bell_get_type ())
#define CLOCKS_UTILS_BELL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_UTILS_TYPE_BELL, ClocksUtilsBell))
#define CLOCKS_UTILS_BELL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_UTILS_TYPE_BELL, ClocksUtilsBellClass))
#define CLOCKS_UTILS_IS_BELL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_UTILS_TYPE_BELL))
#define CLOCKS_UTILS_IS_BELL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_UTILS_TYPE_BELL))
#define CLOCKS_UTILS_BELL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_UTILS_TYPE_BELL, ClocksUtilsBellClass))

typedef struct _ClocksUtilsBell ClocksUtilsBell;
typedef struct _ClocksUtilsBellClass ClocksUtilsBellClass;
enum  {
	CLOCKS_TIMER_FACE_0_PROPERTY,
	CLOCKS_TIMER_FACE_PANEL_ID_PROPERTY,
	CLOCKS_TIMER_FACE_BUTTON_MODE_PROPERTY,
	CLOCKS_TIMER_FACE_IS_RUNNING_PROPERTY,
	CLOCKS_TIMER_FACE_NEW_LABEL_PROPERTY,
	CLOCKS_TIMER_FACE_NUM_PROPERTIES
};
static GParamSpec* clocks_timer_face_properties[CLOCKS_TIMER_FACE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block8Data Block8Data;

#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;
typedef void (*ClocksContentStoreForeachFunc) (ClocksContentItem* item, gpointer user_data);

#define CLOCKS_TIMER_TYPE_ITEM (clocks_timer_item_get_type ())
#define CLOCKS_TIMER_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TIMER_TYPE_ITEM, ClocksTimerItem))
#define CLOCKS_TIMER_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_TIMER_TYPE_ITEM, ClocksTimerItemClass))
#define CLOCKS_TIMER_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TIMER_TYPE_ITEM))
#define CLOCKS_TIMER_IS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_TIMER_TYPE_ITEM))
#define CLOCKS_TIMER_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_TIMER_TYPE_ITEM, ClocksTimerItemClass))

typedef struct _ClocksTimerItem ClocksTimerItem;
typedef struct _ClocksTimerItemClass ClocksTimerItemClass;
typedef enum  {
	CLOCKS_TIMER_ITEM_STATE_STOPPED,
	CLOCKS_TIMER_ITEM_STATE_RUNNING,
	CLOCKS_TIMER_ITEM_STATE_PAUSED
} ClocksTimerItemState;

#define CLOCKS_TIMER_ITEM_TYPE_STATE (clocks_timer_item_state_get_type ())

#define CLOCKS_TIMER_TYPE_SETUP_DIALOG (clocks_timer_setup_dialog_get_type ())
#define CLOCKS_TIMER_SETUP_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TIMER_TYPE_SETUP_DIALOG, ClocksTimerSetupDialog))
#define CLOCKS_TIMER_SETUP_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_TIMER_TYPE_SETUP_DIALOG, ClocksTimerSetupDialogClass))
#define CLOCKS_TIMER_IS_SETUP_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TIMER_TYPE_SETUP_DIALOG))
#define CLOCKS_TIMER_IS_SETUP_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_TIMER_TYPE_SETUP_DIALOG))
#define CLOCKS_TIMER_SETUP_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_TIMER_TYPE_SETUP_DIALOG, ClocksTimerSetupDialogClass))

typedef struct _ClocksTimerSetupDialog ClocksTimerSetupDialog;
typedef struct _ClocksTimerSetupDialogClass ClocksTimerSetupDialogClass;
typedef struct _ClocksTimerSetupDialogPrivate ClocksTimerSetupDialogPrivate;
typedef ClocksContentItem* (*ClocksContentStoreDeserializeItemFunc) (GVariant* v, gpointer user_data);
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
typedef struct _Block9Data Block9Data;

#define CLOCKS_TYPE_WINDOW (clocks_window_get_type ())
#define CLOCKS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TYPE_WINDOW, ClocksWindow))
#define CLOCKS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_TYPE_WINDOW, ClocksWindowClass))
#define CLOCKS_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TYPE_WINDOW))
#define CLOCKS_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_TYPE_WINDOW))
#define CLOCKS_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_TYPE_WINDOW, ClocksWindowClass))

typedef struct _ClocksWindow ClocksWindow;
typedef struct _ClocksWindowClass ClocksWindowClass;

#define CLOCKS_TYPE_APPLICATION (clocks_application_get_type ())
#define CLOCKS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TYPE_APPLICATION, ClocksApplication))
#define CLOCKS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_TYPE_APPLICATION, ClocksApplicationClass))
#define CLOCKS_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TYPE_APPLICATION))
#define CLOCKS_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_TYPE_APPLICATION))
#define CLOCKS_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_TYPE_APPLICATION, ClocksApplicationClass))

typedef struct _ClocksApplication ClocksApplication;
typedef struct _ClocksApplicationClass ClocksApplicationClass;
typedef struct _Block10Data Block10Data;

#define CLOCKS_TIMER_TYPE_ROW (clocks_timer_row_get_type ())
#define CLOCKS_TIMER_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_TIMER_TYPE_ROW, ClocksTimerRow))
#define CLOCKS_TIMER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_TIMER_TYPE_ROW, ClocksTimerRowClass))
#define CLOCKS_TIMER_IS_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_TIMER_TYPE_ROW))
#define CLOCKS_TIMER_IS_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_TIMER_TYPE_ROW))
#define CLOCKS_TIMER_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_TIMER_TYPE_ROW, ClocksTimerRowClass))

typedef struct _ClocksTimerRow ClocksTimerRow;
typedef struct _ClocksTimerRowClass ClocksTimerRowClass;
enum  {
	CLOCKS_TIMER_FACE_RING_SIGNAL,
	CLOCKS_TIMER_FACE_NUM_SIGNALS
};
static guint clocks_timer_face_signals[CLOCKS_TIMER_FACE_NUM_SIGNALS] = {0};

struct _ClocksClockIface {
	GTypeInterface parent_iface;
	void (*activate_new) (ClocksClock* self);
	gboolean (*escape_pressed) (ClocksClock* self);
	ClocksPanelId (*get_panel_id) (ClocksClock* self);
	ClocksButtonMode (*get_button_mode) (ClocksClock* self);
	void (*set_button_mode) (ClocksClock* self, ClocksButtonMode value);
	const gchar* (*get_new_label) (ClocksClock* self);
};

struct _ClocksTimerFace {
	AdwBin parent_instance;
	ClocksTimerFacePrivate * priv;
};

struct _ClocksTimerFaceClass {
	AdwBinClass parent_class;
	void (*ring) (ClocksTimerFace* self);
};

struct _ClocksTimerFacePrivate {
	ClocksTimerSetup* timer_setup;
	GtkListBox* timers_list;
	GtkButton* start_button;
	AdwViewStack* stack;
	AdwBin* timer_bin;
	ClocksButtonMode _button_mode;
	gboolean _is_running;
	gchar* _new_label;
	ClocksContentStore* timers;
	GtkSortListModel* sorted_timers;
	GSettings* settings;
	ClocksUtilsBell* bell;
	GNotification* notification;
};

struct _Block8Data {
	int _ref_count_;
	ClocksTimerFace* self;
	gint total_items;
};

struct _ClocksContentItemIface {
	GTypeInterface parent_iface;
	void (*serialize) (ClocksContentItem* self, GVariantBuilder* builder);
	const gchar* (*get_name) (ClocksContentItem* self);
	void (*set_name) (ClocksContentItem* self, const gchar* value);
};

struct _ClocksTimerSetupDialog {
	AdwDialog parent_instance;
	ClocksTimerSetupDialogPrivate * priv;
	ClocksTimerSetup* timer_setup;
};

struct _ClocksTimerSetupDialogClass {
	AdwDialogClass parent_class;
};

struct _Block9Data {
	int _ref_count_;
	ClocksTimerFace* self;
	gboolean res;
};

struct _Block10Data {
	int _ref_count_;
	ClocksTimerFace* self;
	GObject* timer;
};

static gint ClocksTimerFace_private_offset;
static gpointer clocks_timer_face_parent_class = NULL;
static ClocksClockIface * clocks_timer_face_clocks_clock_parent_iface = NULL;

VALA_EXTERN GType clocks_panel_id_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType clocks_button_mode_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType clocks_clock_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksClock, g_object_unref)
VALA_EXTERN GType clocks_timer_face_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksTimerFace, g_object_unref)
VALA_EXTERN GType clocks_timer_setup_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksTimerSetup, g_object_unref)
VALA_EXTERN GType clocks_content_store_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksContentStore, g_object_unref)
VALA_EXTERN GType clocks_utils_bell_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksUtilsBell, g_object_unref)
static gint clocks_timer_face_get_total_active_timers (ClocksTimerFace* self);
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void block8_data_unref (void * _userdata_);
VALA_EXTERN GType clocks_content_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksContentItem, g_object_unref)
VALA_EXTERN void clocks_content_store_foreach (ClocksContentStore* self,
                                   ClocksContentStoreForeachFunc func,
                                   gpointer func_target);
static void __lambda38_ (Block8Data* _data8_,
                  ClocksContentItem* timer);
VALA_EXTERN GType clocks_timer_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksTimerItem, g_object_unref)
VALA_EXTERN GType clocks_timer_item_state_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ClocksTimerItemState clocks_timer_item_get_state (ClocksTimerItem* self);
static void ___lambda38__clocks_content_store_foreach_func (ClocksContentItem* item,
                                                     gpointer self);
static void clocks_timer_face_remove_timer (ClocksTimerFace* self,
                                     ClocksTimerItem* item);
VALA_EXTERN void clocks_content_store_remove (ClocksContentStore* self,
                                  ClocksContentItem* item);
static void clocks_timer_face_real_activate_new (ClocksClock* base);
VALA_EXTERN GType clocks_timer_setup_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksTimerSetupDialog, g_object_unref)
VALA_EXTERN ClocksTimerSetupDialog* clocks_timer_setup_dialog_new (void);
VALA_EXTERN ClocksTimerSetupDialog* clocks_timer_setup_dialog_construct (GType object_type);
static void __lambda41_ (ClocksTimerFace* self,
                  ClocksTimerSetupDialog* dialog);
VALA_EXTERN ClocksTimerItem* clocks_timer_setup_get_timer (ClocksTimerSetup* self);
VALA_EXTERN void clocks_content_store_add (ClocksContentStore* self,
                               ClocksContentItem* item);
static void clocks_timer_face_connect_item (ClocksTimerFace* self,
                                     ClocksTimerItem* item);
VALA_EXTERN void clocks_timer_item_set_state (ClocksTimerItem* self,
                                  ClocksTimerItemState value);
static void ___lambda41__clocks_timer_setup_dialog_done (ClocksTimerSetupDialog* _sender,
                                                  gpointer self);
static void __lambda42_ (ClocksTimerFace* self);
static void clocks_timer_face_save (ClocksTimerFace* self);
static void ___lambda42__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void __lambda43_ (ClocksTimerFace* self);
static void ___lambda43__clocks_timer_item_ring (ClocksTimerItem* _sender,
                                          gpointer self);
static void __lambda44_ (ClocksTimerFace* self);
VALA_EXTERN void clocks_timer_face_set_is_running (ClocksTimerFace* self,
                                       gboolean value);
static void ___lambda44__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void __lambda45_ (ClocksTimerFace* self);
static void ___lambda45__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void __lambda46_ (ClocksTimerFace* self);
static void ___lambda46__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void __lambda47_ (ClocksTimerFace* self);
static void ___lambda47__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void __lambda48_ (ClocksTimerFace* self);
static void ___lambda48__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void clocks_timer_face_load (ClocksTimerFace* self);
VALA_EXTERN void clocks_content_store_deserialize (ClocksContentStore* self,
                                       GVariant* variant,
                                       ClocksContentStoreDeserializeItemFunc deserialize_item,
                                       gpointer deserialize_item_target);
VALA_EXTERN ClocksTimerItem* clocks_timer_item_deserialize (GVariant* time_variant);
static ClocksContentItem* _clocks_timer_item_deserialize_clocks_content_store_deserialize_item_func (GVariant* v,
                                                                                              gpointer self);
static void __lambda49_ (ClocksTimerFace* self,
                  ClocksContentItem* item);
static void ___lambda49__clocks_content_store_foreach_func (ClocksContentItem* item,
                                                     gpointer self);
VALA_EXTERN GVariant* clocks_content_store_serialize (ClocksContentStore* self);
static gboolean clocks_timer_face_real_grab_focus (GtkWidget* base);
static gboolean clocks_timer_face_real_escape_pressed (ClocksClock* base);
static Block9Data* block9_data_ref (Block9Data* _data9_);
static void block9_data_unref (void * _userdata_);
static void __lambda50_ (Block9Data* _data9_,
                  ClocksContentItem* item);
static void ___lambda50__clocks_content_store_foreach_func (ClocksContentItem* item,
                                                     gpointer self);
VALA_EXTERN ClocksTimerFace* clocks_timer_face_new (void);
VALA_EXTERN ClocksTimerFace* clocks_timer_face_construct (GType object_type);
VALA_EXTERN gboolean clocks_timer_face_get_is_running (ClocksTimerFace* self);
static void clocks_timer_face_real_ring (ClocksTimerFace* self);
VALA_EXTERN GType clocks_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksWindow, g_object_unref)
VALA_EXTERN GType clocks_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksApplication, g_object_unref)
VALA_EXTERN void clocks_application_send_notification (ClocksApplication* self,
                                           const gchar* notification_id,
                                           GNotification* notification);
VALA_EXTERN void clocks_utils_bell_ring_once (ClocksUtilsBell* self);
static GObject * clocks_timer_face_constructor (GType type,
                                         guint n_construct_properties,
                                         GObjectConstructParam * construct_properties);
VALA_EXTERN ClocksTimerSetup* clocks_timer_setup_new (void);
VALA_EXTERN ClocksTimerSetup* clocks_timer_setup_construct (GType object_type);
VALA_EXTERN ClocksContentStore* clocks_content_store_new (void);
VALA_EXTERN ClocksContentStore* clocks_content_store_construct (GType object_type);
static gint _clocks_timer_face___lambda51_ (ClocksTimerFace* self,
                                     gconstpointer a,
                                     gconstpointer b);
VALA_EXTERN gint clocks_timer_item_compare (ClocksTimerItem* a,
                                ClocksTimerItem* b);
static gint __clocks_timer_face___lambda51__gcompare_data_func (gconstpointer a,
                                                         gconstpointer b,
                                                         gpointer self);
static GtkWidget* _clocks_timer_face___lambda52_ (ClocksTimerFace* self,
                                           GObject* timer);
static Block10Data* block10_data_ref (Block10Data* _data10_);
static void block10_data_unref (void * _userdata_);
VALA_EXTERN GType clocks_timer_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksTimerRow, g_object_unref)
VALA_EXTERN ClocksTimerRow* clocks_timer_row_new (ClocksTimerItem* item);
VALA_EXTERN ClocksTimerRow* clocks_timer_row_construct (GType object_type,
                                            ClocksTimerItem* item);
static void __lambda54_ (Block10Data* _data10_);
static void ___lambda54__clocks_timer_row_deleted (ClocksTimerRow* _sender,
                                            gpointer self);
static GtkWidget* __clocks_timer_face___lambda52__gtk_list_box_create_widget_func (GObject* item,
                                                                            gpointer self);
static void _clocks_timer_face___lambda55_ (ClocksTimerFace* self,
                                     guint added,
                                     guint removed,
                                     guint position);
VALA_EXTERN void clocks_clock_set_button_mode (ClocksClock* self,
                                   ClocksButtonMode value);
static void __clocks_timer_face___lambda55__g_list_model_items_changed (GListModel* _sender,
                                                                 guint position,
                                                                 guint removed,
                                                                 guint added,
                                                                 gpointer self);
VALA_EXTERN ClocksUtilsBell* clocks_utils_bell_new (GFile* sound);
VALA_EXTERN ClocksUtilsBell* clocks_utils_bell_construct (GType object_type,
                                              GFile* sound);
static void _clocks_timer_face___lambda56_ (ClocksTimerFace* self,
                                     gint duration);
static void __clocks_timer_face___lambda56__clocks_timer_setup_duration_changed (ClocksTimerSetup* _sender,
                                                                          gint seconds,
                                                                          gpointer self);
static void _clocks_timer_face___lambda57_ (ClocksTimerFace* self);
static void __clocks_timer_face___lambda57__clocks_timer_setup_start_timer (ClocksTimerSetup* _sender,
                                                                     gpointer self);
static void _clocks_timer_face___lambda58_ (ClocksTimerFace* self);
static void __clocks_timer_face___lambda58__gtk_button_clicked (GtkButton* _sender,
                                                         gpointer self);
VALA_EXTERN void clocks_clock_activate_new (ClocksClock* self);
VALA_EXTERN gboolean clocks_clock_escape_pressed (ClocksClock* self);
VALA_EXTERN ClocksPanelId clocks_clock_get_panel_id (ClocksClock* self);
VALA_EXTERN ClocksButtonMode clocks_clock_get_button_mode (ClocksClock* self);
VALA_EXTERN const gchar* clocks_clock_get_new_label (ClocksClock* self);
static void clocks_timer_face_finalize (GObject * obj);
static GType clocks_timer_face_get_type_once (void);
static void _vala_clocks_timer_face_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec);
static void _vala_clocks_timer_face_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec);

static inline gpointer
clocks_timer_face_get_instance_private (ClocksTimerFace* self)
{
	return G_STRUCT_MEMBER_P (self, ClocksTimerFace_private_offset);
}

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_)) {
		ClocksTimerFace* self;
		self = _data8_->self;
		_g_object_unref0 (self);
		g_slice_free (Block8Data, _data8_);
	}
}

static void
__lambda38_ (Block8Data* _data8_,
             ClocksContentItem* timer)
{
	ClocksTimerFace* self;
	ClocksTimerItemState _tmp0_;
	ClocksTimerItemState _tmp1_;
	self = _data8_->self;
	g_return_if_fail (timer != NULL);
	_tmp0_ = clocks_timer_item_get_state (G_TYPE_CHECK_INSTANCE_CAST (timer, CLOCKS_TIMER_TYPE_ITEM, ClocksTimerItem));
	_tmp1_ = _tmp0_;
	if (_tmp1_ == CLOCKS_TIMER_ITEM_STATE_RUNNING) {
		_data8_->total_items += 1;
	}
}

static void
___lambda38__clocks_content_store_foreach_func (ClocksContentItem* item,
                                                gpointer self)
{
	__lambda38_ (self, item);
}

static gint
clocks_timer_face_get_total_active_timers (ClocksTimerFace* self)
{
	Block8Data* _data8_;
	ClocksContentStore* _tmp0_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	_data8_ = g_slice_new0 (Block8Data);
	_data8_->_ref_count_ = 1;
	_data8_->self = g_object_ref (self);
	_data8_->total_items = 0;
	_tmp0_ = self->priv->timers;
	clocks_content_store_foreach (_tmp0_, ___lambda38__clocks_content_store_foreach_func, _data8_);
	result = _data8_->total_items;
	block8_data_unref (_data8_);
	_data8_ = NULL;
	return result;
}

static void
clocks_timer_face_remove_timer (ClocksTimerFace* self,
                                ClocksTimerItem* item)
{
	ClocksContentStore* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->timers;
	clocks_content_store_remove (_tmp0_, (ClocksContentItem*) item);
}

static void
__lambda41_ (ClocksTimerFace* self,
             ClocksTimerSetupDialog* dialog)
{
	ClocksTimerItem* timer = NULL;
	ClocksTimerSetup* _tmp0_;
	ClocksTimerItem* _tmp1_;
	ClocksContentStore* _tmp2_;
	g_return_if_fail (dialog != NULL);
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (dialog, CLOCKS_TIMER_TYPE_SETUP_DIALOG, ClocksTimerSetupDialog)->timer_setup;
	_tmp1_ = clocks_timer_setup_get_timer (_tmp0_);
	timer = _tmp1_;
	_tmp2_ = self->priv->timers;
	clocks_content_store_add (_tmp2_, (ClocksContentItem*) timer);
	clocks_timer_face_connect_item (self, timer);
	clocks_timer_item_set_state (timer, CLOCKS_TIMER_ITEM_STATE_RUNNING);
	adw_dialog_close ((AdwDialog*) dialog);
	_g_object_unref0 (timer);
}

static void
___lambda41__clocks_timer_setup_dialog_done (ClocksTimerSetupDialog* _sender,
                                             gpointer self)
{
	__lambda41_ ((ClocksTimerFace*) self, _sender);
}

static void
clocks_timer_face_real_activate_new (ClocksClock* base)
{
	ClocksTimerFace * self;
	ClocksTimerSetupDialog* dialog = NULL;
	ClocksTimerSetupDialog* _tmp0_;
	self = (ClocksTimerFace*) base;
	_tmp0_ = clocks_timer_setup_dialog_new ();
	g_object_ref_sink (_tmp0_);
	dialog = _tmp0_;
	g_signal_connect_object (dialog, "done", (GCallback) ___lambda41__clocks_timer_setup_dialog_done, self, 0);
	adw_dialog_present ((AdwDialog*) dialog, (GtkWidget*) self);
	_g_object_unref0 (dialog);
}

static void
__lambda42_ (ClocksTimerFace* self)
{
	clocks_timer_face_save (self);
}

static void
___lambda42__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	__lambda42_ ((ClocksTimerFace*) self);
}

static void
__lambda43_ (ClocksTimerFace* self)
{
	g_signal_emit (self, clocks_timer_face_signals[CLOCKS_TIMER_FACE_RING_SIGNAL], 0);
}

static void
___lambda43__clocks_timer_item_ring (ClocksTimerItem* _sender,
                                     gpointer self)
{
	__lambda43_ ((ClocksTimerFace*) self);
}

static void
__lambda44_ (ClocksTimerFace* self)
{
	clocks_timer_face_set_is_running (self, clocks_timer_face_get_total_active_timers (self) != 0);
}

static void
___lambda44__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	__lambda44_ ((ClocksTimerFace*) self);
}

static void
__lambda45_ (ClocksTimerFace* self)
{
	GtkSortListModel* _tmp0_;
	GtkSorter* _tmp1_;
	GtkSorter* _tmp2_;
	_tmp0_ = self->priv->sorted_timers;
	_tmp1_ = gtk_sort_list_model_get_sorter (_tmp0_);
	_tmp2_ = _tmp1_;
	gtk_sorter_changed (_tmp2_, GTK_SORTER_CHANGE_DIFFERENT);
}

static void
___lambda45__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	__lambda45_ ((ClocksTimerFace*) self);
}

static void
__lambda46_ (ClocksTimerFace* self)
{
	GtkSortListModel* _tmp0_;
	GtkSorter* _tmp1_;
	GtkSorter* _tmp2_;
	_tmp0_ = self->priv->sorted_timers;
	_tmp1_ = gtk_sort_list_model_get_sorter (_tmp0_);
	_tmp2_ = _tmp1_;
	gtk_sorter_changed (_tmp2_, GTK_SORTER_CHANGE_DIFFERENT);
}

static void
___lambda46__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	__lambda46_ ((ClocksTimerFace*) self);
}

static void
__lambda47_ (ClocksTimerFace* self)
{
	GtkSortListModel* _tmp0_;
	GtkSorter* _tmp1_;
	GtkSorter* _tmp2_;
	_tmp0_ = self->priv->sorted_timers;
	_tmp1_ = gtk_sort_list_model_get_sorter (_tmp0_);
	_tmp2_ = _tmp1_;
	gtk_sorter_changed (_tmp2_, GTK_SORTER_CHANGE_DIFFERENT);
}

static void
___lambda47__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	__lambda47_ ((ClocksTimerFace*) self);
}

static void
__lambda48_ (ClocksTimerFace* self)
{
	GtkSortListModel* _tmp0_;
	GtkSorter* _tmp1_;
	GtkSorter* _tmp2_;
	_tmp0_ = self->priv->sorted_timers;
	_tmp1_ = gtk_sort_list_model_get_sorter (_tmp0_);
	_tmp2_ = _tmp1_;
	gtk_sorter_changed (_tmp2_, GTK_SORTER_CHANGE_DIFFERENT);
}

static void
___lambda48__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	__lambda48_ ((ClocksTimerFace*) self);
}

static void
clocks_timer_face_connect_item (ClocksTimerFace* self,
                                ClocksTimerItem* item)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	g_signal_connect_object ((GObject*) item, "notify::name", (GCallback) ___lambda42__g_object_notify, self, 0);
	g_signal_connect_object (item, "ring", (GCallback) ___lambda43__clocks_timer_item_ring, self, 0);
	g_signal_connect_object ((GObject*) item, "notify::state", (GCallback) ___lambda44__g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) item, "notify::hours", (GCallback) ___lambda45__g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) item, "notify::minutes", (GCallback) ___lambda46__g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) item, "notify::seconds", (GCallback) ___lambda47__g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) item, "notify::state", (GCallback) ___lambda48__g_object_notify, self, 0);
}

static ClocksContentItem*
_clocks_timer_item_deserialize_clocks_content_store_deserialize_item_func (GVariant* v,
                                                                           gpointer self)
{
	ClocksContentItem* result;
	result = clocks_timer_item_deserialize (v);
	return result;
}

static void
__lambda49_ (ClocksTimerFace* self,
             ClocksContentItem* item)
{
	g_return_if_fail (item != NULL);
	clocks_timer_face_connect_item (self, G_TYPE_CHECK_INSTANCE_CAST (item, CLOCKS_TIMER_TYPE_ITEM, ClocksTimerItem));
}

static void
___lambda49__clocks_content_store_foreach_func (ClocksContentItem* item,
                                                gpointer self)
{
	__lambda49_ ((ClocksTimerFace*) self, item);
}

static void
clocks_timer_face_load (ClocksTimerFace* self)
{
	ClocksContentStore* _tmp0_;
	GSettings* _tmp1_;
	GVariant* _tmp2_;
	GVariant* _tmp3_;
	ClocksContentStore* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->timers;
	_tmp1_ = self->priv->settings;
	_tmp2_ = g_settings_get_value (_tmp1_, "timers");
	_tmp3_ = _tmp2_;
	clocks_content_store_deserialize (_tmp0_, _tmp3_, _clocks_timer_item_deserialize_clocks_content_store_deserialize_item_func, NULL);
	_g_variant_unref0 (_tmp3_);
	_tmp4_ = self->priv->timers;
	clocks_content_store_foreach (_tmp4_, ___lambda49__clocks_content_store_foreach_func, self);
}

static void
clocks_timer_face_save (ClocksTimerFace* self)
{
	GSettings* _tmp0_;
	ClocksContentStore* _tmp1_;
	GVariant* _tmp2_;
	GVariant* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->settings;
	_tmp1_ = self->priv->timers;
	_tmp2_ = clocks_content_store_serialize (_tmp1_);
	_tmp3_ = _tmp2_;
	g_settings_set_value (_tmp0_, "timers", _tmp3_);
	_g_variant_unref0 (_tmp3_);
}

static gboolean
clocks_timer_face_real_grab_focus (GtkWidget* base)
{
	ClocksTimerFace * self;
	ClocksContentStore* _tmp0_;
	gboolean result;
	self = (ClocksTimerFace*) base;
	_tmp0_ = self->priv->timers;
	if (g_list_model_get_n_items ((GListModel*) _tmp0_) == ((guint) 0)) {
		GtkButton* _tmp1_;
		_tmp1_ = self->priv->start_button;
		gtk_widget_grab_focus ((GtkWidget*) _tmp1_);
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}

static Block9Data*
block9_data_ref (Block9Data* _data9_)
{
	g_atomic_int_inc (&_data9_->_ref_count_);
	return _data9_;
}

static void
block9_data_unref (void * _userdata_)
{
	Block9Data* _data9_;
	_data9_ = (Block9Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) {
		ClocksTimerFace* self;
		self = _data9_->self;
		_g_object_unref0 (self);
		g_slice_free (Block9Data, _data9_);
	}
}

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

static void
__lambda50_ (Block9Data* _data9_,
             ClocksContentItem* item)
{
	ClocksTimerFace* self;
	ClocksTimerItem* timer = NULL;
	ClocksTimerItem* _tmp0_;
	ClocksTimerItem* _tmp1_;
	ClocksTimerItemState _tmp2_;
	ClocksTimerItemState _tmp3_;
	self = _data9_->self;
	g_return_if_fail (item != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (item, CLOCKS_TIMER_TYPE_ITEM, ClocksTimerItem));
	timer = _tmp0_;
	_tmp1_ = timer;
	_tmp2_ = clocks_timer_item_get_state (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == CLOCKS_TIMER_ITEM_STATE_RUNNING) {
		ClocksTimerItem* _tmp4_;
		_tmp4_ = timer;
		clocks_timer_item_set_state (_tmp4_, CLOCKS_TIMER_ITEM_STATE_PAUSED);
		_data9_->res = TRUE;
	}
	_g_object_unref0 (timer);
}

static void
___lambda50__clocks_content_store_foreach_func (ClocksContentItem* item,
                                                gpointer self)
{
	__lambda50_ (self, item);
}

static gboolean
clocks_timer_face_real_escape_pressed (ClocksClock* base)
{
	ClocksTimerFace * self;
	Block9Data* _data9_;
	ClocksContentStore* _tmp0_;
	gboolean result;
	self = (ClocksTimerFace*) base;
	_data9_ = g_slice_new0 (Block9Data);
	_data9_->_ref_count_ = 1;
	_data9_->self = g_object_ref (self);
	_data9_->res = FALSE;
	_tmp0_ = self->priv->timers;
	clocks_content_store_foreach (_tmp0_, ___lambda50__clocks_content_store_foreach_func, _data9_);
	result = _data9_->res;
	block9_data_unref (_data9_);
	_data9_ = NULL;
	return result;
}

ClocksTimerFace*
clocks_timer_face_construct (GType object_type)
{
	ClocksTimerFace * self = NULL;
	self = (ClocksTimerFace*) g_object_new (object_type, NULL);
	return self;
}

ClocksTimerFace*
clocks_timer_face_new (void)
{
	return clocks_timer_face_construct (CLOCKS_TIMER_TYPE_FACE);
}

static ClocksPanelId
clocks_timer_face_real_get_panel_id (ClocksClock* base)
{
	ClocksPanelId result;
	ClocksTimerFace* self;
	self = (ClocksTimerFace*) base;
	result = CLOCKS_PANEL_ID_TIMER;
	return result;
}

static ClocksButtonMode
clocks_timer_face_real_get_button_mode (ClocksClock* base)
{
	ClocksButtonMode result;
	ClocksTimerFace* self;
	self = (ClocksTimerFace*) base;
	result = self->priv->_button_mode;
	return result;
}

static void
clocks_timer_face_real_set_button_mode (ClocksClock* base,
                                        ClocksButtonMode value)
{
	ClocksTimerFace* self;
	ClocksButtonMode old_value;
	self = (ClocksTimerFace*) base;
	old_value = clocks_timer_face_real_get_button_mode (base);
	if (old_value != value) {
		self->priv->_button_mode = value;
		g_object_notify_by_pspec ((GObject *) self, clocks_timer_face_properties[CLOCKS_TIMER_FACE_BUTTON_MODE_PROPERTY]);
	}
}

gboolean
clocks_timer_face_get_is_running (ClocksTimerFace* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_running;
	return result;
}

void
clocks_timer_face_set_is_running (ClocksTimerFace* self,
                                  gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = clocks_timer_face_get_is_running (self);
	if (old_value != value) {
		self->priv->_is_running = value;
		g_object_notify_by_pspec ((GObject *) self, clocks_timer_face_properties[CLOCKS_TIMER_FACE_IS_RUNNING_PROPERTY]);
	}
}

static const gchar*
clocks_timer_face_real_get_new_label (ClocksClock* base)
{
	const gchar* result;
	ClocksTimerFace* self;
	const gchar* _tmp0_;
	self = (ClocksTimerFace*) base;
	_tmp0_ = self->priv->_new_label;
	result = _tmp0_;
	return result;
}

static void
clocks_timer_face_real_ring (ClocksTimerFace* self)
{
	ClocksWindow* window = NULL;
	GtkRoot* _tmp0_;
	ClocksWindow* _tmp1_;
	ClocksWindow* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	ClocksUtilsBell* _tmp9_;
	_tmp0_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, CLOCKS_TYPE_WINDOW, ClocksWindow));
	window = _tmp1_;
	_tmp2_ = window;
	g_object_get ((GtkWindow*) _tmp2_, "is-active", &_tmp3_, NULL);
	_tmp4_ = _tmp3_;
	if (!_tmp4_) {
		ClocksApplication* app = NULL;
		GApplication* _tmp5_;
		ClocksApplication* _tmp6_;
		ClocksApplication* _tmp7_;
		GNotification* _tmp8_;
		_tmp5_ = g_application_get_default ();
		_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, CLOCKS_TYPE_APPLICATION, ClocksApplication));
		app = _tmp6_;
		_tmp7_ = app;
		_tmp8_ = self->priv->notification;
		clocks_application_send_notification (_tmp7_, "timer-is-up", _tmp8_);
		_g_object_unref0 (app);
	}
	_tmp9_ = self->priv->bell;
	clocks_utils_bell_ring_once (_tmp9_);
	_g_object_unref0 (window);
}

static gint
_clocks_timer_face___lambda51_ (ClocksTimerFace* self,
                                gconstpointer a,
                                gconstpointer b)
{
	gint result;
	result = clocks_timer_item_compare (G_TYPE_CHECK_INSTANCE_CAST (a, CLOCKS_TIMER_TYPE_ITEM, ClocksTimerItem), G_TYPE_CHECK_INSTANCE_CAST (b, CLOCKS_TIMER_TYPE_ITEM, ClocksTimerItem));
	return result;
}

static gint
__clocks_timer_face___lambda51__gcompare_data_func (gconstpointer a,
                                                    gconstpointer b,
                                                    gpointer self)
{
	gint result;
	result = _clocks_timer_face___lambda51_ ((ClocksTimerFace*) self, a, b);
	return result;
}

static Block10Data*
block10_data_ref (Block10Data* _data10_)
{
	g_atomic_int_inc (&_data10_->_ref_count_);
	return _data10_;
}

static void
block10_data_unref (void * _userdata_)
{
	Block10Data* _data10_;
	_data10_ = (Block10Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data10_->_ref_count_)) {
		ClocksTimerFace* self;
		self = _data10_->self;
		_g_object_unref0 (_data10_->timer);
		_g_object_unref0 (self);
		g_slice_free (Block10Data, _data10_);
	}
}

static void
__lambda54_ (Block10Data* _data10_)
{
	ClocksTimerFace* self;
	self = _data10_->self;
	clocks_timer_face_remove_timer (self, G_TYPE_CHECK_INSTANCE_CAST (_data10_->timer, CLOCKS_TIMER_TYPE_ITEM, ClocksTimerItem));
}

static void
___lambda54__clocks_timer_row_deleted (ClocksTimerRow* _sender,
                                       gpointer self)
{
	__lambda54_ (self);
}

static GtkWidget*
_clocks_timer_face___lambda52_ (ClocksTimerFace* self,
                                GObject* timer)
{
	Block10Data* _data10_;
	GObject* _tmp0_;
	ClocksTimerRow* row = NULL;
	ClocksTimerRow* _tmp1_;
	ClocksTimerRow* _tmp2_;
	GtkWidget* result;
	g_return_val_if_fail (timer != NULL, NULL);
	_data10_ = g_slice_new0 (Block10Data);
	_data10_->_ref_count_ = 1;
	_data10_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (timer);
	_g_object_unref0 (_data10_->timer);
	_data10_->timer = _tmp0_;
	_tmp1_ = clocks_timer_row_new (G_TYPE_CHECK_INSTANCE_CAST (_data10_->timer, CLOCKS_TIMER_TYPE_ITEM, ClocksTimerItem));
	g_object_ref_sink (_tmp1_);
	row = _tmp1_;
	_tmp2_ = row;
	g_signal_connect_data (_tmp2_, "deleted", (GCallback) ___lambda54__clocks_timer_row_deleted, block10_data_ref (_data10_), (GClosureNotify) block10_data_unref, 0);
	result = (GtkWidget*) row;
	block10_data_unref (_data10_);
	_data10_ = NULL;
	return result;
}

static GtkWidget*
__clocks_timer_face___lambda52__gtk_list_box_create_widget_func (GObject* item,
                                                                 gpointer self)
{
	GtkWidget* result;
	result = _clocks_timer_face___lambda52_ ((ClocksTimerFace*) self, item);
	return result;
}

static void
_clocks_timer_face___lambda55_ (ClocksTimerFace* self,
                                guint added,
                                guint removed,
                                guint position)
{
	ClocksContentStore* _tmp0_;
	_tmp0_ = self->priv->timers;
	if (g_list_model_get_n_items ((GListModel*) _tmp0_) > ((guint) 0)) {
		AdwViewStack* _tmp1_;
		_tmp1_ = self->priv->stack;
		adw_view_stack_set_visible_child_name (_tmp1_, "timers");
		clocks_clock_set_button_mode ((ClocksClock*) self, CLOCKS_BUTTON_MODE_NEW);
	} else {
		AdwViewStack* _tmp2_;
		_tmp2_ = self->priv->stack;
		adw_view_stack_set_visible_child_name (_tmp2_, "empty");
		clocks_clock_set_button_mode ((ClocksClock*) self, CLOCKS_BUTTON_MODE_NONE);
	}
	clocks_timer_face_save (self);
	clocks_timer_face_set_is_running (self, clocks_timer_face_get_total_active_timers (self) != 0);
}

static void
__clocks_timer_face___lambda55__g_list_model_items_changed (GListModel* _sender,
                                                            guint position,
                                                            guint removed,
                                                            guint added,
                                                            gpointer self)
{
	_clocks_timer_face___lambda55_ ((ClocksTimerFace*) self, position, removed, added);
}

static void
_clocks_timer_face___lambda56_ (ClocksTimerFace* self,
                                gint duration)
{
	GtkButton* _tmp0_;
	_tmp0_ = self->priv->start_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, duration != 0);
}

static void
__clocks_timer_face___lambda56__clocks_timer_setup_duration_changed (ClocksTimerSetup* _sender,
                                                                     gint seconds,
                                                                     gpointer self)
{
	_clocks_timer_face___lambda56_ ((ClocksTimerFace*) self, seconds);
}

static void
_clocks_timer_face___lambda57_ (ClocksTimerFace* self)
{
	ClocksTimerItem* timer = NULL;
	ClocksTimerSetup* _tmp0_;
	ClocksTimerItem* _tmp1_;
	ClocksContentStore* _tmp2_;
	ClocksTimerItem* _tmp3_;
	ClocksTimerItem* _tmp4_;
	ClocksTimerItem* _tmp5_;
	_tmp0_ = self->priv->timer_setup;
	_tmp1_ = clocks_timer_setup_get_timer (_tmp0_);
	timer = _tmp1_;
	_tmp2_ = self->priv->timers;
	_tmp3_ = timer;
	clocks_content_store_add (_tmp2_, (ClocksContentItem*) _tmp3_);
	_tmp4_ = timer;
	clocks_timer_face_connect_item (self, _tmp4_);
	_tmp5_ = timer;
	clocks_timer_item_set_state (_tmp5_, CLOCKS_TIMER_ITEM_STATE_RUNNING);
	_g_object_unref0 (timer);
}

static void
__clocks_timer_face___lambda57__clocks_timer_setup_start_timer (ClocksTimerSetup* _sender,
                                                                gpointer self)
{
	_clocks_timer_face___lambda57_ ((ClocksTimerFace*) self);
}

static void
_clocks_timer_face___lambda58_ (ClocksTimerFace* self)
{
	ClocksTimerItem* timer = NULL;
	ClocksTimerSetup* _tmp0_;
	ClocksTimerItem* _tmp1_;
	ClocksContentStore* _tmp2_;
	ClocksTimerItem* _tmp3_;
	ClocksTimerItem* _tmp4_;
	ClocksTimerItem* _tmp5_;
	_tmp0_ = self->priv->timer_setup;
	_tmp1_ = clocks_timer_setup_get_timer (_tmp0_);
	timer = _tmp1_;
	_tmp2_ = self->priv->timers;
	_tmp3_ = timer;
	clocks_content_store_add (_tmp2_, (ClocksContentItem*) _tmp3_);
	_tmp4_ = timer;
	clocks_timer_face_connect_item (self, _tmp4_);
	_tmp5_ = timer;
	clocks_timer_item_set_state (_tmp5_, CLOCKS_TIMER_ITEM_STATE_RUNNING);
	_g_object_unref0 (timer);
}

static void
__clocks_timer_face___lambda58__gtk_button_clicked (GtkButton* _sender,
                                                    gpointer self)
{
	_clocks_timer_face___lambda58_ ((ClocksTimerFace*) self);
}

static GObject *
clocks_timer_face_constructor (GType type,
                               guint n_construct_properties,
                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ClocksTimerFace * self;
	ClocksTimerSetup* _tmp0_;
	GSettings* _tmp1_;
	ClocksContentStore* _tmp2_;
	ClocksContentStore* _tmp3_;
	GListModel* _tmp4_;
	GtkCustomSorter* _tmp5_;
	GtkSortListModel* _tmp6_;
	GtkListBox* _tmp7_;
	GtkSortListModel* _tmp8_;
	ClocksContentStore* _tmp9_;
	GFile* _tmp10_;
	GFile* _tmp11_;
	ClocksUtilsBell* _tmp12_;
	GNotification* _tmp13_;
	GNotification* _tmp14_;
	GNotification* _tmp15_;
	AdwBin* _tmp16_;
	ClocksTimerSetup* _tmp17_;
	AdwViewStack* _tmp18_;
	GtkButton* _tmp19_;
	ClocksTimerSetup* _tmp20_;
	ClocksTimerSetup* _tmp21_;
	GtkButton* _tmp22_;
	parent_class = G_OBJECT_CLASS (clocks_timer_face_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLOCKS_TIMER_TYPE_FACE, ClocksTimerFace);
	_tmp0_ = clocks_timer_setup_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->timer_setup);
	self->priv->timer_setup = _tmp0_;
	_tmp1_ = g_settings_new ("org.gnome.clocks");
	_g_object_unref0 (self->priv->settings);
	self->priv->settings = _tmp1_;
	_tmp2_ = clocks_content_store_new ();
	_g_object_unref0 (self->priv->timers);
	self->priv->timers = _tmp2_;
	_tmp3_ = self->priv->timers;
	_tmp4_ = _g_object_ref0 ((GListModel*) _tmp3_);
	_tmp5_ = gtk_custom_sorter_new (__clocks_timer_face___lambda51__gcompare_data_func, g_object_ref (self), g_object_unref);
	_tmp6_ = gtk_sort_list_model_new (_tmp4_, (GtkSorter*) _tmp5_);
	_g_object_unref0 (self->priv->sorted_timers);
	self->priv->sorted_timers = _tmp6_;
	_tmp7_ = self->priv->timers_list;
	_tmp8_ = self->priv->sorted_timers;
	gtk_list_box_bind_model (_tmp7_, (GListModel*) _tmp8_, __clocks_timer_face___lambda52__gtk_list_box_create_widget_func, g_object_ref (self), g_object_unref);
	_tmp9_ = self->priv->timers;
	g_signal_connect_object ((GListModel*) _tmp9_, "items-changed", (GCallback) __clocks_timer_face___lambda55__g_list_model_items_changed, self, 0);
	_tmp10_ = g_file_new_for_uri ("resource:///org/gnome/clocks/sounds/complete.oga");
	_tmp11_ = _tmp10_;
	_tmp12_ = clocks_utils_bell_new (_tmp11_);
	_g_object_unref0 (self->priv->bell);
	self->priv->bell = _tmp12_;
	_g_object_unref0 (_tmp11_);
	_tmp13_ = g_notification_new (_ ("Time is up!"));
	_g_object_unref0 (self->priv->notification);
	self->priv->notification = _tmp13_;
	_tmp14_ = self->priv->notification;
	g_notification_set_body (_tmp14_, _ ("Timer countdown finished"));
	_tmp15_ = self->priv->notification;
	g_notification_set_priority (_tmp15_, G_NOTIFICATION_PRIORITY_HIGH);
	_tmp16_ = self->priv->timer_bin;
	_tmp17_ = self->priv->timer_setup;
	adw_bin_set_child (_tmp16_, (GtkWidget*) _tmp17_);
	_tmp18_ = self->priv->stack;
	adw_view_stack_set_visible_child_name (_tmp18_, "empty");
	_tmp19_ = self->priv->start_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp19_, FALSE);
	_tmp20_ = self->priv->timer_setup;
	g_signal_connect_object (_tmp20_, "duration-changed", (GCallback) __clocks_timer_face___lambda56__clocks_timer_setup_duration_changed, self, 0);
	_tmp21_ = self->priv->timer_setup;
	g_signal_connect_object (_tmp21_, "start-timer", (GCallback) __clocks_timer_face___lambda57__clocks_timer_setup_start_timer, self, 0);
	_tmp22_ = self->priv->start_button;
	g_signal_connect_object (_tmp22_, "clicked", (GCallback) __clocks_timer_face___lambda58__gtk_button_clicked, self, 0);
	clocks_timer_face_load (self);
	return obj;
}

static void
clocks_timer_face_class_init (ClocksTimerFaceClass * klass,
                              gpointer klass_data)
{
	clocks_timer_face_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ClocksTimerFace_private_offset);
	((GtkWidgetClass *) klass)->grab_focus = (gboolean (*) (GtkWidget*)) clocks_timer_face_real_grab_focus;
	((ClocksTimerFaceClass *) klass)->ring = clocks_timer_face_real_ring;
	G_OBJECT_CLASS (klass)->get_property = _vala_clocks_timer_face_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_clocks_timer_face_set_property;
	G_OBJECT_CLASS (klass)->constructor = clocks_timer_face_constructor;
	G_OBJECT_CLASS (klass)->finalize = clocks_timer_face_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_TIMER_FACE_PANEL_ID_PROPERTY, clocks_timer_face_properties[CLOCKS_TIMER_FACE_PANEL_ID_PROPERTY] = g_param_spec_enum ("panel-id", "panel-id", "panel-id", CLOCKS_TYPE_PANEL_ID, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_TIMER_FACE_BUTTON_MODE_PROPERTY, clocks_timer_face_properties[CLOCKS_TIMER_FACE_BUTTON_MODE_PROPERTY] = g_param_spec_enum ("button-mode", "button-mode", "button-mode", CLOCKS_TYPE_BUTTON_MODE, CLOCKS_BUTTON_MODE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_TIMER_FACE_IS_RUNNING_PROPERTY, clocks_timer_face_properties[CLOCKS_TIMER_FACE_IS_RUNNING_PROPERTY] = g_param_spec_boolean ("is-running", "is-running", "is-running", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CLOCKS_TIMER_FACE_NEW_LABEL_PROPERTY, clocks_timer_face_properties[CLOCKS_TIMER_FACE_NEW_LABEL_PROPERTY] = g_param_spec_string ("new-label", "new-label", "new-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/clocks/ui/timer-face.ui");
	clocks_timer_face_signals[CLOCKS_TIMER_FACE_RING_SIGNAL] = g_signal_new ("ring", CLOCKS_TIMER_TYPE_FACE, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ClocksTimerFaceClass, ring), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "timers_list", FALSE, ClocksTimerFace_private_offset + G_STRUCT_OFFSET (ClocksTimerFacePrivate, timers_list));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "start_button", FALSE, ClocksTimerFace_private_offset + G_STRUCT_OFFSET (ClocksTimerFacePrivate, start_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stack", FALSE, ClocksTimerFace_private_offset + G_STRUCT_OFFSET (ClocksTimerFacePrivate, stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "timer_bin", FALSE, ClocksTimerFace_private_offset + G_STRUCT_OFFSET (ClocksTimerFacePrivate, timer_bin));
}

static void
clocks_timer_face_clocks_clock_interface_init (ClocksClockIface * iface,
                                               gpointer iface_data)
{
	clocks_timer_face_clocks_clock_parent_iface = g_type_interface_peek_parent (iface);
	iface->activate_new = (void (*) (ClocksClock*)) clocks_timer_face_real_activate_new;
	iface->escape_pressed = (gboolean (*) (ClocksClock*)) clocks_timer_face_real_escape_pressed;
	iface->get_panel_id = clocks_timer_face_real_get_panel_id;
	iface->get_button_mode = clocks_timer_face_real_get_button_mode;
	iface->set_button_mode = clocks_timer_face_real_set_button_mode;
	iface->get_new_label = clocks_timer_face_real_get_new_label;
}

static void
clocks_timer_face_instance_init (ClocksTimerFace * self,
                                 gpointer klass)
{
	gchar* _tmp0_;
	self->priv = clocks_timer_face_get_instance_private (self);
	self->priv->_button_mode = CLOCKS_BUTTON_MODE_NONE;
	self->priv->_is_running = FALSE;
	_tmp0_ = g_strdup (_ ("New Timer"));
	self->priv->_new_label = _tmp0_;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
clocks_timer_face_finalize (GObject * obj)
{
	ClocksTimerFace * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLOCKS_TIMER_TYPE_FACE, ClocksTimerFace);
	_g_object_unref0 (self->priv->timer_setup);
	_g_free0 (self->priv->_new_label);
	_g_object_unref0 (self->priv->timers);
	_g_object_unref0 (self->priv->sorted_timers);
	_g_object_unref0 (self->priv->settings);
	_g_object_unref0 (self->priv->bell);
	_g_object_unref0 (self->priv->notification);
	G_OBJECT_CLASS (clocks_timer_face_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
clocks_timer_face_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ClocksTimerFaceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clocks_timer_face_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ClocksTimerFace), 0, (GInstanceInitFunc) clocks_timer_face_instance_init, NULL };
	static const GInterfaceInfo clocks_clock_info = { (GInterfaceInitFunc) clocks_timer_face_clocks_clock_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType clocks_timer_face_type_id;
	clocks_timer_face_type_id = g_type_register_static (adw_bin_get_type (), "ClocksTimerFace", &g_define_type_info, 0);
	g_type_add_interface_static (clocks_timer_face_type_id, CLOCKS_TYPE_CLOCK, &clocks_clock_info);
	ClocksTimerFace_private_offset = g_type_add_instance_private (clocks_timer_face_type_id, sizeof (ClocksTimerFacePrivate));
	return clocks_timer_face_type_id;
}

GType
clocks_timer_face_get_type (void)
{
	static gsize clocks_timer_face_type_id__once = 0;
	if (g_once_init_enter (&clocks_timer_face_type_id__once)) {
		GType clocks_timer_face_type_id;
		clocks_timer_face_type_id = clocks_timer_face_get_type_once ();
		g_once_init_leave (&clocks_timer_face_type_id__once, clocks_timer_face_type_id);
	}
	return clocks_timer_face_type_id__once;
}

static void
_vala_clocks_timer_face_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec)
{
	ClocksTimerFace * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_TIMER_TYPE_FACE, ClocksTimerFace);
	switch (property_id) {
		case CLOCKS_TIMER_FACE_PANEL_ID_PROPERTY:
		g_value_set_enum (value, clocks_clock_get_panel_id ((ClocksClock*) self));
		break;
		case CLOCKS_TIMER_FACE_BUTTON_MODE_PROPERTY:
		g_value_set_enum (value, clocks_clock_get_button_mode ((ClocksClock*) self));
		break;
		case CLOCKS_TIMER_FACE_IS_RUNNING_PROPERTY:
		g_value_set_boolean (value, clocks_timer_face_get_is_running (self));
		break;
		case CLOCKS_TIMER_FACE_NEW_LABEL_PROPERTY:
		g_value_set_string (value, clocks_clock_get_new_label ((ClocksClock*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_clocks_timer_face_set_property (GObject * object,
                                      guint property_id,
                                      const GValue * value,
                                      GParamSpec * pspec)
{
	ClocksTimerFace * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CLOCKS_TIMER_TYPE_FACE, ClocksTimerFace);
	switch (property_id) {
		case CLOCKS_TIMER_FACE_BUTTON_MODE_PROPERTY:
		clocks_clock_set_button_mode ((ClocksClock*) self, g_value_get_enum (value));
		break;
		case CLOCKS_TIMER_FACE_IS_RUNNING_PROPERTY:
		clocks_timer_face_set_is_running (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

