/* Disabled.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from Disabled.vala, do not modify */

/* Disabled.vala
 *
 * Copyright (C) 2009-2025 Jerry Casiano
 *
 * 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/gpl-3.0.txt>.
*/

#include <glib-object.h>
#include <json-glib/json-glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>
#include "font-manager.h"
#include <glib/gi18n-lib.h>

#define FONT_MANAGER_SELECT_FROM_FONTS "SELECT DISTINCT family, description FROM Fonts"
#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 FONT_MANAGER_TYPE_CACHEABLE (font_manager_cacheable_get_type ())
#define FONT_MANAGER_CACHEABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_CACHEABLE, FontManagerCacheable))
#define FONT_MANAGER_CACHEABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_CACHEABLE, FontManagerCacheableClass))
#define FONT_MANAGER_IS_CACHEABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_CACHEABLE))
#define FONT_MANAGER_IS_CACHEABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_CACHEABLE))
#define FONT_MANAGER_CACHEABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_CACHEABLE, FontManagerCacheableClass))

typedef struct _FontManagerCacheable FontManagerCacheable;
typedef struct _FontManagerCacheableClass FontManagerCacheableClass;
typedef struct _FontManagerCacheablePrivate FontManagerCacheablePrivate;

#define FONT_MANAGER_TYPE_FONT_LIST_FILTER (font_manager_font_list_filter_get_type ())
#define FONT_MANAGER_FONT_LIST_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_FONT_LIST_FILTER, FontManagerFontListFilter))
#define FONT_MANAGER_FONT_LIST_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_FONT_LIST_FILTER, FontManagerFontListFilterClass))
#define FONT_MANAGER_IS_FONT_LIST_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_FONT_LIST_FILTER))
#define FONT_MANAGER_IS_FONT_LIST_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_FONT_LIST_FILTER))
#define FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_FONT_LIST_FILTER, FontManagerFontListFilterClass))

typedef struct _FontManagerFontListFilter FontManagerFontListFilter;
typedef struct _FontManagerFontListFilterClass FontManagerFontListFilterClass;
typedef struct _FontManagerFontListFilterPrivate FontManagerFontListFilterPrivate;

#define FONT_MANAGER_TYPE_CATEGORY (font_manager_category_get_type ())
#define FONT_MANAGER_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_CATEGORY, FontManagerCategory))
#define FONT_MANAGER_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_CATEGORY, FontManagerCategoryClass))
#define FONT_MANAGER_IS_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_CATEGORY))
#define FONT_MANAGER_IS_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_CATEGORY))
#define FONT_MANAGER_CATEGORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_CATEGORY, FontManagerCategoryClass))

typedef struct _FontManagerCategory FontManagerCategory;
typedef struct _FontManagerCategoryClass FontManagerCategoryClass;
typedef struct _FontManagerCategoryPrivate FontManagerCategoryPrivate;

#define FONT_MANAGER_TYPE_DISABLED (font_manager_disabled_get_type ())
#define FONT_MANAGER_DISABLED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_DISABLED, FontManagerDisabled))
#define FONT_MANAGER_DISABLED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_DISABLED, FontManagerDisabledClass))
#define FONT_MANAGER_IS_DISABLED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_DISABLED))
#define FONT_MANAGER_IS_DISABLED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_DISABLED))
#define FONT_MANAGER_DISABLED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_DISABLED, FontManagerDisabledClass))

typedef struct _FontManagerDisabled FontManagerDisabled;
typedef struct _FontManagerDisabledClass FontManagerDisabledClass;
typedef struct _FontManagerDisabledPrivate FontManagerDisabledPrivate;
enum  {
	FONT_MANAGER_DISABLED_0_PROPERTY,
	FONT_MANAGER_DISABLED_DISABLED_FAMILIES_PROPERTY,
	FONT_MANAGER_DISABLED_NUM_PROPERTIES
};
static GParamSpec* font_manager_disabled_properties[FONT_MANAGER_DISABLED_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef enum  {
	FONT_MANAGER_CATEGORY_INDEX_ALL,
	FONT_MANAGER_CATEGORY_INDEX_SYSTEM,
	FONT_MANAGER_CATEGORY_INDEX_USER,
	FONT_MANAGER_CATEGORY_INDEX_PANOSE,
	FONT_MANAGER_CATEGORY_INDEX_WIDTH,
	FONT_MANAGER_CATEGORY_INDEX_WEIGHT,
	FONT_MANAGER_CATEGORY_INDEX_SLANT,
	FONT_MANAGER_CATEGORY_INDEX_SPACING,
	FONT_MANAGER_CATEGORY_INDEX_LICENSE,
	FONT_MANAGER_CATEGORY_INDEX_VENDOR,
	FONT_MANAGER_CATEGORY_INDEX_FILETYPE,
	FONT_MANAGER_CATEGORY_INDEX_UNSORTED,
	FONT_MANAGER_CATEGORY_INDEX_DISABLED,
	FONT_MANAGER_CATEGORY_INDEX_LANGUAGE,
	FONT_MANAGER_CATEGORY_INDEX_N_CATEGORIES
} FontManagerCategoryIndex;

#define FONT_MANAGER_TYPE_CATEGORY_INDEX (font_manager_category_index_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _FontManagerDisabledUpdateData FontManagerDisabledUpdateData;

struct _FontManagerCacheable {
	GObject parent_instance;
	FontManagerCacheablePrivate * priv;
};

struct _FontManagerCacheableClass {
	GObjectClass parent_class;
	gboolean (*deserialize_property) (FontManagerCacheable* self, const gchar* prop_name, GValue* val, GParamSpec* pspec, JsonNode* node);
	JsonNode* (*serialize_property) (FontManagerCacheable* self, const gchar* prop_name, GValue* val, GParamSpec* pspec);
};

struct _FontManagerFontListFilter {
	FontManagerCacheable parent_instance;
	FontManagerFontListFilterPrivate * priv;
};

struct _FontManagerFontListFilterClass {
	FontManagerCacheableClass parent_class;
	void (*update) (FontManagerFontListFilter* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*update_finish) (FontManagerFontListFilter* self, GAsyncResult* _res_);
	gboolean (*matches) (FontManagerFontListFilter* self, GObject* item);
	gchar* (*get_name) (FontManagerFontListFilter* self);
	void (*set_name) (FontManagerFontListFilter* self, const gchar* value);
	gchar* (*get_icon) (FontManagerFontListFilter* self);
	void (*set_icon) (FontManagerFontListFilter* self, const gchar* value);
	gchar* (*get_comment) (FontManagerFontListFilter* self);
	void (*set_comment) (FontManagerFontListFilter* self, const gchar* value);
	gint (*get_index) (FontManagerFontListFilter* self);
	void (*set_index) (FontManagerFontListFilter* self, gint value);
	gint (*get_size) (FontManagerFontListFilter* self);
	gint (*get_depth) (FontManagerFontListFilter* self);
	void (*set_depth) (FontManagerFontListFilter* self, gint value);
};

struct _FontManagerCategory {
	FontManagerFontListFilter parent_instance;
	FontManagerCategoryPrivate * priv;
};

struct _FontManagerCategoryClass {
	FontManagerFontListFilterClass parent_class;
};

struct _FontManagerDisabled {
	FontManagerCategory parent_instance;
	FontManagerDisabledPrivate * priv;
};

struct _FontManagerDisabledClass {
	FontManagerCategoryClass parent_class;
};

struct _FontManagerDisabledPrivate {
	FontManagerReject* _disabled_families;
};

struct _FontManagerDisabledUpdateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FontManagerDisabled* self;
	FontManagerStringSet* _tmp0_;
	FontManagerStringSet* _tmp1_;
	FontManagerStringSet* _tmp2_;
	FontManagerStringSet* _tmp3_;
	FontManagerDatabase* db;
	FontManagerDatabase* _tmp4_;
	FontManagerReject* _family_list;
	FontManagerReject* _tmp5_;
	guint _family_size;
	FontManagerReject* _tmp6_;
	guint _tmp7_;
	guint _tmp8_;
	gint _family_index;
	gint _tmp9_;
	guint _tmp10_;
	gchar* family;
	FontManagerReject* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* sql;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	FontManagerDatabase* _tmp20_;
	FontManagerStringSet* _tmp21_;
	FontManagerStringSet* _tmp22_;
	FontManagerStringSet* _tmp23_;
	FontManagerStringSet* _tmp24_;
	const gchar* _tmp25_;
	GError* e;
	GError* _tmp26_;
	const gchar* _tmp27_;
	GError* _inner_error0_;
};

static gint FontManagerDisabled_private_offset;
static gpointer font_manager_disabled_parent_class = NULL;

VALA_EXTERN GType font_manager_cacheable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerCacheable, g_object_unref)
VALA_EXTERN GType font_manager_font_list_filter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerFontListFilter, g_object_unref)
VALA_EXTERN GType font_manager_category_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerCategory, g_object_unref)
VALA_EXTERN GType font_manager_disabled_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerDisabled, g_object_unref)
VALA_EXTERN void font_manager_font_list_filter_update (FontManagerFontListFilter* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
VALA_EXTERN void font_manager_font_list_filter_update_finish (FontManagerFontListFilter* self,
                                                  GAsyncResult* _res_);
VALA_EXTERN FontManagerDisabled* font_manager_disabled_new (void);
VALA_EXTERN FontManagerDisabled* font_manager_disabled_construct (GType object_type);
VALA_EXTERN GType font_manager_category_index_get_type (void) G_GNUC_CONST ;
VALA_EXTERN FontManagerCategory* font_manager_category_new (const gchar* name,
                                                const gchar* comment,
                                                const gchar* icon,
                                                const gchar* sql,
                                                gint index);
VALA_EXTERN FontManagerCategory* font_manager_category_construct (GType object_type,
                                                      const gchar* name,
                                                      const gchar* comment,
                                                      const gchar* icon,
                                                      const gchar* sql,
                                                      gint index);
VALA_EXTERN FontManagerReject* font_manager_disabled_get_disabled_families (FontManagerDisabled* self);
static void font_manager_disabled_real_update_data_free (gpointer _data);
static void font_manager_disabled_real_update (FontManagerFontListFilter* base,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
static gboolean font_manager_disabled_real_update_co (FontManagerDisabledUpdateData* _data_);
VALA_EXTERN FontManagerStringSet* font_manager_category_get_families (FontManagerCategory* self);
VALA_EXTERN FontManagerStringSet* font_manager_category_get_variations (FontManagerCategory* self);
VALA_EXTERN FontManagerDatabase* font_manager_database_proxy_get_default_db (void);
VALA_EXTERN void font_manager_disabled_set_disabled_families (FontManagerDisabled* self,
                                                  FontManagerReject* value);
static void font_manager_disabled_finalize (GObject * obj);
static GType font_manager_disabled_get_type_once (void);
static void _vala_font_manager_disabled_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec);
static void _vala_font_manager_disabled_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
font_manager_disabled_get_instance_private (FontManagerDisabled* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerDisabled_private_offset);
}

FontManagerDisabled*
font_manager_disabled_construct (GType object_type)
{
	FontManagerDisabled * self = NULL;
	FontManagerReject* _tmp0_;
	self = (FontManagerDisabled*) font_manager_category_construct (object_type, _ ("Disabled"), _ ("Fonts which have been disabled"), "list-remove-symbolic", "", (gint) FONT_MANAGER_CATEGORY_INDEX_DISABLED);
	_tmp0_ = self->priv->_disabled_families;
	font_manager_selections_load ((FontManagerSelections*) _tmp0_);
	return self;
}

FontManagerDisabled*
font_manager_disabled_new (void)
{
	return font_manager_disabled_construct (FONT_MANAGER_TYPE_DISABLED);
}

static void
font_manager_disabled_real_update_data_free (gpointer _data)
{
	FontManagerDisabledUpdateData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FontManagerDisabledUpdateData, _data_);
}

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

static void
font_manager_disabled_real_update (FontManagerFontListFilter* base,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_)
{
	FontManagerDisabled * self;
	FontManagerDisabledUpdateData* _data_;
	FontManagerDisabled* _tmp0_;
	self = (FontManagerDisabled*) base;
	_data_ = g_slice_new0 (FontManagerDisabledUpdateData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, font_manager_disabled_real_update_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	font_manager_disabled_real_update_co (_data_);
}

static void
font_manager_disabled_update_finish (FontManagerFontListFilter* base,
                                     GAsyncResult* _res_)
{
	FontManagerDisabledUpdateData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

static gboolean
font_manager_disabled_real_update_co (FontManagerDisabledUpdateData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = font_manager_category_get_families ((FontManagerCategory*) _data_->self);
	_data_->_tmp1_ = _data_->_tmp0_;
	font_manager_string_set_clear (_data_->_tmp1_);
	_data_->_tmp2_ = font_manager_category_get_variations ((FontManagerCategory*) _data_->self);
	_data_->_tmp3_ = _data_->_tmp2_;
	font_manager_string_set_clear (_data_->_tmp3_);
	{
		_data_->_tmp4_ = font_manager_database_proxy_get_default_db ();
		_data_->db = _data_->_tmp4_;
		{
			_data_->_tmp5_ = _data_->self->priv->_disabled_families;
			_data_->_family_list = _data_->_tmp5_;
			_data_->_tmp6_ = _data_->_family_list;
			g_object_get ((FontManagerStringSet*) _data_->_tmp6_, "size", &_data_->_tmp7_, NULL);
			_data_->_tmp8_ = _data_->_tmp7_;
			_data_->_family_size = _data_->_tmp8_;
			_data_->_family_index = -1;
			while (TRUE) {
				_data_->_family_index = _data_->_family_index + 1;
				_data_->_tmp9_ = _data_->_family_index;
				_data_->_tmp10_ = _data_->_family_size;
				if (!(((guint) _data_->_tmp9_) < _data_->_tmp10_)) {
					break;
				}
				_data_->_tmp11_ = _data_->_family_list;
				_data_->_tmp12_ = font_manager_string_set_get ((FontManagerStringSet*) _data_->_tmp11_, (guint) _data_->_family_index);
				_data_->_tmp13_ = g_strdup (_data_->_tmp12_);
				_data_->family = _data_->_tmp13_;
				_data_->_tmp14_ = _data_->family;
				_data_->_tmp15_ = string_replace (_data_->_tmp14_, "'", "''");
				_g_free0 (_data_->family);
				_data_->family = _data_->_tmp15_;
				_data_->_tmp16_ = string_to_string (FONT_MANAGER_SELECT_FROM_FONTS);
				_data_->_tmp17_ = _data_->family;
				_data_->_tmp18_ = string_to_string (_data_->_tmp17_);
				_data_->_tmp19_ = g_strconcat (_data_->_tmp16_, " WHERE family='", _data_->_tmp18_, "';", NULL);
				_data_->sql = _data_->_tmp19_;
				_data_->_tmp20_ = _data_->db;
				_data_->_tmp21_ = font_manager_category_get_families ((FontManagerCategory*) _data_->self);
				_data_->_tmp22_ = _data_->_tmp21_;
				_data_->_tmp23_ = font_manager_category_get_variations ((FontManagerCategory*) _data_->self);
				_data_->_tmp24_ = _data_->_tmp23_;
				_data_->_tmp25_ = _data_->sql;
				font_manager_get_matching_families_and_fonts (_data_->_tmp20_, _data_->_tmp22_, _data_->_tmp24_, _data_->_tmp25_, &_data_->_inner_error0_);
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					_g_free0 (_data_->sql);
					_g_free0 (_data_->family);
					_g_object_unref0 (_data_->db);
					goto __catch0_g_error;
				}
				_g_free0 (_data_->sql);
				_g_free0 (_data_->family);
			}
		}
		_g_object_unref0 (_data_->db);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp26_ = _data_->e;
		_data_->_tmp27_ = _data_->_tmp26_->message;
		g_warning ("Disabled.vala:47: %s", _data_->_tmp27_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_signal_emit_by_name ((FontManagerCacheable*) _data_->self, "changed");
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

FontManagerReject*
font_manager_disabled_get_disabled_families (FontManagerDisabled* self)
{
	FontManagerReject* result;
	FontManagerReject* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_disabled_families;
	result = _tmp0_;
	return result;
}

void
font_manager_disabled_set_disabled_families (FontManagerDisabled* self,
                                             FontManagerReject* value)
{
	FontManagerReject* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_disabled_get_disabled_families (self);
	if (old_value != value) {
		FontManagerReject* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_disabled_families);
		self->priv->_disabled_families = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_disabled_properties[FONT_MANAGER_DISABLED_DISABLED_FAMILIES_PROPERTY]);
	}
}

static void
font_manager_disabled_class_init (FontManagerDisabledClass * klass,
                                  gpointer klass_data)
{
	font_manager_disabled_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerDisabled_private_offset);
	((FontManagerFontListFilterClass *) klass)->update = (void (*) (FontManagerFontListFilter*, GAsyncReadyCallback, gpointer)) font_manager_disabled_real_update;
	((FontManagerFontListFilterClass *) klass)->update_finish = (void (*) (FontManagerFontListFilter*, GAsyncResult*)) font_manager_disabled_update_finish;
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_disabled_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_disabled_set_property;
	G_OBJECT_CLASS (klass)->finalize = font_manager_disabled_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_DISABLED_DISABLED_FAMILIES_PROPERTY, font_manager_disabled_properties[FONT_MANAGER_DISABLED_DISABLED_FAMILIES_PROPERTY] = g_param_spec_object ("disabled-families", "disabled-families", "disabled-families", font_manager_reject_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
font_manager_disabled_instance_init (FontManagerDisabled * self,
                                     gpointer klass)
{
	FontManagerReject* _tmp0_;
	self->priv = font_manager_disabled_get_instance_private (self);
	_tmp0_ = font_manager_reject_new ();
	self->priv->_disabled_families = _tmp0_;
}

static void
font_manager_disabled_finalize (GObject * obj)
{
	FontManagerDisabled * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_DISABLED, FontManagerDisabled);
	_g_object_unref0 (self->priv->_disabled_families);
	G_OBJECT_CLASS (font_manager_disabled_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_disabled_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerDisabledClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_disabled_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerDisabled), 0, (GInstanceInitFunc) font_manager_disabled_instance_init, NULL };
	GType font_manager_disabled_type_id;
	font_manager_disabled_type_id = g_type_register_static (FONT_MANAGER_TYPE_CATEGORY, "FontManagerDisabled", &g_define_type_info, 0);
	FontManagerDisabled_private_offset = g_type_add_instance_private (font_manager_disabled_type_id, sizeof (FontManagerDisabledPrivate));
	return font_manager_disabled_type_id;
}

GType
font_manager_disabled_get_type (void)
{
	static volatile gsize font_manager_disabled_type_id__once = 0;
	if (g_once_init_enter (&font_manager_disabled_type_id__once)) {
		GType font_manager_disabled_type_id;
		font_manager_disabled_type_id = font_manager_disabled_get_type_once ();
		g_once_init_leave (&font_manager_disabled_type_id__once, font_manager_disabled_type_id);
	}
	return font_manager_disabled_type_id__once;
}

static void
_vala_font_manager_disabled_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec)
{
	FontManagerDisabled * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_DISABLED, FontManagerDisabled);
	switch (property_id) {
		case FONT_MANAGER_DISABLED_DISABLED_FAMILIES_PROPERTY:
		g_value_set_object (value, font_manager_disabled_get_disabled_families (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_disabled_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec)
{
	FontManagerDisabled * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_DISABLED, FontManagerDisabled);
	switch (property_id) {
		case FONT_MANAGER_DISABLED_DISABLED_FAMILIES_PROPERTY:
		font_manager_disabled_set_disabled_families (self, g_value_get_object (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;
}

