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

/*
 * Copyright (C) 2013  Paolo Borelli <pborelli@gnome.org>
 * Copyright (C) 2020  Bilal Elmoussaoui <bil.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 <glib-object.h>
#include <glib.h>
#include <float.h>
#include <math.h>

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

#define CLOCKS_STOPWATCH_TYPE_LAP (clocks_stopwatch_lap_get_type ())
#define CLOCKS_STOPWATCH_LAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLOCKS_STOPWATCH_TYPE_LAP, ClocksStopwatchLap))
#define CLOCKS_STOPWATCH_LAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLOCKS_STOPWATCH_TYPE_LAP, ClocksStopwatchLapClass))
#define CLOCKS_STOPWATCH_IS_LAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLOCKS_STOPWATCH_TYPE_LAP))
#define CLOCKS_STOPWATCH_IS_LAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLOCKS_STOPWATCH_TYPE_LAP))
#define CLOCKS_STOPWATCH_LAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLOCKS_STOPWATCH_TYPE_LAP, ClocksStopwatchLapClass))

typedef struct _ClocksStopwatchLap ClocksStopwatchLap;
typedef struct _ClocksStopwatchLapClass ClocksStopwatchLapClass;
typedef struct _ClocksStopwatchLapPrivate ClocksStopwatchLapPrivate;
enum  {
	CLOCKS_STOPWATCH_LAP_0_PROPERTY,
	CLOCKS_STOPWATCH_LAP_NUM_PROPERTIES
};
static GParamSpec* clocks_stopwatch_lap_properties[CLOCKS_STOPWATCH_LAP_NUM_PROPERTIES];

struct _ClocksStopwatchLap {
	GObject parent_instance;
	ClocksStopwatchLapPrivate * priv;
	gint index;
	gdouble duration;
};

struct _ClocksStopwatchLapClass {
	GObjectClass parent_class;
};

static gpointer clocks_stopwatch_lap_parent_class = NULL;

VALA_EXTERN GType clocks_stopwatch_lap_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClocksStopwatchLap, g_object_unref)
VALA_EXTERN ClocksStopwatchLap* clocks_stopwatch_lap_new (gint index,
                                              gdouble duration);
VALA_EXTERN ClocksStopwatchLap* clocks_stopwatch_lap_construct (GType object_type,
                                                    gint index,
                                                    gdouble duration);
static void clocks_stopwatch_lap_finalize (GObject * obj);
static GType clocks_stopwatch_lap_get_type_once (void);

ClocksStopwatchLap*
clocks_stopwatch_lap_construct (GType object_type,
                                gint index,
                                gdouble duration)
{
	ClocksStopwatchLap * self = NULL;
	self = (ClocksStopwatchLap*) g_object_new (object_type, NULL);
	self->index = index;
	self->duration = duration;
	return self;
}

ClocksStopwatchLap*
clocks_stopwatch_lap_new (gint index,
                          gdouble duration)
{
	return clocks_stopwatch_lap_construct (CLOCKS_STOPWATCH_TYPE_LAP, index, duration);
}

static void
clocks_stopwatch_lap_class_init (ClocksStopwatchLapClass * klass,
                                 gpointer klass_data)
{
	clocks_stopwatch_lap_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = clocks_stopwatch_lap_finalize;
}

static void
clocks_stopwatch_lap_instance_init (ClocksStopwatchLap * self,
                                    gpointer klass)
{
}

static void
clocks_stopwatch_lap_finalize (GObject * obj)
{
	ClocksStopwatchLap * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CLOCKS_STOPWATCH_TYPE_LAP, ClocksStopwatchLap);
	G_OBJECT_CLASS (clocks_stopwatch_lap_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
clocks_stopwatch_lap_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ClocksStopwatchLapClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clocks_stopwatch_lap_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ClocksStopwatchLap), 0, (GInstanceInitFunc) clocks_stopwatch_lap_instance_init, NULL };
	GType clocks_stopwatch_lap_type_id;
	clocks_stopwatch_lap_type_id = g_type_register_static (G_TYPE_OBJECT, "ClocksStopwatchLap", &g_define_type_info, 0);
	return clocks_stopwatch_lap_type_id;
}

GType
clocks_stopwatch_lap_get_type (void)
{
	static volatile gsize clocks_stopwatch_lap_type_id__once = 0;
	if (g_once_init_enter (&clocks_stopwatch_lap_type_id__once)) {
		GType clocks_stopwatch_lap_type_id;
		clocks_stopwatch_lap_type_id = clocks_stopwatch_lap_get_type_once ();
		g_once_init_leave (&clocks_stopwatch_lap_type_id__once, clocks_stopwatch_lap_type_id);
	}
	return clocks_stopwatch_lap_type_id__once;
}

