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

/* RestBreakType.vala
 *
 * Copyright 2020 Dylan McCall <dylan@dylanmccall.ca>
 *
 * 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 3 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, see <http://www.gnu.org/licenses/>.
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#include "settings.h"
#include <glib-object.h>
#include <gio/gio.h>
#include "config.h"
#include <glib.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

enum  {
	BREAK_TIMER_SETTINGS_REST_BREAK_REST_BREAK_TYPE_0_PROPERTY,
	BREAK_TIMER_SETTINGS_REST_BREAK_REST_BREAK_TYPE_NUM_PROPERTIES
};
static GParamSpec* break_timer_settings_rest_break_rest_break_type_properties[BREAK_TIMER_SETTINGS_REST_BREAK_REST_BREAK_TYPE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_INFO_WIDGET (break_timer_settings_rest_break_rest_break_info_widget_get_type ())
#define BREAK_TIMER_SETTINGS_REST_BREAK_REST_BREAK_INFO_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_INFO_WIDGET, BreakTimerSettingsRestBreakRestBreakInfoWidget))
#define BREAK_TIMER_SETTINGS_REST_BREAK_REST_BREAK_INFO_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_INFO_WIDGET, BreakTimerSettingsRestBreakRestBreakInfoWidgetClass))
#define BREAK_TIMER_SETTINGS_REST_BREAK_IS_REST_BREAK_INFO_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_INFO_WIDGET))
#define BREAK_TIMER_SETTINGS_REST_BREAK_IS_REST_BREAK_INFO_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_INFO_WIDGET))
#define BREAK_TIMER_SETTINGS_REST_BREAK_REST_BREAK_INFO_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_INFO_WIDGET, BreakTimerSettingsRestBreakRestBreakInfoWidgetClass))

typedef struct _BreakTimerSettingsRestBreakRestBreakInfoWidget BreakTimerSettingsRestBreakRestBreakInfoWidget;
typedef struct _BreakTimerSettingsRestBreakRestBreakInfoWidgetClass BreakTimerSettingsRestBreakRestBreakInfoWidgetClass;

#define BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_STATUS_WIDGET (break_timer_settings_rest_break_rest_break_status_widget_get_type ())
#define BREAK_TIMER_SETTINGS_REST_BREAK_REST_BREAK_STATUS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_STATUS_WIDGET, BreakTimerSettingsRestBreakRestBreakStatusWidget))
#define BREAK_TIMER_SETTINGS_REST_BREAK_REST_BREAK_STATUS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_STATUS_WIDGET, BreakTimerSettingsRestBreakRestBreakStatusWidgetClass))
#define BREAK_TIMER_SETTINGS_REST_BREAK_IS_REST_BREAK_STATUS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_STATUS_WIDGET))
#define BREAK_TIMER_SETTINGS_REST_BREAK_IS_REST_BREAK_STATUS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_STATUS_WIDGET))
#define BREAK_TIMER_SETTINGS_REST_BREAK_REST_BREAK_STATUS_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_STATUS_WIDGET, BreakTimerSettingsRestBreakRestBreakStatusWidgetClass))

typedef struct _BreakTimerSettingsRestBreakRestBreakStatusWidget BreakTimerSettingsRestBreakRestBreakStatusWidget;
typedef struct _BreakTimerSettingsRestBreakRestBreakStatusWidgetClass BreakTimerSettingsRestBreakRestBreakStatusWidgetClass;

#define BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_SETTINGS_WIDGET (break_timer_settings_rest_break_rest_break_settings_widget_get_type ())
#define BREAK_TIMER_SETTINGS_REST_BREAK_REST_BREAK_SETTINGS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_SETTINGS_WIDGET, BreakTimerSettingsRestBreakRestBreakSettingsWidget))
#define BREAK_TIMER_SETTINGS_REST_BREAK_REST_BREAK_SETTINGS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_SETTINGS_WIDGET, BreakTimerSettingsRestBreakRestBreakSettingsWidgetClass))
#define BREAK_TIMER_SETTINGS_REST_BREAK_IS_REST_BREAK_SETTINGS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_SETTINGS_WIDGET))
#define BREAK_TIMER_SETTINGS_REST_BREAK_IS_REST_BREAK_SETTINGS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_SETTINGS_WIDGET))
#define BREAK_TIMER_SETTINGS_REST_BREAK_REST_BREAK_SETTINGS_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_SETTINGS_WIDGET, BreakTimerSettingsRestBreakRestBreakSettingsWidgetClass))

typedef struct _BreakTimerSettingsRestBreakRestBreakSettingsWidget BreakTimerSettingsRestBreakRestBreakSettingsWidget;
typedef struct _BreakTimerSettingsRestBreakRestBreakSettingsWidgetClass BreakTimerSettingsRestBreakRestBreakSettingsWidgetClass;

static gpointer break_timer_settings_rest_break_rest_break_type_parent_class = NULL;

static BreakTimerSettingsBreakBreakInfoWidget* break_timer_settings_rest_break_rest_break_type_real_create_info_widget (BreakTimerSettingsBreakBreakType* base);
VALA_EXTERN BreakTimerSettingsRestBreakRestBreakInfoWidget* break_timer_settings_rest_break_rest_break_info_widget_new (BreakTimerSettingsRestBreakRestBreakType* break_type);
VALA_EXTERN BreakTimerSettingsRestBreakRestBreakInfoWidget* break_timer_settings_rest_break_rest_break_info_widget_construct (GType object_type,
                                                                                                                  BreakTimerSettingsRestBreakRestBreakType* break_type);
VALA_EXTERN GType break_timer_settings_rest_break_rest_break_info_widget_get_type (void) G_GNUC_CONST ;
static BreakTimerSettingsBreakBreakStatusWidget* break_timer_settings_rest_break_rest_break_type_real_create_status_widget (BreakTimerSettingsBreakBreakType* base);
VALA_EXTERN BreakTimerSettingsRestBreakRestBreakStatusWidget* break_timer_settings_rest_break_rest_break_status_widget_new (BreakTimerSettingsRestBreakRestBreakType* break_type);
VALA_EXTERN BreakTimerSettingsRestBreakRestBreakStatusWidget* break_timer_settings_rest_break_rest_break_status_widget_construct (GType object_type,
                                                                                                                      BreakTimerSettingsRestBreakRestBreakType* break_type);
VALA_EXTERN GType break_timer_settings_rest_break_rest_break_status_widget_get_type (void) G_GNUC_CONST ;
static BreakTimerSettingsBreakBreakSettingsWidget* break_timer_settings_rest_break_rest_break_type_real_create_settings_widget (BreakTimerSettingsBreakBreakType* base);
VALA_EXTERN BreakTimerSettingsRestBreakRestBreakSettingsWidget* break_timer_settings_rest_break_rest_break_settings_widget_new (BreakTimerSettingsRestBreakRestBreakType* break_type);
VALA_EXTERN BreakTimerSettingsRestBreakRestBreakSettingsWidget* break_timer_settings_rest_break_rest_break_settings_widget_construct (GType object_type,
                                                                                                                          BreakTimerSettingsRestBreakRestBreakType* break_type);
VALA_EXTERN GType break_timer_settings_rest_break_rest_break_settings_widget_get_type (void) G_GNUC_CONST ;
static GType break_timer_settings_rest_break_rest_break_type_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

BreakTimerSettingsRestBreakRestBreakType*
break_timer_settings_rest_break_rest_break_type_construct (GType object_type)
{
	BreakTimerSettingsRestBreakRestBreakType * self = NULL;
	GSettings* settings = NULL;
	GSettings* _tmp0_;
	BreakTimerSettingsTimerBreakBreakTimeOption* _tmp1_;
	BreakTimerSettingsTimerBreakBreakTimeOption* _tmp2_;
	BreakTimerSettingsTimerBreakBreakTimeOption* _tmp3_;
	BreakTimerSettingsTimerBreakBreakTimeOption* _tmp4_;
	BreakTimerSettingsTimerBreakBreakTimeOption** _tmp5_;
	BreakTimerSettingsTimerBreakBreakTimeOption* _tmp6_;
	BreakTimerSettingsTimerBreakBreakTimeOption* _tmp7_;
	BreakTimerSettingsTimerBreakBreakTimeOption* _tmp8_;
	BreakTimerSettingsTimerBreakBreakTimeOption* _tmp9_;
	BreakTimerSettingsTimerBreakBreakTimeOption* _tmp10_;
	BreakTimerSettingsTimerBreakBreakTimeOption** _tmp11_;
	_tmp0_ = g_settings_new (APPLICATION_ID ".restbreak");
	settings = _tmp0_;
	self = (BreakTimerSettingsRestBreakRestBreakType*) break_timer_settings_timer_break_timer_break_type_construct (object_type, "restbreak", settings);
	_tmp1_ = break_timer_settings_timer_break_break_time_option_new (1800);
	_tmp2_ = break_timer_settings_timer_break_break_time_option_new (2400);
	_tmp3_ = break_timer_settings_timer_break_break_time_option_new (3000);
	_tmp4_ = break_timer_settings_timer_break_break_time_option_new (3600);
	_tmp5_ = g_new0 (BreakTimerSettingsTimerBreakBreakTimeOption*, 4 + 1);
	_tmp5_[0] = _tmp1_;
	_tmp5_[1] = _tmp2_;
	_tmp5_[2] = _tmp3_;
	_tmp5_[3] = _tmp4_;
	((BreakTimerSettingsTimerBreakTimerBreakType*) self)->interval_options = (_vala_array_free (((BreakTimerSettingsTimerBreakTimerBreakType*) self)->interval_options, ((BreakTimerSettingsTimerBreakTimerBreakType*) self)->interval_options_length1, (GDestroyNotify) g_object_unref), NULL);
	((BreakTimerSettingsTimerBreakTimerBreakType*) self)->interval_options = _tmp5_;
	((BreakTimerSettingsTimerBreakTimerBreakType*) self)->interval_options_length1 = 4;
	_tmp6_ = break_timer_settings_timer_break_break_time_option_new (240);
	_tmp7_ = break_timer_settings_timer_break_break_time_option_new (300);
	_tmp8_ = break_timer_settings_timer_break_break_time_option_new (360);
	_tmp9_ = break_timer_settings_timer_break_break_time_option_new (480);
	_tmp10_ = break_timer_settings_timer_break_break_time_option_new (600);
	_tmp11_ = g_new0 (BreakTimerSettingsTimerBreakBreakTimeOption*, 5 + 1);
	_tmp11_[0] = _tmp6_;
	_tmp11_[1] = _tmp7_;
	_tmp11_[2] = _tmp8_;
	_tmp11_[3] = _tmp9_;
	_tmp11_[4] = _tmp10_;
	((BreakTimerSettingsTimerBreakTimerBreakType*) self)->duration_options = (_vala_array_free (((BreakTimerSettingsTimerBreakTimerBreakType*) self)->duration_options, ((BreakTimerSettingsTimerBreakTimerBreakType*) self)->duration_options_length1, (GDestroyNotify) g_object_unref), NULL);
	((BreakTimerSettingsTimerBreakTimerBreakType*) self)->duration_options = _tmp11_;
	((BreakTimerSettingsTimerBreakTimerBreakType*) self)->duration_options_length1 = 5;
	_g_object_unref0 (settings);
	return self;
}

BreakTimerSettingsRestBreakRestBreakType*
break_timer_settings_rest_break_rest_break_type_new (void)
{
	return break_timer_settings_rest_break_rest_break_type_construct (BREAK_TIMER_SETTINGS_REST_BREAK_TYPE_REST_BREAK_TYPE);
}

static BreakTimerSettingsBreakBreakInfoWidget*
break_timer_settings_rest_break_rest_break_type_real_create_info_widget (BreakTimerSettingsBreakBreakType* base)
{
	BreakTimerSettingsRestBreakRestBreakType * self;
	BreakTimerSettingsRestBreakRestBreakInfoWidget* _tmp0_;
	BreakTimerSettingsBreakBreakInfoWidget* result;
	self = (BreakTimerSettingsRestBreakRestBreakType*) base;
	_tmp0_ = break_timer_settings_rest_break_rest_break_info_widget_new (self);
	g_object_ref_sink (_tmp0_);
	result = (BreakTimerSettingsBreakBreakInfoWidget*) _tmp0_;
	return result;
}

static BreakTimerSettingsBreakBreakStatusWidget*
break_timer_settings_rest_break_rest_break_type_real_create_status_widget (BreakTimerSettingsBreakBreakType* base)
{
	BreakTimerSettingsRestBreakRestBreakType * self;
	BreakTimerSettingsRestBreakRestBreakStatusWidget* _tmp0_;
	BreakTimerSettingsBreakBreakStatusWidget* result;
	self = (BreakTimerSettingsRestBreakRestBreakType*) base;
	_tmp0_ = break_timer_settings_rest_break_rest_break_status_widget_new (self);
	g_object_ref_sink (_tmp0_);
	result = (BreakTimerSettingsBreakBreakStatusWidget*) _tmp0_;
	return result;
}

static BreakTimerSettingsBreakBreakSettingsWidget*
break_timer_settings_rest_break_rest_break_type_real_create_settings_widget (BreakTimerSettingsBreakBreakType* base)
{
	BreakTimerSettingsRestBreakRestBreakType * self;
	BreakTimerSettingsRestBreakRestBreakSettingsWidget* _tmp0_;
	BreakTimerSettingsBreakBreakSettingsWidget* result;
	self = (BreakTimerSettingsRestBreakRestBreakType*) base;
	_tmp0_ = break_timer_settings_rest_break_rest_break_settings_widget_new (self);
	g_object_ref_sink (_tmp0_);
	result = (BreakTimerSettingsBreakBreakSettingsWidget*) _tmp0_;
	return result;
}

static void
break_timer_settings_rest_break_rest_break_type_class_init (BreakTimerSettingsRestBreakRestBreakTypeClass * klass,
                                                            gpointer klass_data)
{
	break_timer_settings_rest_break_rest_break_type_parent_class = g_type_class_peek_parent (klass);
	((BreakTimerSettingsBreakBreakTypeClass *) klass)->create_info_widget = (BreakTimerSettingsBreakBreakInfoWidget* (*) (BreakTimerSettingsBreakBreakType*)) break_timer_settings_rest_break_rest_break_type_real_create_info_widget;
	((BreakTimerSettingsBreakBreakTypeClass *) klass)->create_status_widget = (BreakTimerSettingsBreakBreakStatusWidget* (*) (BreakTimerSettingsBreakBreakType*)) break_timer_settings_rest_break_rest_break_type_real_create_status_widget;
	((BreakTimerSettingsBreakBreakTypeClass *) klass)->create_settings_widget = (BreakTimerSettingsBreakBreakSettingsWidget* (*) (BreakTimerSettingsBreakBreakType*)) break_timer_settings_rest_break_rest_break_type_real_create_settings_widget;
}

static void
break_timer_settings_rest_break_rest_break_type_instance_init (BreakTimerSettingsRestBreakRestBreakType * self,
                                                               gpointer klass)
{
}

static GType
break_timer_settings_rest_break_rest_break_type_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BreakTimerSettingsRestBreakRestBreakTypeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) break_timer_settings_rest_break_rest_break_type_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BreakTimerSettingsRestBreakRestBreakType), 0, (GInstanceInitFunc) break_timer_settings_rest_break_rest_break_type_instance_init, NULL };
	GType break_timer_settings_rest_break_rest_break_type_type_id;
	break_timer_settings_rest_break_rest_break_type_type_id = g_type_register_static (BREAK_TIMER_SETTINGS_TIMER_BREAK_TYPE_TIMER_BREAK_TYPE, "BreakTimerSettingsRestBreakRestBreakType", &g_define_type_info, 0);
	return break_timer_settings_rest_break_rest_break_type_type_id;
}

GType
break_timer_settings_rest_break_rest_break_type_get_type (void)
{
	static volatile gsize break_timer_settings_rest_break_rest_break_type_type_id__once = 0;
	if (g_once_init_enter (&break_timer_settings_rest_break_rest_break_type_type_id__once)) {
		GType break_timer_settings_rest_break_rest_break_type_type_id;
		break_timer_settings_rest_break_rest_break_type_type_id = break_timer_settings_rest_break_rest_break_type_get_type_once ();
		g_once_init_leave (&break_timer_settings_rest_break_rest_break_type_type_id__once, break_timer_settings_rest_break_rest_break_type_type_id);
	}
	return break_timer_settings_rest_break_rest_break_type_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

