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

/**/
/*  Copyright (C) 2011 Robert Dyer*/
/**/
/*  This file is part of Plank.*/
/**/
/*  Plank 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.*/
/**/
/*  Plank 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/>.*/
/**/

#include <plank.h>
#include <glib-object.h>
#include <glib.h>
#include <gio/gio.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 DOCKY_TYPE_CLOCK_PREFERENCES (docky_clock_preferences_get_type ())
#define DOCKY_CLOCK_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DOCKY_TYPE_CLOCK_PREFERENCES, DockyClockPreferences))
#define DOCKY_CLOCK_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DOCKY_TYPE_CLOCK_PREFERENCES, DockyClockPreferencesClass))
#define DOCKY_IS_CLOCK_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DOCKY_TYPE_CLOCK_PREFERENCES))
#define DOCKY_IS_CLOCK_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DOCKY_TYPE_CLOCK_PREFERENCES))
#define DOCKY_CLOCK_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DOCKY_TYPE_CLOCK_PREFERENCES, DockyClockPreferencesClass))

typedef struct _DockyClockPreferences DockyClockPreferences;
typedef struct _DockyClockPreferencesClass DockyClockPreferencesClass;
typedef struct _DockyClockPreferencesPrivate DockyClockPreferencesPrivate;
enum  {
	DOCKY_CLOCK_PREFERENCES_0_PROPERTY,
	DOCKY_CLOCK_PREFERENCES_SHOW_MILITARY_PROPERTY,
	DOCKY_CLOCK_PREFERENCES_SHOW_DIGITAL_PROPERTY,
	DOCKY_CLOCK_PREFERENCES_SHOW_DATE_PROPERTY,
	DOCKY_CLOCK_PREFERENCES_NUM_PROPERTIES
};
static GParamSpec* docky_clock_preferences_properties[DOCKY_CLOCK_PREFERENCES_NUM_PROPERTIES];

struct _DockyClockPreferences {
	PlankDockItemPreferences parent_instance;
	DockyClockPreferencesPrivate * priv;
};

struct _DockyClockPreferencesClass {
	PlankDockItemPreferencesClass parent_class;
};

struct _DockyClockPreferencesPrivate {
	gboolean _ShowMilitary;
	gboolean _ShowDigital;
	gboolean _ShowDate;
};

static gint DockyClockPreferences_private_offset;
static gpointer docky_clock_preferences_parent_class = NULL;

VALA_EXTERN GType docky_clock_preferences_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DockyClockPreferences, g_object_unref)
VALA_EXTERN DockyClockPreferences* docky_clock_preferences_new_with_file (GFile* file);
VALA_EXTERN DockyClockPreferences* docky_clock_preferences_construct_with_file (GType object_type,
                                                                    GFile* file);
static void docky_clock_preferences_real_reset_properties (PlankPreferences* base);
VALA_EXTERN void docky_clock_preferences_set_ShowMilitary (DockyClockPreferences* self,
                                               gboolean value);
VALA_EXTERN void docky_clock_preferences_set_ShowDigital (DockyClockPreferences* self,
                                              gboolean value);
VALA_EXTERN void docky_clock_preferences_set_ShowDate (DockyClockPreferences* self,
                                           gboolean value);
VALA_EXTERN DockyClockPreferences* docky_clock_preferences_new (void);
VALA_EXTERN DockyClockPreferences* docky_clock_preferences_construct (GType object_type);
VALA_EXTERN gboolean docky_clock_preferences_get_ShowMilitary (DockyClockPreferences* self);
VALA_EXTERN gboolean docky_clock_preferences_get_ShowDigital (DockyClockPreferences* self);
VALA_EXTERN gboolean docky_clock_preferences_get_ShowDate (DockyClockPreferences* self);
static void docky_clock_preferences_finalize (GObject * obj);
static GType docky_clock_preferences_get_type_once (void);
static void _vala_docky_clock_preferences_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_docky_clock_preferences_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec);

static inline gpointer
docky_clock_preferences_get_instance_private (DockyClockPreferences* self)
{
	return G_STRUCT_MEMBER_P (self, DockyClockPreferences_private_offset);
}

DockyClockPreferences*
docky_clock_preferences_construct_with_file (GType object_type,
                                             GFile* file)
{
	DockyClockPreferences * self = NULL;
	g_return_val_if_fail (file != NULL, NULL);
	self = (DockyClockPreferences*) plank_dock_item_preferences_construct_with_file (object_type, file);
	return self;
}

DockyClockPreferences*
docky_clock_preferences_new_with_file (GFile* file)
{
	return docky_clock_preferences_construct_with_file (DOCKY_TYPE_CLOCK_PREFERENCES, file);
}

static void
docky_clock_preferences_real_reset_properties (PlankPreferences* base)
{
	DockyClockPreferences * self;
	self = (DockyClockPreferences*) base;
	docky_clock_preferences_set_ShowMilitary (self, FALSE);
	docky_clock_preferences_set_ShowDigital (self, FALSE);
	docky_clock_preferences_set_ShowDate (self, FALSE);
}

DockyClockPreferences*
docky_clock_preferences_construct (GType object_type)
{
	DockyClockPreferences * self = NULL;
	self = (DockyClockPreferences*) plank_dock_item_preferences_construct (object_type);
	return self;
}

DockyClockPreferences*
docky_clock_preferences_new (void)
{
	return docky_clock_preferences_construct (DOCKY_TYPE_CLOCK_PREFERENCES);
}

gboolean
docky_clock_preferences_get_ShowMilitary (DockyClockPreferences* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_ShowMilitary;
	return result;
}

void
docky_clock_preferences_set_ShowMilitary (DockyClockPreferences* self,
                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = docky_clock_preferences_get_ShowMilitary (self);
	if (old_value != value) {
		self->priv->_ShowMilitary = value;
		g_object_notify_by_pspec ((GObject *) self, docky_clock_preferences_properties[DOCKY_CLOCK_PREFERENCES_SHOW_MILITARY_PROPERTY]);
	}
}

gboolean
docky_clock_preferences_get_ShowDigital (DockyClockPreferences* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_ShowDigital;
	return result;
}

void
docky_clock_preferences_set_ShowDigital (DockyClockPreferences* self,
                                         gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = docky_clock_preferences_get_ShowDigital (self);
	if (old_value != value) {
		self->priv->_ShowDigital = value;
		g_object_notify_by_pspec ((GObject *) self, docky_clock_preferences_properties[DOCKY_CLOCK_PREFERENCES_SHOW_DIGITAL_PROPERTY]);
	}
}

gboolean
docky_clock_preferences_get_ShowDate (DockyClockPreferences* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_ShowDate;
	return result;
}

void
docky_clock_preferences_set_ShowDate (DockyClockPreferences* self,
                                      gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = docky_clock_preferences_get_ShowDate (self);
	if (old_value != value) {
		self->priv->_ShowDate = value;
		g_object_notify_by_pspec ((GObject *) self, docky_clock_preferences_properties[DOCKY_CLOCK_PREFERENCES_SHOW_DATE_PROPERTY]);
	}
}

static void
docky_clock_preferences_class_init (DockyClockPreferencesClass * klass,
                                    gpointer klass_data)
{
	docky_clock_preferences_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DockyClockPreferences_private_offset);
	((PlankPreferencesClass *) klass)->reset_properties = (void (*) (PlankPreferences*)) docky_clock_preferences_real_reset_properties;
	G_OBJECT_CLASS (klass)->get_property = _vala_docky_clock_preferences_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_docky_clock_preferences_set_property;
	G_OBJECT_CLASS (klass)->finalize = docky_clock_preferences_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DOCKY_CLOCK_PREFERENCES_SHOW_MILITARY_PROPERTY, docky_clock_preferences_properties[DOCKY_CLOCK_PREFERENCES_SHOW_MILITARY_PROPERTY] = g_param_spec_boolean ("ShowMilitary", "show-military", "If the clock shows 24hr time (when showing digital and in the hover).", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DOCKY_CLOCK_PREFERENCES_SHOW_DIGITAL_PROPERTY, docky_clock_preferences_properties[DOCKY_CLOCK_PREFERENCES_SHOW_DIGITAL_PROPERTY] = g_param_spec_boolean ("ShowDigital", "show-digital", "If the clock shows a digital clock (true) or an analog clock (false).", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DOCKY_CLOCK_PREFERENCES_SHOW_DATE_PROPERTY, docky_clock_preferences_properties[DOCKY_CLOCK_PREFERENCES_SHOW_DATE_PROPERTY] = g_param_spec_boolean ("ShowDate", "show-date", "If the clock shows the date in digital mode.", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
docky_clock_preferences_instance_init (DockyClockPreferences * self,
                                       gpointer klass)
{
	self->priv = docky_clock_preferences_get_instance_private (self);
}

static void
docky_clock_preferences_finalize (GObject * obj)
{
	DockyClockPreferences * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DOCKY_TYPE_CLOCK_PREFERENCES, DockyClockPreferences);
	G_OBJECT_CLASS (docky_clock_preferences_parent_class)->finalize (obj);
}

static GType
docky_clock_preferences_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DockyClockPreferencesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) docky_clock_preferences_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DockyClockPreferences), 0, (GInstanceInitFunc) docky_clock_preferences_instance_init, NULL };
	GType docky_clock_preferences_type_id;
	docky_clock_preferences_type_id = g_type_register_static (PLANK_TYPE_DOCK_ITEM_PREFERENCES, "DockyClockPreferences", &g_define_type_info, 0);
	DockyClockPreferences_private_offset = g_type_add_instance_private (docky_clock_preferences_type_id, sizeof (DockyClockPreferencesPrivate));
	return docky_clock_preferences_type_id;
}

GType
docky_clock_preferences_get_type (void)
{
	static volatile gsize docky_clock_preferences_type_id__once = 0;
	if (g_once_init_enter (&docky_clock_preferences_type_id__once)) {
		GType docky_clock_preferences_type_id;
		docky_clock_preferences_type_id = docky_clock_preferences_get_type_once ();
		g_once_init_leave (&docky_clock_preferences_type_id__once, docky_clock_preferences_type_id);
	}
	return docky_clock_preferences_type_id__once;
}

static void
_vala_docky_clock_preferences_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	DockyClockPreferences * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DOCKY_TYPE_CLOCK_PREFERENCES, DockyClockPreferences);
	switch (property_id) {
		case DOCKY_CLOCK_PREFERENCES_SHOW_MILITARY_PROPERTY:
		g_value_set_boolean (value, docky_clock_preferences_get_ShowMilitary (self));
		break;
		case DOCKY_CLOCK_PREFERENCES_SHOW_DIGITAL_PROPERTY:
		g_value_set_boolean (value, docky_clock_preferences_get_ShowDigital (self));
		break;
		case DOCKY_CLOCK_PREFERENCES_SHOW_DATE_PROPERTY:
		g_value_set_boolean (value, docky_clock_preferences_get_ShowDate (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_docky_clock_preferences_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	DockyClockPreferences * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DOCKY_TYPE_CLOCK_PREFERENCES, DockyClockPreferences);
	switch (property_id) {
		case DOCKY_CLOCK_PREFERENCES_SHOW_MILITARY_PROPERTY:
		docky_clock_preferences_set_ShowMilitary (self, g_value_get_boolean (value));
		break;
		case DOCKY_CLOCK_PREFERENCES_SHOW_DIGITAL_PROPERTY:
		docky_clock_preferences_set_ShowDigital (self, g_value_get_boolean (value));
		break;
		case DOCKY_CLOCK_PREFERENCES_SHOW_DATE_PROPERTY:
		docky_clock_preferences_set_ShowDate (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

