/* ClippyPreferences.c generated by valac 0.56.19, the Vala compiler
 * generated from ClippyPreferences.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_CLIPPY_PREFERENCES (docky_clippy_preferences_get_type ())
#define DOCKY_CLIPPY_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DOCKY_TYPE_CLIPPY_PREFERENCES, DockyClippyPreferences))
#define DOCKY_CLIPPY_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DOCKY_TYPE_CLIPPY_PREFERENCES, DockyClippyPreferencesClass))
#define DOCKY_IS_CLIPPY_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DOCKY_TYPE_CLIPPY_PREFERENCES))
#define DOCKY_IS_CLIPPY_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DOCKY_TYPE_CLIPPY_PREFERENCES))
#define DOCKY_CLIPPY_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DOCKY_TYPE_CLIPPY_PREFERENCES, DockyClippyPreferencesClass))

typedef struct _DockyClippyPreferences DockyClippyPreferences;
typedef struct _DockyClippyPreferencesClass DockyClippyPreferencesClass;
typedef struct _DockyClippyPreferencesPrivate DockyClippyPreferencesPrivate;
enum  {
	DOCKY_CLIPPY_PREFERENCES_0_PROPERTY,
	DOCKY_CLIPPY_PREFERENCES_MAX_ENTRIES_PROPERTY,
	DOCKY_CLIPPY_PREFERENCES_TRACK_MOUSE_SELECTIONS_PROPERTY,
	DOCKY_CLIPPY_PREFERENCES_NUM_PROPERTIES
};
static GParamSpec* docky_clippy_preferences_properties[DOCKY_CLIPPY_PREFERENCES_NUM_PROPERTIES];

struct _DockyClippyPreferences {
	PlankDockItemPreferences parent_instance;
	DockyClippyPreferencesPrivate * priv;
};

struct _DockyClippyPreferencesClass {
	PlankDockItemPreferencesClass parent_class;
};

struct _DockyClippyPreferencesPrivate {
	guint _MaxEntries;
	gboolean _TrackMouseSelections;
};

static gint DockyClippyPreferences_private_offset;
static gpointer docky_clippy_preferences_parent_class = NULL;

VALA_EXTERN GType docky_clippy_preferences_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DockyClippyPreferences, g_object_unref)
VALA_EXTERN DockyClippyPreferences* docky_clippy_preferences_new_with_file (GFile* file);
VALA_EXTERN DockyClippyPreferences* docky_clippy_preferences_construct_with_file (GType object_type,
                                                                      GFile* file);
static void docky_clippy_preferences_real_reset_properties (PlankPreferences* base);
VALA_EXTERN void docky_clippy_preferences_set_MaxEntries (DockyClippyPreferences* self,
                                              guint value);
VALA_EXTERN void docky_clippy_preferences_set_TrackMouseSelections (DockyClippyPreferences* self,
                                                        gboolean value);
VALA_EXTERN DockyClippyPreferences* docky_clippy_preferences_new (void);
VALA_EXTERN DockyClippyPreferences* docky_clippy_preferences_construct (GType object_type);
VALA_EXTERN guint docky_clippy_preferences_get_MaxEntries (DockyClippyPreferences* self);
VALA_EXTERN gboolean docky_clippy_preferences_get_TrackMouseSelections (DockyClippyPreferences* self);
static void docky_clippy_preferences_finalize (GObject * obj);
static GType docky_clippy_preferences_get_type_once (void);
static void _vala_docky_clippy_preferences_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec);
static void _vala_docky_clippy_preferences_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec);

static inline gpointer
docky_clippy_preferences_get_instance_private (DockyClippyPreferences* self)
{
	return G_STRUCT_MEMBER_P (self, DockyClippyPreferences_private_offset);
}

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

DockyClippyPreferences*
docky_clippy_preferences_new_with_file (GFile* file)
{
	return docky_clippy_preferences_construct_with_file (DOCKY_TYPE_CLIPPY_PREFERENCES, file);
}

static void
docky_clippy_preferences_real_reset_properties (PlankPreferences* base)
{
	DockyClippyPreferences * self;
	self = (DockyClippyPreferences*) base;
	docky_clippy_preferences_set_MaxEntries (self, (guint) 15);
	docky_clippy_preferences_set_TrackMouseSelections (self, FALSE);
}

DockyClippyPreferences*
docky_clippy_preferences_construct (GType object_type)
{
	DockyClippyPreferences * self = NULL;
	self = (DockyClippyPreferences*) plank_dock_item_preferences_construct (object_type);
	return self;
}

DockyClippyPreferences*
docky_clippy_preferences_new (void)
{
	return docky_clippy_preferences_construct (DOCKY_TYPE_CLIPPY_PREFERENCES);
}

guint
docky_clippy_preferences_get_MaxEntries (DockyClippyPreferences* self)
{
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_MaxEntries;
	return result;
}

void
docky_clippy_preferences_set_MaxEntries (DockyClippyPreferences* self,
                                         guint value)
{
	guint old_value;
	g_return_if_fail (self != NULL);
	old_value = docky_clippy_preferences_get_MaxEntries (self);
	if (old_value != value) {
		self->priv->_MaxEntries = value;
		g_object_notify_by_pspec ((GObject *) self, docky_clippy_preferences_properties[DOCKY_CLIPPY_PREFERENCES_MAX_ENTRIES_PROPERTY]);
	}
}

gboolean
docky_clippy_preferences_get_TrackMouseSelections (DockyClippyPreferences* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_TrackMouseSelections;
	return result;
}

void
docky_clippy_preferences_set_TrackMouseSelections (DockyClippyPreferences* self,
                                                   gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = docky_clippy_preferences_get_TrackMouseSelections (self);
	if (old_value != value) {
		self->priv->_TrackMouseSelections = value;
		g_object_notify_by_pspec ((GObject *) self, docky_clippy_preferences_properties[DOCKY_CLIPPY_PREFERENCES_TRACK_MOUSE_SELECTIONS_PROPERTY]);
	}
}

static void
docky_clippy_preferences_class_init (DockyClippyPreferencesClass * klass,
                                     gpointer klass_data)
{
	docky_clippy_preferences_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DockyClippyPreferences_private_offset);
	((PlankPreferencesClass *) klass)->reset_properties = (void (*) (PlankPreferences*)) docky_clippy_preferences_real_reset_properties;
	G_OBJECT_CLASS (klass)->get_property = _vala_docky_clippy_preferences_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_docky_clippy_preferences_set_property;
	G_OBJECT_CLASS (klass)->finalize = docky_clippy_preferences_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DOCKY_CLIPPY_PREFERENCES_MAX_ENTRIES_PROPERTY, docky_clippy_preferences_properties[DOCKY_CLIPPY_PREFERENCES_MAX_ENTRIES_PROPERTY] = g_param_spec_uint ("MaxEntries", "max-entries", "How many recent clipboard entries to keep.", 0, G_MAXUINT, (guint) 15, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DOCKY_CLIPPY_PREFERENCES_TRACK_MOUSE_SELECTIONS_PROPERTY, docky_clippy_preferences_properties[DOCKY_CLIPPY_PREFERENCES_TRACK_MOUSE_SELECTIONS_PROPERTY] = g_param_spec_boolean ("TrackMouseSelections", "track-mouse-selections", "If it should track the primary (mouse selection) clipboard.", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
docky_clippy_preferences_instance_init (DockyClippyPreferences * self,
                                        gpointer klass)
{
	self->priv = docky_clippy_preferences_get_instance_private (self);
	self->priv->_MaxEntries = (guint) 15;
	self->priv->_TrackMouseSelections = FALSE;
}

static void
docky_clippy_preferences_finalize (GObject * obj)
{
	DockyClippyPreferences * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DOCKY_TYPE_CLIPPY_PREFERENCES, DockyClippyPreferences);
	G_OBJECT_CLASS (docky_clippy_preferences_parent_class)->finalize (obj);
}

static GType
docky_clippy_preferences_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DockyClippyPreferencesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) docky_clippy_preferences_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DockyClippyPreferences), 0, (GInstanceInitFunc) docky_clippy_preferences_instance_init, NULL };
	GType docky_clippy_preferences_type_id;
	docky_clippy_preferences_type_id = g_type_register_static (PLANK_TYPE_DOCK_ITEM_PREFERENCES, "DockyClippyPreferences", &g_define_type_info, 0);
	DockyClippyPreferences_private_offset = g_type_add_instance_private (docky_clippy_preferences_type_id, sizeof (DockyClippyPreferencesPrivate));
	return docky_clippy_preferences_type_id;
}

GType
docky_clippy_preferences_get_type (void)
{
	static volatile gsize docky_clippy_preferences_type_id__once = 0;
	if (g_once_init_enter (&docky_clippy_preferences_type_id__once)) {
		GType docky_clippy_preferences_type_id;
		docky_clippy_preferences_type_id = docky_clippy_preferences_get_type_once ();
		g_once_init_leave (&docky_clippy_preferences_type_id__once, docky_clippy_preferences_type_id);
	}
	return docky_clippy_preferences_type_id__once;
}

static void
_vala_docky_clippy_preferences_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec)
{
	DockyClippyPreferences * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DOCKY_TYPE_CLIPPY_PREFERENCES, DockyClippyPreferences);
	switch (property_id) {
		case DOCKY_CLIPPY_PREFERENCES_MAX_ENTRIES_PROPERTY:
		g_value_set_uint (value, docky_clippy_preferences_get_MaxEntries (self));
		break;
		case DOCKY_CLIPPY_PREFERENCES_TRACK_MOUSE_SELECTIONS_PROPERTY:
		g_value_set_boolean (value, docky_clippy_preferences_get_TrackMouseSelections (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_docky_clippy_preferences_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec)
{
	DockyClippyPreferences * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DOCKY_TYPE_CLIPPY_PREFERENCES, DockyClippyPreferences);
	switch (property_id) {
		case DOCKY_CLIPPY_PREFERENCES_MAX_ENTRIES_PROPERTY:
		docky_clippy_preferences_set_MaxEntries (self, g_value_get_uint (value));
		break;
		case DOCKY_CLIPPY_PREFERENCES_TRACK_MOUSE_SELECTIONS_PROPERTY:
		docky_clippy_preferences_set_TrackMouseSelections (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

