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

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <adwaita.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 TUBA_TYPE_PLACE (tuba_place_get_type ())
#define TUBA_PLACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_PLACE, TubaPlace))
#define TUBA_PLACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_PLACE, TubaPlaceClass))
#define TUBA_IS_PLACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_PLACE))
#define TUBA_IS_PLACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_PLACE))
#define TUBA_PLACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_PLACE, TubaPlaceClass))

typedef struct _TubaPlace TubaPlace;
typedef struct _TubaPlaceClass TubaPlaceClass;
typedef struct _TubaPlacePrivate TubaPlacePrivate;

#define TUBA_DIALOGS_TYPE_MAIN_WINDOW (tuba_dialogs_main_window_get_type ())
#define TUBA_DIALOGS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindow))
#define TUBA_DIALOGS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindowClass))
#define TUBA_DIALOGS_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW))
#define TUBA_DIALOGS_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_MAIN_WINDOW))
#define TUBA_DIALOGS_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindowClass))

typedef struct _TubaDialogsMainWindow TubaDialogsMainWindow;
typedef struct _TubaDialogsMainWindowClass TubaDialogsMainWindowClass;
typedef void (*TubaPlaceOpenFunc) (TubaDialogsMainWindow* window, GObject* extra);
enum  {
	TUBA_PLACE_0_PROPERTY,
	TUBA_PLACE_TITLE_PROPERTY,
	TUBA_PLACE_ICON_PROPERTY,
	TUBA_PLACE_BADGE_PROPERTY,
	TUBA_PLACE_SEPARATED_PROPERTY,
	TUBA_PLACE_SELECTABLE_PROPERTY,
	TUBA_PLACE_VISIBLE_PROPERTY,
	TUBA_PLACE_NEEDS_ATTENTION_PROPERTY,
	TUBA_PLACE_EXTRA_DATA_PROPERTY,
	TUBA_PLACE_OPEN_FUNC_PROPERTY,
	TUBA_PLACE_NUM_PROPERTIES
};
static GParamSpec* tuba_place_properties[TUBA_PLACE_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _TubaPlace {
	GObject parent_instance;
	TubaPlacePrivate * priv;
};

struct _TubaPlaceClass {
	GObjectClass parent_class;
};

struct _TubaPlacePrivate {
	gchar* _title;
	gchar* _icon;
	gint _badge;
	gboolean _separated;
	gboolean _selectable;
	gboolean _visible;
	gboolean _needs_attention;
	GObject* _extra_data;
	TubaPlaceOpenFunc _open_func;
};

static gint TubaPlace_private_offset;
static gpointer tuba_place_parent_class = NULL;

VALA_EXTERN GType tuba_place_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaPlace, g_object_unref)
VALA_EXTERN GType tuba_dialogs_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsMainWindow, g_object_unref)
VALA_EXTERN TubaPlace* tuba_place_new (void);
VALA_EXTERN TubaPlace* tuba_place_construct (GType object_type);
VALA_EXTERN const gchar* tuba_place_get_title (TubaPlace* self);
VALA_EXTERN void tuba_place_set_title (TubaPlace* self,
                           const gchar* value);
VALA_EXTERN const gchar* tuba_place_get_icon (TubaPlace* self);
VALA_EXTERN void tuba_place_set_icon (TubaPlace* self,
                          const gchar* value);
VALA_EXTERN gint tuba_place_get_badge (TubaPlace* self);
VALA_EXTERN void tuba_place_set_badge (TubaPlace* self,
                           gint value);
VALA_EXTERN gboolean tuba_place_get_separated (TubaPlace* self);
VALA_EXTERN void tuba_place_set_separated (TubaPlace* self,
                               gboolean value);
VALA_EXTERN gboolean tuba_place_get_selectable (TubaPlace* self);
VALA_EXTERN void tuba_place_set_selectable (TubaPlace* self,
                                gboolean value);
VALA_EXTERN gboolean tuba_place_get_visible (TubaPlace* self);
VALA_EXTERN void tuba_place_set_visible (TubaPlace* self,
                             gboolean value);
VALA_EXTERN gboolean tuba_place_get_needs_attention (TubaPlace* self);
VALA_EXTERN void tuba_place_set_needs_attention (TubaPlace* self,
                                     gboolean value);
VALA_EXTERN GObject* tuba_place_get_extra_data (TubaPlace* self);
VALA_EXTERN void tuba_place_set_extra_data (TubaPlace* self,
                                GObject* value);
VALA_EXTERN TubaPlaceOpenFunc tuba_place_get_open_func (TubaPlace* self);
VALA_EXTERN void tuba_place_set_open_func (TubaPlace* self,
                               TubaPlaceOpenFunc value);
static void tuba_place_finalize (GObject * obj);
static GType tuba_place_get_type_once (void);
static void _vala_tuba_place_get_property (GObject * object,
                                    guint property_id,
                                    GValue * value,
                                    GParamSpec * pspec);
static void _vala_tuba_place_set_property (GObject * object,
                                    guint property_id,
                                    const GValue * value,
                                    GParamSpec * pspec);

static inline gpointer
tuba_place_get_instance_private (TubaPlace* self)
{
	return G_STRUCT_MEMBER_P (self, TubaPlace_private_offset);
}

TubaPlace*
tuba_place_construct (GType object_type)
{
	TubaPlace * self = NULL;
	self = (TubaPlace*) g_object_new (object_type, NULL);
	return self;
}

TubaPlace*
tuba_place_new (void)
{
	return tuba_place_construct (TUBA_TYPE_PLACE);
}

const gchar*
tuba_place_get_title (TubaPlace* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title;
	result = _tmp0_;
	return result;
}

void
tuba_place_set_title (TubaPlace* self,
                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_place_get_title (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_title);
		self->priv->_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_place_properties[TUBA_PLACE_TITLE_PROPERTY]);
	}
}

const gchar*
tuba_place_get_icon (TubaPlace* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_icon;
	result = _tmp0_;
	return result;
}

void
tuba_place_set_icon (TubaPlace* self,
                     const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_place_get_icon (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_icon);
		self->priv->_icon = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_place_properties[TUBA_PLACE_ICON_PROPERTY]);
	}
}

gint
tuba_place_get_badge (TubaPlace* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_badge;
	return result;
}

void
tuba_place_set_badge (TubaPlace* self,
                      gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_place_get_badge (self);
	if (old_value != value) {
		self->priv->_badge = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_place_properties[TUBA_PLACE_BADGE_PROPERTY]);
	}
}

gboolean
tuba_place_get_separated (TubaPlace* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_separated;
	return result;
}

void
tuba_place_set_separated (TubaPlace* self,
                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_place_get_separated (self);
	if (old_value != value) {
		self->priv->_separated = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_place_properties[TUBA_PLACE_SEPARATED_PROPERTY]);
	}
}

gboolean
tuba_place_get_selectable (TubaPlace* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_selectable;
	return result;
}

void
tuba_place_set_selectable (TubaPlace* self,
                           gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_place_get_selectable (self);
	if (old_value != value) {
		self->priv->_selectable = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_place_properties[TUBA_PLACE_SELECTABLE_PROPERTY]);
	}
}

gboolean
tuba_place_get_visible (TubaPlace* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_visible;
	return result;
}

void
tuba_place_set_visible (TubaPlace* self,
                        gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_place_get_visible (self);
	if (old_value != value) {
		self->priv->_visible = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_place_properties[TUBA_PLACE_VISIBLE_PROPERTY]);
	}
}

gboolean
tuba_place_get_needs_attention (TubaPlace* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_needs_attention;
	return result;
}

void
tuba_place_set_needs_attention (TubaPlace* self,
                                gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_place_get_needs_attention (self);
	if (old_value != value) {
		self->priv->_needs_attention = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_place_properties[TUBA_PLACE_NEEDS_ATTENTION_PROPERTY]);
	}
}

GObject*
tuba_place_get_extra_data (TubaPlace* self)
{
	GObject* result;
	GObject* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_extra_data;
	result = _tmp0_;
	return result;
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

void
tuba_place_set_extra_data (TubaPlace* self,
                           GObject* value)
{
	GObject* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_place_get_extra_data (self);
	if (old_value != value) {
		GObject* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_extra_data);
		self->priv->_extra_data = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_place_properties[TUBA_PLACE_EXTRA_DATA_PROPERTY]);
	}
}

TubaPlaceOpenFunc
tuba_place_get_open_func (TubaPlace* self)
{
	TubaPlaceOpenFunc result;
	TubaPlaceOpenFunc _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_open_func;
	result = _tmp0_;
	return result;
}

void
tuba_place_set_open_func (TubaPlace* self,
                          TubaPlaceOpenFunc value)
{
	TubaPlaceOpenFunc old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_place_get_open_func (self);
	if (old_value != value) {
		self->priv->_open_func = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_place_properties[TUBA_PLACE_OPEN_FUNC_PROPERTY]);
	}
}

static void
tuba_place_class_init (TubaPlaceClass * klass,
                       gpointer klass_data)
{
	tuba_place_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaPlace_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_place_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_place_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_place_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_PLACE_TITLE_PROPERTY, tuba_place_properties[TUBA_PLACE_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_PLACE_ICON_PROPERTY, tuba_place_properties[TUBA_PLACE_ICON_PROPERTY] = g_param_spec_string ("icon", "icon", "icon", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_PLACE_BADGE_PROPERTY, tuba_place_properties[TUBA_PLACE_BADGE_PROPERTY] = g_param_spec_int ("badge", "badge", "badge", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_PLACE_SEPARATED_PROPERTY, tuba_place_properties[TUBA_PLACE_SEPARATED_PROPERTY] = g_param_spec_boolean ("separated", "separated", "separated", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_PLACE_SELECTABLE_PROPERTY, tuba_place_properties[TUBA_PLACE_SELECTABLE_PROPERTY] = g_param_spec_boolean ("selectable", "selectable", "selectable", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_PLACE_VISIBLE_PROPERTY, tuba_place_properties[TUBA_PLACE_VISIBLE_PROPERTY] = g_param_spec_boolean ("visible", "visible", "visible", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_PLACE_NEEDS_ATTENTION_PROPERTY, tuba_place_properties[TUBA_PLACE_NEEDS_ATTENTION_PROPERTY] = g_param_spec_boolean ("needs-attention", "needs-attention", "needs-attention", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_PLACE_EXTRA_DATA_PROPERTY, tuba_place_properties[TUBA_PLACE_EXTRA_DATA_PROPERTY] = g_param_spec_object ("extra-data", "extra-data", "extra-data", G_TYPE_OBJECT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_PLACE_OPEN_FUNC_PROPERTY, tuba_place_properties[TUBA_PLACE_OPEN_FUNC_PROPERTY] = g_param_spec_pointer ("open-func", "open-func", "open-func", G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tuba_place_instance_init (TubaPlace * self,
                          gpointer klass)
{
	self->priv = tuba_place_get_instance_private (self);
	self->priv->_badge = 0;
	self->priv->_separated = FALSE;
	self->priv->_selectable = TRUE;
	self->priv->_visible = TRUE;
	self->priv->_needs_attention = TRUE;
	self->priv->_extra_data = NULL;
}

static void
tuba_place_finalize (GObject * obj)
{
	TubaPlace * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_TYPE_PLACE, TubaPlace);
	_g_free0 (self->priv->_title);
	_g_free0 (self->priv->_icon);
	_g_object_unref0 (self->priv->_extra_data);
	G_OBJECT_CLASS (tuba_place_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_place_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaPlaceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_place_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaPlace), 0, (GInstanceInitFunc) tuba_place_instance_init, NULL };
	GType tuba_place_type_id;
	tuba_place_type_id = g_type_register_static (G_TYPE_OBJECT, "TubaPlace", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaPlace_private_offset = g_type_add_instance_private (tuba_place_type_id, sizeof (TubaPlacePrivate));
	return tuba_place_type_id;
}

GType
tuba_place_get_type (void)
{
	static GType tuba_place_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_place_type_id__once)) {
		GType tuba_place_type_id;
		tuba_place_type_id = tuba_place_get_type_once ();
		g_once_init_leave_pointer (&tuba_place_type_id__once, tuba_place_type_id);
	}
	return tuba_place_type_id__once;
}

static void
_vala_tuba_place_get_property (GObject * object,
                               guint property_id,
                               GValue * value,
                               GParamSpec * pspec)
{
	TubaPlace * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_TYPE_PLACE, TubaPlace);
	switch (property_id) {
		case TUBA_PLACE_TITLE_PROPERTY:
		g_value_set_string (value, tuba_place_get_title (self));
		break;
		case TUBA_PLACE_ICON_PROPERTY:
		g_value_set_string (value, tuba_place_get_icon (self));
		break;
		case TUBA_PLACE_BADGE_PROPERTY:
		g_value_set_int (value, tuba_place_get_badge (self));
		break;
		case TUBA_PLACE_SEPARATED_PROPERTY:
		g_value_set_boolean (value, tuba_place_get_separated (self));
		break;
		case TUBA_PLACE_SELECTABLE_PROPERTY:
		g_value_set_boolean (value, tuba_place_get_selectable (self));
		break;
		case TUBA_PLACE_VISIBLE_PROPERTY:
		g_value_set_boolean (value, tuba_place_get_visible (self));
		break;
		case TUBA_PLACE_NEEDS_ATTENTION_PROPERTY:
		g_value_set_boolean (value, tuba_place_get_needs_attention (self));
		break;
		case TUBA_PLACE_EXTRA_DATA_PROPERTY:
		g_value_set_object (value, tuba_place_get_extra_data (self));
		break;
		case TUBA_PLACE_OPEN_FUNC_PROPERTY:
		g_value_set_pointer (value, tuba_place_get_open_func (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_place_set_property (GObject * object,
                               guint property_id,
                               const GValue * value,
                               GParamSpec * pspec)
{
	TubaPlace * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_TYPE_PLACE, TubaPlace);
	switch (property_id) {
		case TUBA_PLACE_TITLE_PROPERTY:
		tuba_place_set_title (self, g_value_get_string (value));
		break;
		case TUBA_PLACE_ICON_PROPERTY:
		tuba_place_set_icon (self, g_value_get_string (value));
		break;
		case TUBA_PLACE_BADGE_PROPERTY:
		tuba_place_set_badge (self, g_value_get_int (value));
		break;
		case TUBA_PLACE_SEPARATED_PROPERTY:
		tuba_place_set_separated (self, g_value_get_boolean (value));
		break;
		case TUBA_PLACE_SELECTABLE_PROPERTY:
		tuba_place_set_selectable (self, g_value_get_boolean (value));
		break;
		case TUBA_PLACE_VISIBLE_PROPERTY:
		tuba_place_set_visible (self, g_value_get_boolean (value));
		break;
		case TUBA_PLACE_NEEDS_ATTENTION_PROPERTY:
		tuba_place_set_needs_attention (self, g_value_get_boolean (value));
		break;
		case TUBA_PLACE_EXTRA_DATA_PROPERTY:
		tuba_place_set_extra_data (self, g_value_get_object (value));
		break;
		case TUBA_PLACE_OPEN_FUNC_PROPERTY:
		tuba_place_set_open_func (self, g_value_get_pointer (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

