/* clock.c generated by valac 0.56.3, the Vala compiler
 * generated from clock.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-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>

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

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 ())

#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_BUTTON_MODE_NEW,
	CLOCKS_BUTTON_MODE_NONE
} ClocksButtonMode;

#define CLOCKS_TYPE_BUTTON_MODE (clocks_button_mode_get_type ())

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

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 void clocks_clock_activate_new (ClocksClock* self);
static void clocks_clock_real_activate_new (ClocksClock* self);
VALA_EXTERN gboolean clocks_clock_escape_pressed (ClocksClock* self);
static gboolean clocks_clock_real_escape_pressed (ClocksClock* self);
VALA_EXTERN ClocksPanelId clocks_clock_get_panel_id (ClocksClock* self);
VALA_EXTERN void clocks_clock_set_panel_id (ClocksClock* self,
                                ClocksPanelId value);
VALA_EXTERN ClocksButtonMode clocks_clock_get_button_mode (ClocksClock* self);
VALA_EXTERN void clocks_clock_set_button_mode (ClocksClock* self,
                                   ClocksButtonMode value);
VALA_EXTERN const gchar* clocks_clock_get_new_label (ClocksClock* self);
static GType clocks_clock_get_type_once (void);

 G_GNUC_NO_INLINE static GType
clocks_panel_id_get_type_once (void)
{
	static const GEnumValue values[] = {{CLOCKS_PANEL_ID_WORLD, "CLOCKS_PANEL_ID_WORLD", "world"}, {CLOCKS_PANEL_ID_ALARM, "CLOCKS_PANEL_ID_ALARM", "alarm"}, {CLOCKS_PANEL_ID_STOPWATCH, "CLOCKS_PANEL_ID_STOPWATCH", "stopwatch"}, {CLOCKS_PANEL_ID_TIMER, "CLOCKS_PANEL_ID_TIMER", "timer"}, {0, NULL, NULL}};
	GType clocks_panel_id_type_id;
	clocks_panel_id_type_id = g_enum_register_static ("ClocksPanelId", values);
	return clocks_panel_id_type_id;
}

GType
clocks_panel_id_get_type (void)
{
	static volatile gsize clocks_panel_id_type_id__once = 0;
	if (g_once_init_enter (&clocks_panel_id_type_id__once)) {
		GType clocks_panel_id_type_id;
		clocks_panel_id_type_id = clocks_panel_id_get_type_once ();
		g_once_init_leave (&clocks_panel_id_type_id__once, clocks_panel_id_type_id);
	}
	return clocks_panel_id_type_id__once;
}

static void
clocks_clock_real_activate_new (ClocksClock* self)
{
}

void
clocks_clock_activate_new (ClocksClock* self)
{
	ClocksClockIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = CLOCKS_CLOCK_GET_INTERFACE (self);
	if (_iface_->activate_new) {
		_iface_->activate_new (self);
	}
}

static gboolean
clocks_clock_real_escape_pressed (ClocksClock* self)
{
	gboolean result;
	result = FALSE;
	return result;
}

gboolean
clocks_clock_escape_pressed (ClocksClock* self)
{
	ClocksClockIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = CLOCKS_CLOCK_GET_INTERFACE (self);
	if (_iface_->escape_pressed) {
		return _iface_->escape_pressed (self);
	}
	return FALSE;
}

ClocksPanelId
clocks_clock_get_panel_id (ClocksClock* self)
{
	ClocksClockIface* _iface_;
	g_return_val_if_fail (self != NULL, 0);
	_iface_ = CLOCKS_CLOCK_GET_INTERFACE (self);
	if (_iface_->get_panel_id) {
		return _iface_->get_panel_id (self);
	}
	return 0;
}

void
clocks_clock_set_panel_id (ClocksClock* self,
                           ClocksPanelId value)
{
	ClocksClockIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = CLOCKS_CLOCK_GET_INTERFACE (self);
	if (_iface_->set_panel_id) {
		_iface_->set_panel_id (self, value);
	}
}

ClocksButtonMode
clocks_clock_get_button_mode (ClocksClock* self)
{
	ClocksClockIface* _iface_;
	g_return_val_if_fail (self != NULL, 0);
	_iface_ = CLOCKS_CLOCK_GET_INTERFACE (self);
	if (_iface_->get_button_mode) {
		return _iface_->get_button_mode (self);
	}
	return 0;
}

void
clocks_clock_set_button_mode (ClocksClock* self,
                              ClocksButtonMode value)
{
	ClocksClockIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = CLOCKS_CLOCK_GET_INTERFACE (self);
	if (_iface_->set_button_mode) {
		_iface_->set_button_mode (self, value);
	}
}

const gchar*
clocks_clock_get_new_label (ClocksClock* self)
{
	ClocksClockIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = CLOCKS_CLOCK_GET_INTERFACE (self);
	if (_iface_->get_new_label) {
		return _iface_->get_new_label (self);
	}
	return NULL;
}

static void
clocks_clock_default_init (ClocksClockIface * iface,
                           gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_enum ("panel-id", "panel-id", "panel-id", CLOCKS_TYPE_PANEL_ID, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_interface_install_property (iface, g_param_spec_enum ("button-mode", "button-mode", "button-mode", CLOCKS_TYPE_BUTTON_MODE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_interface_install_property (iface, g_param_spec_string ("new-label", "new-label", "new-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	iface->activate_new = clocks_clock_real_activate_new;
	iface->escape_pressed = clocks_clock_real_escape_pressed;
}

 G_GNUC_NO_INLINE static GType
clocks_clock_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ClocksClockIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clocks_clock_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType clocks_clock_type_id;
	clocks_clock_type_id = g_type_register_static (G_TYPE_INTERFACE, "ClocksClock", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (clocks_clock_type_id, G_TYPE_OBJECT);
	return clocks_clock_type_id;
}

GType
clocks_clock_get_type (void)
{
	static volatile gsize clocks_clock_type_id__once = 0;
	if (g_once_init_enter (&clocks_clock_type_id__once)) {
		GType clocks_clock_type_id;
		clocks_clock_type_id = clocks_clock_get_type_once ();
		g_once_init_leave (&clocks_clock_type_id__once, clocks_clock_type_id);
	}
	return clocks_clock_type_id__once;
}

