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

#include <gio/gio.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>

#define TOOTLE_TYPE_SETTINGS (tootle_settings_get_type ())
#define TOOTLE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_SETTINGS, TootleSettings))
#define TOOTLE_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_SETTINGS, TootleSettingsClass))
#define TOOTLE_IS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_SETTINGS))
#define TOOTLE_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_SETTINGS))
#define TOOTLE_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_SETTINGS, TootleSettingsClass))

typedef struct _TootleSettings TootleSettings;
typedef struct _TootleSettingsClass TootleSettingsClass;
typedef struct _TootleSettingsPrivate TootleSettingsPrivate;
typedef enum  {
	TOOTLE_API_VISIBILITY_PUBLIC,
	TOOTLE_API_VISIBILITY_UNLISTED,
	TOOTLE_API_VISIBILITY_PRIVATE,
	TOOTLE_API_VISIBILITY_DIRECT
} TootleAPIVisibility;

#define TOOTLE_API_TYPE_VISIBILITY (tootle_api_visibility_get_type ())
enum  {
	TOOTLE_SETTINGS_0_PROPERTY,
	TOOTLE_SETTINGS_CURRENT_ACCOUNT_PROPERTY,
	TOOTLE_SETTINGS_DARK_THEME_PROPERTY,
	TOOTLE_SETTINGS_AUTOSTART_PROPERTY,
	TOOTLE_SETTINGS_WORK_IN_BACKGROUND_PROPERTY,
	TOOTLE_SETTINGS_DEFAULT_POST_VISIBILITY_PROPERTY,
	TOOTLE_SETTINGS_TIMELINE_PAGE_SIZE_PROPERTY,
	TOOTLE_SETTINGS_POST_TEXT_SIZE_PROPERTY,
	TOOTLE_SETTINGS_LIVE_UPDATES_PROPERTY,
	TOOTLE_SETTINGS_PUBLIC_LIVE_UPDATES_PROPERTY,
	TOOTLE_SETTINGS_AGGRESSIVE_RESOLVING_PROPERTY,
	TOOTLE_SETTINGS_WINDOW_X_PROPERTY,
	TOOTLE_SETTINGS_WINDOW_Y_PROPERTY,
	TOOTLE_SETTINGS_WINDOW_W_PROPERTY,
	TOOTLE_SETTINGS_WINDOW_H_PROPERTY,
	TOOTLE_SETTINGS_NUM_PROPERTIES
};
static GParamSpec* tootle_settings_properties[TOOTLE_SETTINGS_NUM_PROPERTIES];

struct _TootleSettings {
	GSettings parent_instance;
	TootleSettingsPrivate * priv;
};

struct _TootleSettingsClass {
	GSettingsClass parent_class;
};

struct _TootleSettingsPrivate {
	gint _current_account;
	gboolean _dark_theme;
	gboolean _autostart;
	gboolean _work_in_background;
	TootleAPIVisibility _default_post_visibility;
	gint _timeline_page_size;
	gint _post_text_size;
	gboolean _live_updates;
	gboolean _public_live_updates;
	gboolean _aggressive_resolving;
	gint _window_x;
	gint _window_y;
	gint _window_w;
	gint _window_h;
};

static gint TootleSettings_private_offset;
static gpointer tootle_settings_parent_class = NULL;

GType tootle_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleSettings, g_object_unref)
GType tootle_api_visibility_get_type (void) G_GNUC_CONST ;
TootleSettings* tootle_settings_new (void);
TootleSettings* tootle_settings_construct (GType object_type);
#define BUILD_DOMAIN "com.github.bleakgrey.tootle"
static void tootle_settings_init (TootleSettings* self,
                           const gchar* key);
gint tootle_settings_get_current_account (TootleSettings* self);
void tootle_settings_set_current_account (TootleSettings* self,
                                          gint value);
gboolean tootle_settings_get_dark_theme (TootleSettings* self);
void tootle_settings_set_dark_theme (TootleSettings* self,
                                     gboolean value);
gboolean tootle_settings_get_autostart (TootleSettings* self);
void tootle_settings_set_autostart (TootleSettings* self,
                                    gboolean value);
gboolean tootle_settings_get_work_in_background (TootleSettings* self);
void tootle_settings_set_work_in_background (TootleSettings* self,
                                             gboolean value);
TootleAPIVisibility tootle_settings_get_default_post_visibility (TootleSettings* self);
void tootle_settings_set_default_post_visibility (TootleSettings* self,
                                                  TootleAPIVisibility value);
gint tootle_settings_get_timeline_page_size (TootleSettings* self);
void tootle_settings_set_timeline_page_size (TootleSettings* self,
                                             gint value);
gint tootle_settings_get_post_text_size (TootleSettings* self);
void tootle_settings_set_post_text_size (TootleSettings* self,
                                         gint value);
gboolean tootle_settings_get_live_updates (TootleSettings* self);
void tootle_settings_set_live_updates (TootleSettings* self,
                                       gboolean value);
gboolean tootle_settings_get_public_live_updates (TootleSettings* self);
void tootle_settings_set_public_live_updates (TootleSettings* self,
                                              gboolean value);
gboolean tootle_settings_get_aggressive_resolving (TootleSettings* self);
void tootle_settings_set_aggressive_resolving (TootleSettings* self,
                                               gboolean value);
gint tootle_settings_get_window_x (TootleSettings* self);
void tootle_settings_set_window_x (TootleSettings* self,
                                   gint value);
gint tootle_settings_get_window_y (TootleSettings* self);
void tootle_settings_set_window_y (TootleSettings* self,
                                   gint value);
gint tootle_settings_get_window_w (TootleSettings* self);
void tootle_settings_set_window_w (TootleSettings* self,
                                   gint value);
gint tootle_settings_get_window_h (TootleSettings* self);
void tootle_settings_set_window_h (TootleSettings* self,
                                   gint value);
static void tootle_settings_finalize (GObject * obj);
static GType tootle_settings_get_type_once (void);
static void _vala_tootle_settings_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec);
static void _vala_tootle_settings_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
tootle_settings_get_instance_private (TootleSettings* self)
{
	return G_STRUCT_MEMBER_P (self, TootleSettings_private_offset);
}

TootleSettings*
tootle_settings_construct (GType object_type)
{
	TootleSettings * self = NULL;
	self = (TootleSettings*) g_object_new (object_type, "schema-id", BUILD_DOMAIN, NULL);
	tootle_settings_init (self, "current-account");
	tootle_settings_init (self, "dark-theme");
	tootle_settings_init (self, "autostart");
	tootle_settings_init (self, "work-in-background");
	tootle_settings_init (self, "default-post-visibility");
	tootle_settings_init (self, "timeline-page-size");
	tootle_settings_init (self, "post-text-size");
	tootle_settings_init (self, "live-updates");
	tootle_settings_init (self, "public-live-updates");
	tootle_settings_init (self, "aggressive-resolving");
	tootle_settings_init (self, "window-x");
	tootle_settings_init (self, "window-y");
	tootle_settings_init (self, "window-w");
	tootle_settings_init (self, "window-h");
	return self;
}

TootleSettings*
tootle_settings_new (void)
{
	return tootle_settings_construct (TOOTLE_TYPE_SETTINGS);
}

static void
tootle_settings_init (TootleSettings* self,
                      const gchar* key)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (key != NULL);
	g_settings_bind ((GSettings*) self, key, (GObject*) self, key, G_SETTINGS_BIND_DEFAULT);
}

gint
tootle_settings_get_current_account (TootleSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_current_account;
	return result;
}

void
tootle_settings_set_current_account (TootleSettings* self,
                                     gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_settings_get_current_account (self);
	if (old_value != value) {
		self->priv->_current_account = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_settings_properties[TOOTLE_SETTINGS_CURRENT_ACCOUNT_PROPERTY]);
	}
}

gboolean
tootle_settings_get_dark_theme (TootleSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_dark_theme;
	return result;
}

void
tootle_settings_set_dark_theme (TootleSettings* self,
                                gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_settings_get_dark_theme (self);
	if (old_value != value) {
		self->priv->_dark_theme = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_settings_properties[TOOTLE_SETTINGS_DARK_THEME_PROPERTY]);
	}
}

gboolean
tootle_settings_get_autostart (TootleSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_autostart;
	return result;
}

void
tootle_settings_set_autostart (TootleSettings* self,
                               gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_settings_get_autostart (self);
	if (old_value != value) {
		self->priv->_autostart = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_settings_properties[TOOTLE_SETTINGS_AUTOSTART_PROPERTY]);
	}
}

gboolean
tootle_settings_get_work_in_background (TootleSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_work_in_background;
	return result;
}

void
tootle_settings_set_work_in_background (TootleSettings* self,
                                        gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_settings_get_work_in_background (self);
	if (old_value != value) {
		self->priv->_work_in_background = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_settings_properties[TOOTLE_SETTINGS_WORK_IN_BACKGROUND_PROPERTY]);
	}
}

TootleAPIVisibility
tootle_settings_get_default_post_visibility (TootleSettings* self)
{
	TootleAPIVisibility result;
	TootleAPIVisibility _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_default_post_visibility;
	result = _tmp0_;
	return result;
}

void
tootle_settings_set_default_post_visibility (TootleSettings* self,
                                             TootleAPIVisibility value)
{
	TootleAPIVisibility old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_settings_get_default_post_visibility (self);
	if (old_value != value) {
		self->priv->_default_post_visibility = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_settings_properties[TOOTLE_SETTINGS_DEFAULT_POST_VISIBILITY_PROPERTY]);
	}
}

gint
tootle_settings_get_timeline_page_size (TootleSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_timeline_page_size;
	return result;
}

void
tootle_settings_set_timeline_page_size (TootleSettings* self,
                                        gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_settings_get_timeline_page_size (self);
	if (old_value != value) {
		self->priv->_timeline_page_size = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_settings_properties[TOOTLE_SETTINGS_TIMELINE_PAGE_SIZE_PROPERTY]);
	}
}

gint
tootle_settings_get_post_text_size (TootleSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_post_text_size;
	return result;
}

void
tootle_settings_set_post_text_size (TootleSettings* self,
                                    gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_settings_get_post_text_size (self);
	if (old_value != value) {
		self->priv->_post_text_size = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_settings_properties[TOOTLE_SETTINGS_POST_TEXT_SIZE_PROPERTY]);
	}
}

gboolean
tootle_settings_get_live_updates (TootleSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_live_updates;
	return result;
}

void
tootle_settings_set_live_updates (TootleSettings* self,
                                  gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_settings_get_live_updates (self);
	if (old_value != value) {
		self->priv->_live_updates = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_settings_properties[TOOTLE_SETTINGS_LIVE_UPDATES_PROPERTY]);
	}
}

gboolean
tootle_settings_get_public_live_updates (TootleSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_public_live_updates;
	return result;
}

void
tootle_settings_set_public_live_updates (TootleSettings* self,
                                         gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_settings_get_public_live_updates (self);
	if (old_value != value) {
		self->priv->_public_live_updates = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_settings_properties[TOOTLE_SETTINGS_PUBLIC_LIVE_UPDATES_PROPERTY]);
	}
}

gboolean
tootle_settings_get_aggressive_resolving (TootleSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_aggressive_resolving;
	return result;
}

void
tootle_settings_set_aggressive_resolving (TootleSettings* self,
                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_settings_get_aggressive_resolving (self);
	if (old_value != value) {
		self->priv->_aggressive_resolving = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_settings_properties[TOOTLE_SETTINGS_AGGRESSIVE_RESOLVING_PROPERTY]);
	}
}

gint
tootle_settings_get_window_x (TootleSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_window_x;
	return result;
}

void
tootle_settings_set_window_x (TootleSettings* self,
                              gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_settings_get_window_x (self);
	if (old_value != value) {
		self->priv->_window_x = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_settings_properties[TOOTLE_SETTINGS_WINDOW_X_PROPERTY]);
	}
}

gint
tootle_settings_get_window_y (TootleSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_window_y;
	return result;
}

void
tootle_settings_set_window_y (TootleSettings* self,
                              gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_settings_get_window_y (self);
	if (old_value != value) {
		self->priv->_window_y = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_settings_properties[TOOTLE_SETTINGS_WINDOW_Y_PROPERTY]);
	}
}

gint
tootle_settings_get_window_w (TootleSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_window_w;
	return result;
}

void
tootle_settings_set_window_w (TootleSettings* self,
                              gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_settings_get_window_w (self);
	if (old_value != value) {
		self->priv->_window_w = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_settings_properties[TOOTLE_SETTINGS_WINDOW_W_PROPERTY]);
	}
}

gint
tootle_settings_get_window_h (TootleSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_window_h;
	return result;
}

void
tootle_settings_set_window_h (TootleSettings* self,
                              gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_settings_get_window_h (self);
	if (old_value != value) {
		self->priv->_window_h = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_settings_properties[TOOTLE_SETTINGS_WINDOW_H_PROPERTY]);
	}
}

static void
tootle_settings_class_init (TootleSettingsClass * klass,
                            gpointer klass_data)
{
	tootle_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TootleSettings_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tootle_settings_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tootle_settings_set_property;
	G_OBJECT_CLASS (klass)->finalize = tootle_settings_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_SETTINGS_CURRENT_ACCOUNT_PROPERTY, tootle_settings_properties[TOOTLE_SETTINGS_CURRENT_ACCOUNT_PROPERTY] = g_param_spec_int ("current-account", "current-account", "current-account", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_SETTINGS_DARK_THEME_PROPERTY, tootle_settings_properties[TOOTLE_SETTINGS_DARK_THEME_PROPERTY] = g_param_spec_boolean ("dark-theme", "dark-theme", "dark-theme", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_SETTINGS_AUTOSTART_PROPERTY, tootle_settings_properties[TOOTLE_SETTINGS_AUTOSTART_PROPERTY] = g_param_spec_boolean ("autostart", "autostart", "autostart", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_SETTINGS_WORK_IN_BACKGROUND_PROPERTY, tootle_settings_properties[TOOTLE_SETTINGS_WORK_IN_BACKGROUND_PROPERTY] = g_param_spec_boolean ("work-in-background", "work-in-background", "work-in-background", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_SETTINGS_DEFAULT_POST_VISIBILITY_PROPERTY, tootle_settings_properties[TOOTLE_SETTINGS_DEFAULT_POST_VISIBILITY_PROPERTY] = g_param_spec_enum ("default-post-visibility", "default-post-visibility", "default-post-visibility", TOOTLE_API_TYPE_VISIBILITY, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_SETTINGS_TIMELINE_PAGE_SIZE_PROPERTY, tootle_settings_properties[TOOTLE_SETTINGS_TIMELINE_PAGE_SIZE_PROPERTY] = g_param_spec_int ("timeline-page-size", "timeline-page-size", "timeline-page-size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_SETTINGS_POST_TEXT_SIZE_PROPERTY, tootle_settings_properties[TOOTLE_SETTINGS_POST_TEXT_SIZE_PROPERTY] = g_param_spec_int ("post-text-size", "post-text-size", "post-text-size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_SETTINGS_LIVE_UPDATES_PROPERTY, tootle_settings_properties[TOOTLE_SETTINGS_LIVE_UPDATES_PROPERTY] = g_param_spec_boolean ("live-updates", "live-updates", "live-updates", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_SETTINGS_PUBLIC_LIVE_UPDATES_PROPERTY, tootle_settings_properties[TOOTLE_SETTINGS_PUBLIC_LIVE_UPDATES_PROPERTY] = g_param_spec_boolean ("public-live-updates", "public-live-updates", "public-live-updates", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_SETTINGS_AGGRESSIVE_RESOLVING_PROPERTY, tootle_settings_properties[TOOTLE_SETTINGS_AGGRESSIVE_RESOLVING_PROPERTY] = g_param_spec_boolean ("aggressive-resolving", "aggressive-resolving", "aggressive-resolving", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_SETTINGS_WINDOW_X_PROPERTY, tootle_settings_properties[TOOTLE_SETTINGS_WINDOW_X_PROPERTY] = g_param_spec_int ("window-x", "window-x", "window-x", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_SETTINGS_WINDOW_Y_PROPERTY, tootle_settings_properties[TOOTLE_SETTINGS_WINDOW_Y_PROPERTY] = g_param_spec_int ("window-y", "window-y", "window-y", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_SETTINGS_WINDOW_W_PROPERTY, tootle_settings_properties[TOOTLE_SETTINGS_WINDOW_W_PROPERTY] = g_param_spec_int ("window-w", "window-w", "window-w", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_SETTINGS_WINDOW_H_PROPERTY, tootle_settings_properties[TOOTLE_SETTINGS_WINDOW_H_PROPERTY] = g_param_spec_int ("window-h", "window-h", "window-h", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tootle_settings_instance_init (TootleSettings * self,
                               gpointer klass)
{
	self->priv = tootle_settings_get_instance_private (self);
}

static void
tootle_settings_finalize (GObject * obj)
{
	TootleSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TOOTLE_TYPE_SETTINGS, TootleSettings);
	G_OBJECT_CLASS (tootle_settings_parent_class)->finalize (obj);
}

static GType
tootle_settings_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TootleSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tootle_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TootleSettings), 0, (GInstanceInitFunc) tootle_settings_instance_init, NULL };
	GType tootle_settings_type_id;
	tootle_settings_type_id = g_type_register_static (g_settings_get_type (), "TootleSettings", &g_define_type_info, 0);
	TootleSettings_private_offset = g_type_add_instance_private (tootle_settings_type_id, sizeof (TootleSettingsPrivate));
	return tootle_settings_type_id;
}

GType
tootle_settings_get_type (void)
{
	static volatile gsize tootle_settings_type_id__volatile = 0;
	if (g_once_init_enter (&tootle_settings_type_id__volatile)) {
		GType tootle_settings_type_id;
		tootle_settings_type_id = tootle_settings_get_type_once ();
		g_once_init_leave (&tootle_settings_type_id__volatile, tootle_settings_type_id);
	}
	return tootle_settings_type_id__volatile;
}

static void
_vala_tootle_settings_get_property (GObject * object,
                                    guint property_id,
                                    GValue * value,
                                    GParamSpec * pspec)
{
	TootleSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TOOTLE_TYPE_SETTINGS, TootleSettings);
	switch (property_id) {
		case TOOTLE_SETTINGS_CURRENT_ACCOUNT_PROPERTY:
		g_value_set_int (value, tootle_settings_get_current_account (self));
		break;
		case TOOTLE_SETTINGS_DARK_THEME_PROPERTY:
		g_value_set_boolean (value, tootle_settings_get_dark_theme (self));
		break;
		case TOOTLE_SETTINGS_AUTOSTART_PROPERTY:
		g_value_set_boolean (value, tootle_settings_get_autostart (self));
		break;
		case TOOTLE_SETTINGS_WORK_IN_BACKGROUND_PROPERTY:
		g_value_set_boolean (value, tootle_settings_get_work_in_background (self));
		break;
		case TOOTLE_SETTINGS_DEFAULT_POST_VISIBILITY_PROPERTY:
		g_value_set_enum (value, tootle_settings_get_default_post_visibility (self));
		break;
		case TOOTLE_SETTINGS_TIMELINE_PAGE_SIZE_PROPERTY:
		g_value_set_int (value, tootle_settings_get_timeline_page_size (self));
		break;
		case TOOTLE_SETTINGS_POST_TEXT_SIZE_PROPERTY:
		g_value_set_int (value, tootle_settings_get_post_text_size (self));
		break;
		case TOOTLE_SETTINGS_LIVE_UPDATES_PROPERTY:
		g_value_set_boolean (value, tootle_settings_get_live_updates (self));
		break;
		case TOOTLE_SETTINGS_PUBLIC_LIVE_UPDATES_PROPERTY:
		g_value_set_boolean (value, tootle_settings_get_public_live_updates (self));
		break;
		case TOOTLE_SETTINGS_AGGRESSIVE_RESOLVING_PROPERTY:
		g_value_set_boolean (value, tootle_settings_get_aggressive_resolving (self));
		break;
		case TOOTLE_SETTINGS_WINDOW_X_PROPERTY:
		g_value_set_int (value, tootle_settings_get_window_x (self));
		break;
		case TOOTLE_SETTINGS_WINDOW_Y_PROPERTY:
		g_value_set_int (value, tootle_settings_get_window_y (self));
		break;
		case TOOTLE_SETTINGS_WINDOW_W_PROPERTY:
		g_value_set_int (value, tootle_settings_get_window_w (self));
		break;
		case TOOTLE_SETTINGS_WINDOW_H_PROPERTY:
		g_value_set_int (value, tootle_settings_get_window_h (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tootle_settings_set_property (GObject * object,
                                    guint property_id,
                                    const GValue * value,
                                    GParamSpec * pspec)
{
	TootleSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TOOTLE_TYPE_SETTINGS, TootleSettings);
	switch (property_id) {
		case TOOTLE_SETTINGS_CURRENT_ACCOUNT_PROPERTY:
		tootle_settings_set_current_account (self, g_value_get_int (value));
		break;
		case TOOTLE_SETTINGS_DARK_THEME_PROPERTY:
		tootle_settings_set_dark_theme (self, g_value_get_boolean (value));
		break;
		case TOOTLE_SETTINGS_AUTOSTART_PROPERTY:
		tootle_settings_set_autostart (self, g_value_get_boolean (value));
		break;
		case TOOTLE_SETTINGS_WORK_IN_BACKGROUND_PROPERTY:
		tootle_settings_set_work_in_background (self, g_value_get_boolean (value));
		break;
		case TOOTLE_SETTINGS_DEFAULT_POST_VISIBILITY_PROPERTY:
		tootle_settings_set_default_post_visibility (self, g_value_get_enum (value));
		break;
		case TOOTLE_SETTINGS_TIMELINE_PAGE_SIZE_PROPERTY:
		tootle_settings_set_timeline_page_size (self, g_value_get_int (value));
		break;
		case TOOTLE_SETTINGS_POST_TEXT_SIZE_PROPERTY:
		tootle_settings_set_post_text_size (self, g_value_get_int (value));
		break;
		case TOOTLE_SETTINGS_LIVE_UPDATES_PROPERTY:
		tootle_settings_set_live_updates (self, g_value_get_boolean (value));
		break;
		case TOOTLE_SETTINGS_PUBLIC_LIVE_UPDATES_PROPERTY:
		tootle_settings_set_public_live_updates (self, g_value_get_boolean (value));
		break;
		case TOOTLE_SETTINGS_AGGRESSIVE_RESOLVING_PROPERTY:
		tootle_settings_set_aggressive_resolving (self, g_value_get_boolean (value));
		break;
		case TOOTLE_SETTINGS_WINDOW_X_PROPERTY:
		tootle_settings_set_window_x (self, g_value_get_int (value));
		break;
		case TOOTLE_SETTINGS_WINDOW_Y_PROPERTY:
		tootle_settings_set_window_y (self, g_value_get_int (value));
		break;
		case TOOTLE_SETTINGS_WINDOW_W_PROPERTY:
		tootle_settings_set_window_w (self, g_value_get_int (value));
		break;
		case TOOTLE_SETTINGS_WINDOW_H_PROPERTY:
		tootle_settings_set_window_h (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

