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

/* Sidebar.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 <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include "font-manager.h"
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>
#include <json-glib/json-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 FONT_MANAGER_TYPE_SIDEBAR_CONTROLS (font_manager_sidebar_controls_get_type ())
#define FONT_MANAGER_SIDEBAR_CONTROLS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_SIDEBAR_CONTROLS, FontManagerSidebarControls))
#define FONT_MANAGER_SIDEBAR_CONTROLS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_SIDEBAR_CONTROLS, FontManagerSidebarControlsClass))
#define FONT_MANAGER_IS_SIDEBAR_CONTROLS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_SIDEBAR_CONTROLS))
#define FONT_MANAGER_IS_SIDEBAR_CONTROLS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_SIDEBAR_CONTROLS))
#define FONT_MANAGER_SIDEBAR_CONTROLS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_SIDEBAR_CONTROLS, FontManagerSidebarControlsClass))

typedef struct _FontManagerSidebarControls FontManagerSidebarControls;
typedef struct _FontManagerSidebarControlsClass FontManagerSidebarControlsClass;
typedef struct _FontManagerSidebarControlsPrivate FontManagerSidebarControlsPrivate;
enum  {
	FONT_MANAGER_SIDEBAR_CONTROLS_0_PROPERTY,
	FONT_MANAGER_SIDEBAR_CONTROLS_ADD_BUTTON_PROPERTY,
	FONT_MANAGER_SIDEBAR_CONTROLS_REMOVE_BUTTON_PROPERTY,
	FONT_MANAGER_SIDEBAR_CONTROLS_EDIT_BUTTON_PROPERTY,
	FONT_MANAGER_SIDEBAR_CONTROLS_REMOVABLE_PROPERTY,
	FONT_MANAGER_SIDEBAR_CONTROLS_EDITABLE_PROPERTY,
	FONT_MANAGER_SIDEBAR_CONTROLS_NUM_PROPERTIES
};
static GParamSpec* font_manager_sidebar_controls_properties[FONT_MANAGER_SIDEBAR_CONTROLS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	FONT_MANAGER_SIDEBAR_CONTROLS_ADD_SELECTED_SIGNAL,
	FONT_MANAGER_SIDEBAR_CONTROLS_REMOVE_SELECTED_SIGNAL,
	FONT_MANAGER_SIDEBAR_CONTROLS_EDIT_SELECTED_SIGNAL,
	FONT_MANAGER_SIDEBAR_CONTROLS_NUM_SIGNALS
};
static guint font_manager_sidebar_controls_signals[FONT_MANAGER_SIDEBAR_CONTROLS_NUM_SIGNALS] = {0};

#define FONT_MANAGER_TYPE_SIDEBAR (font_manager_sidebar_get_type ())
#define FONT_MANAGER_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_SIDEBAR, FontManagerSidebar))
#define FONT_MANAGER_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_SIDEBAR, FontManagerSidebarClass))
#define FONT_MANAGER_IS_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_SIDEBAR))
#define FONT_MANAGER_IS_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_SIDEBAR))
#define FONT_MANAGER_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_SIDEBAR, FontManagerSidebarClass))

typedef struct _FontManagerSidebar FontManagerSidebar;
typedef struct _FontManagerSidebarClass FontManagerSidebarClass;
typedef struct _FontManagerSidebarPrivate FontManagerSidebarPrivate;

#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;

#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 enum  {
	FONT_MANAGER_SORT_TYPE_NAME,
	FONT_MANAGER_SORT_TYPE_SIZE,
	FONT_MANAGER_SORT_TYPE_NONE,
	FONT_MANAGER_SORT_TYPE_N_SORT_OPTIONS
} FontManagerSortType;

#define FONT_MANAGER_TYPE_SORT_TYPE (font_manager_sort_type_get_type ())

#define FONT_MANAGER_TYPE_FILTER_LIST_VIEW (font_manager_filter_list_view_get_type ())
#define FONT_MANAGER_FILTER_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_FILTER_LIST_VIEW, FontManagerFilterListView))
#define FONT_MANAGER_FILTER_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_FILTER_LIST_VIEW, FontManagerFilterListViewClass))
#define FONT_MANAGER_IS_FILTER_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_FILTER_LIST_VIEW))
#define FONT_MANAGER_IS_FILTER_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_FILTER_LIST_VIEW))
#define FONT_MANAGER_FILTER_LIST_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_FILTER_LIST_VIEW, FontManagerFilterListViewClass))

typedef struct _FontManagerFilterListView FontManagerFilterListView;
typedef struct _FontManagerFilterListViewClass FontManagerFilterListViewClass;

#define FONT_MANAGER_TYPE_CATEGORY_LIST_VIEW (font_manager_category_list_view_get_type ())
#define FONT_MANAGER_CATEGORY_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_CATEGORY_LIST_VIEW, FontManagerCategoryListView))
#define FONT_MANAGER_CATEGORY_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_CATEGORY_LIST_VIEW, FontManagerCategoryListViewClass))
#define FONT_MANAGER_IS_CATEGORY_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_CATEGORY_LIST_VIEW))
#define FONT_MANAGER_IS_CATEGORY_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_CATEGORY_LIST_VIEW))
#define FONT_MANAGER_CATEGORY_LIST_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_CATEGORY_LIST_VIEW, FontManagerCategoryListViewClass))

typedef struct _FontManagerCategoryListView FontManagerCategoryListView;
typedef struct _FontManagerCategoryListViewClass FontManagerCategoryListViewClass;

#define FONT_MANAGER_TYPE_COLLECTION_LIST_VIEW (font_manager_collection_list_view_get_type ())
#define FONT_MANAGER_COLLECTION_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_COLLECTION_LIST_VIEW, FontManagerCollectionListView))
#define FONT_MANAGER_COLLECTION_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_COLLECTION_LIST_VIEW, FontManagerCollectionListViewClass))
#define FONT_MANAGER_IS_COLLECTION_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_COLLECTION_LIST_VIEW))
#define FONT_MANAGER_IS_COLLECTION_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_COLLECTION_LIST_VIEW))
#define FONT_MANAGER_COLLECTION_LIST_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_COLLECTION_LIST_VIEW, FontManagerCollectionListViewClass))

typedef struct _FontManagerCollectionListView FontManagerCollectionListView;
typedef struct _FontManagerCollectionListViewClass FontManagerCollectionListViewClass;
enum  {
	FONT_MANAGER_SIDEBAR_0_PROPERTY,
	FONT_MANAGER_SIDEBAR_FILTER_PROPERTY,
	FONT_MANAGER_SIDEBAR_AVAILABLE_FONTS_PROPERTY,
	FONT_MANAGER_SIDEBAR_DISABLED_FAMILIES_PROPERTY,
	FONT_MANAGER_SIDEBAR_SORT_TYPE_PROPERTY,
	FONT_MANAGER_SIDEBAR_CATEGORY_MODEL_PROPERTY,
	FONT_MANAGER_SIDEBAR_COLLECTION_MODEL_PROPERTY,
	FONT_MANAGER_SIDEBAR_NUM_PROPERTIES
};
static GParamSpec* font_manager_sidebar_properties[FONT_MANAGER_SIDEBAR_NUM_PROPERTIES];
#define _json_array_unref0(var) ((var == NULL) ? NULL : (var = (json_array_unref (var), NULL)))

#define FONT_MANAGER_TYPE_FONT_LIST_FILTER_MODEL (font_manager_font_list_filter_model_get_type ())
#define FONT_MANAGER_FONT_LIST_FILTER_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_FONT_LIST_FILTER_MODEL, FontManagerFontListFilterModel))
#define FONT_MANAGER_FONT_LIST_FILTER_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_FONT_LIST_FILTER_MODEL, FontManagerFontListFilterModelClass))
#define FONT_MANAGER_IS_FONT_LIST_FILTER_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_FONT_LIST_FILTER_MODEL))
#define FONT_MANAGER_IS_FONT_LIST_FILTER_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_FONT_LIST_FILTER_MODEL))
#define FONT_MANAGER_FONT_LIST_FILTER_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_FONT_LIST_FILTER_MODEL, FontManagerFontListFilterModelClass))

typedef struct _FontManagerFontListFilterModel FontManagerFontListFilterModel;
typedef struct _FontManagerFontListFilterModelClass FontManagerFontListFilterModelClass;

#define FONT_MANAGER_TYPE_COLLECTION_LIST_MODEL (font_manager_collection_list_model_get_type ())
#define FONT_MANAGER_COLLECTION_LIST_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_COLLECTION_LIST_MODEL, FontManagerCollectionListModel))
#define FONT_MANAGER_COLLECTION_LIST_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_COLLECTION_LIST_MODEL, FontManagerCollectionListModelClass))
#define FONT_MANAGER_IS_COLLECTION_LIST_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_COLLECTION_LIST_MODEL))
#define FONT_MANAGER_IS_COLLECTION_LIST_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_COLLECTION_LIST_MODEL))
#define FONT_MANAGER_COLLECTION_LIST_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_COLLECTION_LIST_MODEL, FontManagerCollectionListModelClass))

typedef struct _FontManagerCollectionListModel FontManagerCollectionListModel;
typedef struct _FontManagerCollectionListModelClass FontManagerCollectionListModelClass;

#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;

#define FONT_MANAGER_TYPE_LANGUAGE_FILTER (font_manager_language_filter_get_type ())
#define FONT_MANAGER_LANGUAGE_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_LANGUAGE_FILTER, FontManagerLanguageFilter))
#define FONT_MANAGER_LANGUAGE_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_LANGUAGE_FILTER, FontManagerLanguageFilterClass))
#define FONT_MANAGER_IS_LANGUAGE_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_LANGUAGE_FILTER))
#define FONT_MANAGER_IS_LANGUAGE_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_LANGUAGE_FILTER))
#define FONT_MANAGER_LANGUAGE_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_LANGUAGE_FILTER, FontManagerLanguageFilterClass))

typedef struct _FontManagerLanguageFilter FontManagerLanguageFilter;
typedef struct _FontManagerLanguageFilterClass FontManagerLanguageFilterClass;

#define FONT_MANAGER_TYPE_MAIN_WINDOW (font_manager_main_window_get_type ())
#define FONT_MANAGER_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_MAIN_WINDOW, FontManagerMainWindow))
#define FONT_MANAGER_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_MAIN_WINDOW, FontManagerMainWindowClass))
#define FONT_MANAGER_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_MAIN_WINDOW))
#define FONT_MANAGER_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_MAIN_WINDOW))
#define FONT_MANAGER_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_MAIN_WINDOW, FontManagerMainWindowClass))

typedef struct _FontManagerMainWindow FontManagerMainWindow;
typedef struct _FontManagerMainWindowClass FontManagerMainWindowClass;

#define FONT_MANAGER_TYPE_APPLICATION (font_manager_application_get_type ())
#define FONT_MANAGER_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_APPLICATION, FontManagerApplication))
#define FONT_MANAGER_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_APPLICATION, FontManagerApplicationClass))
#define FONT_MANAGER_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_APPLICATION))
#define FONT_MANAGER_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_APPLICATION))
#define FONT_MANAGER_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_APPLICATION, FontManagerApplicationClass))

typedef struct _FontManagerApplication FontManagerApplication;
typedef struct _FontManagerApplicationClass FontManagerApplicationClass;

#define FONT_MANAGER_TYPE_LANGUAGE_FILTER_SETTINGS (font_manager_language_filter_settings_get_type ())
#define FONT_MANAGER_LANGUAGE_FILTER_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_LANGUAGE_FILTER_SETTINGS, FontManagerLanguageFilterSettings))
#define FONT_MANAGER_LANGUAGE_FILTER_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_LANGUAGE_FILTER_SETTINGS, FontManagerLanguageFilterSettingsClass))
#define FONT_MANAGER_IS_LANGUAGE_FILTER_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_LANGUAGE_FILTER_SETTINGS))
#define FONT_MANAGER_IS_LANGUAGE_FILTER_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_LANGUAGE_FILTER_SETTINGS))
#define FONT_MANAGER_LANGUAGE_FILTER_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_LANGUAGE_FILTER_SETTINGS, FontManagerLanguageFilterSettingsClass))

typedef struct _FontManagerLanguageFilterSettings FontManagerLanguageFilterSettings;
typedef struct _FontManagerLanguageFilterSettingsClass FontManagerLanguageFilterSettingsClass;

#define FONT_MANAGER_TYPE_LANGUAGE_SETTINGS_DIALOG (font_manager_language_settings_dialog_get_type ())
#define FONT_MANAGER_LANGUAGE_SETTINGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_LANGUAGE_SETTINGS_DIALOG, FontManagerLanguageSettingsDialog))
#define FONT_MANAGER_LANGUAGE_SETTINGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_LANGUAGE_SETTINGS_DIALOG, FontManagerLanguageSettingsDialogClass))
#define FONT_MANAGER_IS_LANGUAGE_SETTINGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_LANGUAGE_SETTINGS_DIALOG))
#define FONT_MANAGER_IS_LANGUAGE_SETTINGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_LANGUAGE_SETTINGS_DIALOG))
#define FONT_MANAGER_LANGUAGE_SETTINGS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_LANGUAGE_SETTINGS_DIALOG, FontManagerLanguageSettingsDialogClass))

typedef struct _FontManagerLanguageSettingsDialog FontManagerLanguageSettingsDialog;
typedef struct _FontManagerLanguageSettingsDialogClass FontManagerLanguageSettingsDialogClass;

#define FONT_MANAGER_TYPE_COLLECTION (font_manager_collection_get_type ())
#define FONT_MANAGER_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_COLLECTION, FontManagerCollection))
#define FONT_MANAGER_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_COLLECTION, FontManagerCollectionClass))
#define FONT_MANAGER_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_COLLECTION))
#define FONT_MANAGER_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_COLLECTION))
#define FONT_MANAGER_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_COLLECTION, FontManagerCollectionClass))

typedef struct _FontManagerCollection FontManagerCollection;
typedef struct _FontManagerCollectionClass FontManagerCollectionClass;

#define FONT_MANAGER_TYPE_CATEGORY_LIST_MODEL (font_manager_category_list_model_get_type ())
#define FONT_MANAGER_CATEGORY_LIST_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_CATEGORY_LIST_MODEL, FontManagerCategoryListModel))
#define FONT_MANAGER_CATEGORY_LIST_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_CATEGORY_LIST_MODEL, FontManagerCategoryListModelClass))
#define FONT_MANAGER_IS_CATEGORY_LIST_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_CATEGORY_LIST_MODEL))
#define FONT_MANAGER_IS_CATEGORY_LIST_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_CATEGORY_LIST_MODEL))
#define FONT_MANAGER_CATEGORY_LIST_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_CATEGORY_LIST_MODEL, FontManagerCategoryListModelClass))

typedef struct _FontManagerCategoryListModel FontManagerCategoryListModel;
typedef struct _FontManagerCategoryListModelClass FontManagerCategoryListModelClass;
enum  {
	FONT_MANAGER_SIDEBAR_CHANGED_SIGNAL,
	FONT_MANAGER_SIDEBAR_NUM_SIGNALS
};
static guint font_manager_sidebar_signals[FONT_MANAGER_SIDEBAR_NUM_SIGNALS] = {0};

#define FONT_MANAGER_TYPE_SIDEBAR_STACK (font_manager_sidebar_stack_get_type ())
#define FONT_MANAGER_SIDEBAR_STACK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_SIDEBAR_STACK, FontManagerSidebarStack))
#define FONT_MANAGER_SIDEBAR_STACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_SIDEBAR_STACK, FontManagerSidebarStackClass))
#define FONT_MANAGER_IS_SIDEBAR_STACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_SIDEBAR_STACK))
#define FONT_MANAGER_IS_SIDEBAR_STACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_SIDEBAR_STACK))
#define FONT_MANAGER_SIDEBAR_STACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_SIDEBAR_STACK, FontManagerSidebarStackClass))

typedef struct _FontManagerSidebarStack FontManagerSidebarStack;
typedef struct _FontManagerSidebarStackClass FontManagerSidebarStackClass;
typedef struct _FontManagerSidebarStackPrivate FontManagerSidebarStackPrivate;

#define FONT_MANAGER_TYPE_ORTHOGRAPHY_LIST (font_manager_orthography_list_get_type ())
#define FONT_MANAGER_ORTHOGRAPHY_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_ORTHOGRAPHY_LIST, FontManagerOrthographyList))
#define FONT_MANAGER_ORTHOGRAPHY_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_ORTHOGRAPHY_LIST, FontManagerOrthographyListClass))
#define FONT_MANAGER_IS_ORTHOGRAPHY_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_ORTHOGRAPHY_LIST))
#define FONT_MANAGER_IS_ORTHOGRAPHY_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_ORTHOGRAPHY_LIST))
#define FONT_MANAGER_ORTHOGRAPHY_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_ORTHOGRAPHY_LIST, FontManagerOrthographyListClass))

typedef struct _FontManagerOrthographyList FontManagerOrthographyList;
typedef struct _FontManagerOrthographyListClass FontManagerOrthographyListClass;
enum  {
	FONT_MANAGER_SIDEBAR_STACK_0_PROPERTY,
	FONT_MANAGER_SIDEBAR_STACK_SELECTED_ITEM_PROPERTY,
	FONT_MANAGER_SIDEBAR_STACK_SETTINGS_PROPERTY,
	FONT_MANAGER_SIDEBAR_STACK_FILTER_PROPERTY,
	FONT_MANAGER_SIDEBAR_STACK_AVAILABLE_FONTS_PROPERTY,
	FONT_MANAGER_SIDEBAR_STACK_DISABLED_FAMILIES_PROPERTY,
	FONT_MANAGER_SIDEBAR_STACK_SELECTED_ORTHOGRAPHY_PROPERTY,
	FONT_MANAGER_SIDEBAR_STACK_MODE_PROPERTY,
	FONT_MANAGER_SIDEBAR_STACK_CATEGORY_MODEL_PROPERTY,
	FONT_MANAGER_SIDEBAR_STACK_COLLECTION_MODEL_PROPERTY,
	FONT_MANAGER_SIDEBAR_STACK_NUM_PROPERTIES
};
static GParamSpec* font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_NUM_PROPERTIES];
enum  {
	FONT_MANAGER_SIDEBAR_STACK_CHANGED_SIGNAL,
	FONT_MANAGER_SIDEBAR_STACK_NUM_SIGNALS
};
static guint font_manager_sidebar_stack_signals[FONT_MANAGER_SIDEBAR_STACK_NUM_SIGNALS] = {0};
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _FontManagerSidebarControls {
	GtkBox parent_instance;
	FontManagerSidebarControlsPrivate * priv;
};

struct _FontManagerSidebarControlsClass {
	GtkBoxClass parent_class;
};

struct _FontManagerSidebarControlsPrivate {
	GtkButton* _add_button;
	GtkButton* _remove_button;
	GtkButton* _edit_button;
};

struct _FontManagerSidebar {
	GtkBox parent_instance;
	FontManagerSidebarPrivate * priv;
};

struct _FontManagerSidebarClass {
	GtkBoxClass parent_class;
};

struct _FontManagerSidebarPrivate {
	FontManagerFontListFilter* _filter;
	JsonArray* _available_fonts;
	FontManagerReject* _disabled_families;
	FontManagerSortType _sort_type;
	FontManagerSidebarControls* controls;
	FontManagerCategoryListView* categories;
	FontManagerCollectionListView* collections;
	GtkMenuButton* collection_sort_type;
};

struct _FontManagerSidebarStack {
	GtkBox parent_instance;
	FontManagerSidebarStackPrivate * priv;
};

struct _FontManagerSidebarStackClass {
	GtkBoxClass parent_class;
};

struct _FontManagerSidebarStackPrivate {
	GObject* _selected_item;
	GSettings* _settings;
	FontManagerFontListFilter* _filter;
	JsonArray* _available_fonts;
	FontManagerReject* _disabled_families;
	FontManagerOrthography* _selected_orthography;
	GtkStack* stack;
	FontManagerSidebar* sidebar;
	FontManagerOrthographyList* orthographies;
};

static gint FontManagerSidebarControls_private_offset;
static gpointer font_manager_sidebar_controls_parent_class = NULL;
static gint FontManagerSidebar_private_offset;
static gpointer font_manager_sidebar_parent_class = NULL;
static gint FontManagerSidebarStack_private_offset;
static gpointer font_manager_sidebar_stack_parent_class = NULL;

VALA_EXTERN GType font_manager_sidebar_controls_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerSidebarControls, g_object_unref)
VALA_EXTERN FontManagerSidebarControls* font_manager_sidebar_controls_new (void);
VALA_EXTERN FontManagerSidebarControls* font_manager_sidebar_controls_construct (GType object_type);
VALA_EXTERN GtkButton* font_manager_sidebar_controls_get_add_button (FontManagerSidebarControls* self);
VALA_EXTERN void font_manager_sidebar_controls_set_add_button (FontManagerSidebarControls* self,
                                                   GtkButton* value);
VALA_EXTERN GtkButton* font_manager_sidebar_controls_get_remove_button (FontManagerSidebarControls* self);
VALA_EXTERN void font_manager_sidebar_controls_set_remove_button (FontManagerSidebarControls* self,
                                                      GtkButton* value);
VALA_EXTERN GtkButton* font_manager_sidebar_controls_get_edit_button (FontManagerSidebarControls* self);
VALA_EXTERN void font_manager_sidebar_controls_set_edit_button (FontManagerSidebarControls* self,
                                                    GtkButton* value);
VALA_EXTERN gboolean font_manager_sidebar_controls_get_removable (FontManagerSidebarControls* self);
VALA_EXTERN void font_manager_sidebar_controls_set_removable (FontManagerSidebarControls* self,
                                                  gboolean value);
VALA_EXTERN void font_manager_set_control_sensitivity (GtkWidget* widget,
                                           gboolean sensitive);
VALA_EXTERN gboolean font_manager_sidebar_controls_get_editable (FontManagerSidebarControls* self);
VALA_EXTERN void font_manager_sidebar_controls_set_editable (FontManagerSidebarControls* self,
                                                 gboolean value);
static GObject * font_manager_sidebar_controls_constructor (GType type,
                                                     guint n_construct_properties,
                                                     GObjectConstructParam * construct_properties);
static void _font_manager_sidebar_controls___lambda21_ (FontManagerSidebarControls* self,
                                                 GtkButton* w);
static void __font_manager_sidebar_controls___lambda21__gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self);
static void _font_manager_sidebar_controls___lambda22_ (FontManagerSidebarControls* self);
static void __font_manager_sidebar_controls___lambda22__gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self);
static void _font_manager_sidebar_controls___lambda23_ (FontManagerSidebarControls* self);
static void __font_manager_sidebar_controls___lambda23__gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self);
static void font_manager_sidebar_controls_finalize (GObject * obj);
static GType font_manager_sidebar_controls_get_type_once (void);
static void _vala_font_manager_sidebar_controls_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_font_manager_sidebar_controls_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);
VALA_EXTERN GType font_manager_sidebar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerSidebar, g_object_unref)
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_sort_type_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType font_manager_filter_list_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerFilterListView, g_object_unref)
VALA_EXTERN GType font_manager_category_list_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerCategoryListView, g_object_unref)
VALA_EXTERN GType font_manager_collection_list_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerCollectionListView, g_object_unref)
VALA_EXTERN FontManagerSidebar* font_manager_sidebar_new (void);
VALA_EXTERN FontManagerSidebar* font_manager_sidebar_construct (GType object_type);
VALA_EXTERN GType font_manager_font_list_filter_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerFontListFilterModel, g_object_unref)
VALA_EXTERN GType font_manager_collection_list_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerCollectionListModel, g_object_unref)
VALA_EXTERN FontManagerCollectionListModel* font_manager_sidebar_get_collection_model (FontManagerSidebar* self);
static void font_manager_sidebar_on_category_changed (FontManagerSidebar* self,
                                               FontManagerFontListFilter* item);
static void _font_manager_sidebar_on_category_changed_font_manager_filter_list_view_selection_changed (FontManagerFilterListView* _sender,
                                                                                                FontManagerFontListFilter* item,
                                                                                                gpointer self);
static void font_manager_sidebar_on_collection_changed (FontManagerSidebar* self,
                                                 FontManagerFontListFilter* item);
static void _font_manager_sidebar_on_collection_changed_font_manager_filter_list_view_selection_changed (FontManagerFilterListView* _sender,
                                                                                                  FontManagerFontListFilter* item,
                                                                                                  gpointer self);
static void font_manager_sidebar_on_add_selected (FontManagerSidebar* self);
static void _font_manager_sidebar_on_add_selected_font_manager_sidebar_controls_add_selected (FontManagerSidebarControls* _sender,
                                                                                       gpointer self);
static void font_manager_sidebar_on_remove_selected (FontManagerSidebar* self);
static void _font_manager_sidebar_on_remove_selected_font_manager_sidebar_controls_remove_selected (FontManagerSidebarControls* _sender,
                                                                                             gpointer self);
static void font_manager_sidebar_on_edit_selected (FontManagerSidebar* self);
static void _font_manager_sidebar_on_edit_selected_font_manager_sidebar_controls_edit_selected (FontManagerSidebarControls* _sender,
                                                                                         gpointer self);
VALA_EXTERN GtkSingleSelection* font_manager_filter_list_view_get_selection (FontManagerFilterListView* self);
VALA_EXTERN GMenuModel* font_manager_get_sort_type_menu_model (void);
static void __lambda71_ (FontManagerSidebar* self);
static FontManagerStringSet* font_manager_sidebar_get_available_sorted (FontManagerSidebar* self);
VALA_EXTERN void font_manager_category_list_view_set_sorted (FontManagerCategoryListView* self,
                                                 FontManagerStringSet* value);
static void ___lambda71__gtk_widget_map (GtkWidget* _sender,
                                  gpointer self);
static void __lambda72_ (FontManagerSidebar* self);
static void ___lambda72__font_manager_collection_list_view_changed (FontManagerCollectionListView* _sender,
                                                             gpointer self);
VALA_EXTERN FontManagerFontListFilterModel* font_manager_filter_list_view_get_model (FontManagerFilterListView* self);
VALA_EXTERN FontManagerStringSet* font_manager_collection_list_model_get_full_contents (FontManagerCollectionListModel* self);
VALA_EXTERN gboolean font_manager_load_user_font_resources (void);
VALA_EXTERN void font_manager_sidebar_select_first_row (FontManagerSidebar* self);
VALA_EXTERN void font_manager_category_list_view_select_item (FontManagerCategoryListView* self,
                                                  guint position);
VALA_EXTERN void font_manager_sidebar_update_collections (FontManagerSidebar* self);
VALA_EXTERN void font_manager_collection_list_view_queue_update (FontManagerCollectionListView* self);
VALA_EXTERN void font_manager_collection_list_view_save (FontManagerCollectionListView* self);
VALA_EXTERN void font_manager_collection_list_view_add_new_collection (FontManagerCollectionListView* self);
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_language_filter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerLanguageFilter, g_object_unref)
VALA_EXTERN FontManagerLanguageFilter* font_manager_category_list_view_get_language_filter (FontManagerCategoryListView* self);
VALA_EXTERN GType font_manager_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerMainWindow, g_object_unref)
VALA_EXTERN GType font_manager_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerApplication, g_object_unref)
VALA_EXTERN guint font_manager_application_register_object (void* object,
                                                GDBusConnection* connection,
                                                const gchar* path,
                                                GError** error);
VALA_EXTERN FontManagerApplication* font_manager_get_default_application (void);
VALA_EXTERN FontManagerMainWindow* font_manager_application_get_main_window (FontManagerApplication* self);
VALA_EXTERN GType font_manager_language_filter_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerLanguageFilterSettings, g_object_unref)
VALA_EXTERN FontManagerLanguageFilterSettings* font_manager_language_filter_get_settings (FontManagerLanguageFilter* self);
VALA_EXTERN GType font_manager_language_settings_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerLanguageSettingsDialog, g_object_unref)
VALA_EXTERN FontManagerLanguageSettingsDialog* font_manager_language_settings_dialog_new (GtkWindow* parent,
                                                                              FontManagerLanguageFilterSettings* settings);
VALA_EXTERN FontManagerLanguageSettingsDialog* font_manager_language_settings_dialog_construct (GType object_type,
                                                                                    GtkWindow* parent,
                                                                                    FontManagerLanguageFilterSettings* settings);
VALA_EXTERN void font_manager_collection_list_view_remove_selected_collection (FontManagerCollectionListView* self);
static void font_manager_sidebar_on_selection_changed (FontManagerSidebar* self,
                                                FontManagerFilterListView* view,
                                                FontManagerFontListFilter* item);
VALA_EXTERN void font_manager_sidebar_set_filter (FontManagerSidebar* self,
                                      FontManagerFontListFilter* value);
VALA_EXTERN guint font_manager_filter_list_view_get_selected_position (FontManagerFilterListView* self);
VALA_EXTERN FontManagerFontListFilter* font_manager_sidebar_get_filter (FontManagerSidebar* self);
VALA_EXTERN GType font_manager_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerCollection, g_object_unref)
VALA_EXTERN JsonArray* font_manager_sidebar_get_available_fonts (FontManagerSidebar* self);
VALA_EXTERN void font_manager_sidebar_set_available_fonts (FontManagerSidebar* self,
                                               JsonArray* value);
VALA_EXTERN FontManagerReject* font_manager_sidebar_get_disabled_families (FontManagerSidebar* self);
VALA_EXTERN void font_manager_sidebar_set_disabled_families (FontManagerSidebar* self,
                                                 FontManagerReject* value);
VALA_EXTERN FontManagerSortType font_manager_sidebar_get_sort_type (FontManagerSidebar* self);
VALA_EXTERN void font_manager_sidebar_set_sort_type (FontManagerSidebar* self,
                                         FontManagerSortType value);
VALA_EXTERN GType font_manager_category_list_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerCategoryListModel, g_object_unref)
VALA_EXTERN FontManagerCategoryListModel* font_manager_sidebar_get_category_model (FontManagerSidebar* self);
static void font_manager_sidebar_finalize (GObject * obj);
static GType font_manager_sidebar_get_type_once (void);
static void _vala_font_manager_sidebar_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_font_manager_sidebar_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);
VALA_EXTERN GType font_manager_sidebar_stack_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerSidebarStack, g_object_unref)
VALA_EXTERN GType font_manager_orthography_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerOrthographyList, g_object_unref)
VALA_EXTERN FontManagerSidebarStack* font_manager_sidebar_stack_new (GSettings* settings);
VALA_EXTERN FontManagerSidebarStack* font_manager_sidebar_stack_construct (GType object_type,
                                                               GSettings* settings);
VALA_EXTERN FontManagerOrthographyList* font_manager_orthography_list_new (void);
VALA_EXTERN FontManagerOrthographyList* font_manager_orthography_list_construct (GType object_type);
static void __lambda78_ (FontManagerSidebarStack* self);
static void ___lambda78__font_manager_sidebar_changed (FontManagerSidebar* _sender,
                                                gpointer self);
VALA_EXTERN FontManagerCollectionListModel* font_manager_sidebar_stack_get_collection_model (FontManagerSidebarStack* self);
VALA_EXTERN void font_manager_sidebar_stack_select_first_category (FontManagerSidebarStack* self);
VALA_EXTERN void font_manager_sidebar_stack_update_collections (FontManagerSidebarStack* self);
VALA_EXTERN GObject* font_manager_sidebar_stack_get_selected_item (FontManagerSidebarStack* self);
VALA_EXTERN void font_manager_sidebar_stack_set_selected_item (FontManagerSidebarStack* self,
                                                   GObject* value);
VALA_EXTERN GSettings* font_manager_sidebar_stack_get_settings (FontManagerSidebarStack* self);
VALA_EXTERN void font_manager_sidebar_stack_set_settings (FontManagerSidebarStack* self,
                                              GSettings* value);
VALA_EXTERN FontManagerFontListFilter* font_manager_sidebar_stack_get_filter (FontManagerSidebarStack* self);
VALA_EXTERN void font_manager_sidebar_stack_set_filter (FontManagerSidebarStack* self,
                                            FontManagerFontListFilter* value);
VALA_EXTERN JsonArray* font_manager_sidebar_stack_get_available_fonts (FontManagerSidebarStack* self);
VALA_EXTERN void font_manager_sidebar_stack_set_available_fonts (FontManagerSidebarStack* self,
                                                     JsonArray* value);
VALA_EXTERN FontManagerReject* font_manager_sidebar_stack_get_disabled_families (FontManagerSidebarStack* self);
VALA_EXTERN void font_manager_sidebar_stack_set_disabled_families (FontManagerSidebarStack* self,
                                                       FontManagerReject* value);
VALA_EXTERN FontManagerOrthography* font_manager_sidebar_stack_get_selected_orthography (FontManagerSidebarStack* self);
VALA_EXTERN void font_manager_sidebar_stack_set_selected_orthography (FontManagerSidebarStack* self,
                                                          FontManagerOrthography* value);
VALA_EXTERN void font_manager_sidebar_stack_set_mode (FontManagerSidebarStack* self,
                                          FontManagerPreviewPanePage value);
VALA_EXTERN FontManagerCategoryListModel* font_manager_sidebar_stack_get_category_model (FontManagerSidebarStack* self);
static void font_manager_sidebar_stack_finalize (GObject * obj);
static GType font_manager_sidebar_stack_get_type_once (void);
static void _vala_font_manager_sidebar_stack_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static void _vala_font_manager_sidebar_stack_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_sidebar_controls_get_instance_private (FontManagerSidebarControls* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerSidebarControls_private_offset);
}

FontManagerSidebarControls*
font_manager_sidebar_controls_construct (GType object_type)
{
	FontManagerSidebarControls * self = NULL;
	self = (FontManagerSidebarControls*) g_object_new (object_type, NULL);
	return self;
}

FontManagerSidebarControls*
font_manager_sidebar_controls_new (void)
{
	return font_manager_sidebar_controls_construct (FONT_MANAGER_TYPE_SIDEBAR_CONTROLS);
}

GtkButton*
font_manager_sidebar_controls_get_add_button (FontManagerSidebarControls* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_add_button;
	result = _tmp0_;
	return result;
}

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

void
font_manager_sidebar_controls_set_add_button (FontManagerSidebarControls* self,
                                              GtkButton* value)
{
	GtkButton* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_sidebar_controls_get_add_button (self);
	if (old_value != value) {
		GtkButton* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_add_button);
		self->priv->_add_button = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_sidebar_controls_properties[FONT_MANAGER_SIDEBAR_CONTROLS_ADD_BUTTON_PROPERTY]);
	}
}

GtkButton*
font_manager_sidebar_controls_get_remove_button (FontManagerSidebarControls* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_remove_button;
	result = _tmp0_;
	return result;
}

void
font_manager_sidebar_controls_set_remove_button (FontManagerSidebarControls* self,
                                                 GtkButton* value)
{
	GtkButton* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_sidebar_controls_get_remove_button (self);
	if (old_value != value) {
		GtkButton* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_remove_button);
		self->priv->_remove_button = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_sidebar_controls_properties[FONT_MANAGER_SIDEBAR_CONTROLS_REMOVE_BUTTON_PROPERTY]);
	}
}

GtkButton*
font_manager_sidebar_controls_get_edit_button (FontManagerSidebarControls* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_edit_button;
	result = _tmp0_;
	return result;
}

void
font_manager_sidebar_controls_set_edit_button (FontManagerSidebarControls* self,
                                               GtkButton* value)
{
	GtkButton* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_sidebar_controls_get_edit_button (self);
	if (old_value != value) {
		GtkButton* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_edit_button);
		self->priv->_edit_button = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_sidebar_controls_properties[FONT_MANAGER_SIDEBAR_CONTROLS_EDIT_BUTTON_PROPERTY]);
	}
}

gboolean
font_manager_sidebar_controls_get_removable (FontManagerSidebarControls* self)
{
	gboolean result;
	GtkButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_remove_button;
	_tmp1_ = gtk_widget_get_sensitive ((GtkWidget*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

void
font_manager_sidebar_controls_set_removable (FontManagerSidebarControls* self,
                                             gboolean value)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_remove_button;
	font_manager_set_control_sensitivity ((GtkWidget*) _tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, font_manager_sidebar_controls_properties[FONT_MANAGER_SIDEBAR_CONTROLS_REMOVABLE_PROPERTY]);
}

gboolean
font_manager_sidebar_controls_get_editable (FontManagerSidebarControls* self)
{
	gboolean result;
	GtkButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_edit_button;
	_tmp1_ = gtk_widget_get_sensitive ((GtkWidget*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

void
font_manager_sidebar_controls_set_editable (FontManagerSidebarControls* self,
                                            gboolean value)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_edit_button;
	font_manager_set_control_sensitivity ((GtkWidget*) _tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, font_manager_sidebar_controls_properties[FONT_MANAGER_SIDEBAR_CONTROLS_EDITABLE_PROPERTY]);
}

static void
_font_manager_sidebar_controls___lambda21_ (FontManagerSidebarControls* self,
                                            GtkButton* w)
{
	g_return_if_fail (w != NULL);
	g_signal_emit (self, font_manager_sidebar_controls_signals[FONT_MANAGER_SIDEBAR_CONTROLS_ADD_SELECTED_SIGNAL], 0);
}

static void
__font_manager_sidebar_controls___lambda21__gtk_button_clicked (GtkButton* _sender,
                                                                gpointer self)
{
	_font_manager_sidebar_controls___lambda21_ ((FontManagerSidebarControls*) self, _sender);
}

static void
_font_manager_sidebar_controls___lambda22_ (FontManagerSidebarControls* self)
{
	g_signal_emit (self, font_manager_sidebar_controls_signals[FONT_MANAGER_SIDEBAR_CONTROLS_REMOVE_SELECTED_SIGNAL], 0);
}

static void
__font_manager_sidebar_controls___lambda22__gtk_button_clicked (GtkButton* _sender,
                                                                gpointer self)
{
	_font_manager_sidebar_controls___lambda22_ ((FontManagerSidebarControls*) self);
}

static void
_font_manager_sidebar_controls___lambda23_ (FontManagerSidebarControls* self)
{
	g_signal_emit (self, font_manager_sidebar_controls_signals[FONT_MANAGER_SIDEBAR_CONTROLS_EDIT_SELECTED_SIGNAL], 0);
}

static void
__font_manager_sidebar_controls___lambda23__gtk_button_clicked (GtkButton* _sender,
                                                                gpointer self)
{
	_font_manager_sidebar_controls___lambda23_ ((FontManagerSidebarControls*) self);
}

static GObject *
font_manager_sidebar_controls_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FontManagerSidebarControls * self;
	gchar* _tmp0_;
	GtkButton* _tmp1_ = NULL;
	GtkButton* _tmp2_;
	gchar* _tmp3_;
	GtkButton* _tmp4_ = NULL;
	GtkButton* _tmp5_;
	gchar* _tmp6_;
	GtkButton* _tmp7_ = NULL;
	GtkButton* _tmp8_;
	GtkButton* _tmp9_;
	GtkButton* _tmp10_;
	GtkButton* _tmp11_;
	GtkButton* _tmp12_;
	GtkButton* _tmp13_;
	GtkButton* _tmp14_;
	GtkButton* _tmp15_;
	GtkButton* _tmp16_;
	parent_class = G_OBJECT_CLASS (font_manager_sidebar_controls_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_SIDEBAR_CONTROLS, FontManagerSidebarControls);
	gtk_widget_set_opacity ((GtkWidget*) self, 0.9);
	gtk_box_set_spacing ((GtkBox*) self, FONT_MANAGER_DEFAULT_MARGIN);
	font_manager_widget_set_margin ((GtkWidget*) self, FONT_MANAGER_MIN_MARGIN * 2);
	_tmp0_ = g_strdup (_ ("Add new collection"));
	_tmp1_ = (GtkButton*) gtk_button_new_from_icon_name ("list-add-symbolic");
	gtk_button_set_has_frame (_tmp1_, FALSE);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp1_, _tmp0_);
	_g_free0 (_tmp0_);
	g_object_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	font_manager_sidebar_controls_set_add_button (self, _tmp2_);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = g_strdup (_ ("Remove selected item"));
	_tmp4_ = (GtkButton*) gtk_button_new_from_icon_name ("list-remove-symbolic");
	gtk_button_set_has_frame (_tmp4_, FALSE);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp4_, _tmp3_);
	_g_free0 (_tmp3_);
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	font_manager_sidebar_controls_set_remove_button (self, _tmp5_);
	_g_object_unref0 (_tmp5_);
	_tmp6_ = g_strdup (_ ("Edit selected item"));
	_tmp7_ = (GtkButton*) gtk_button_new_from_icon_name ("document-edit-symbolic");
	gtk_widget_set_hexpand ((GtkWidget*) _tmp7_, TRUE);
	gtk_button_set_has_frame (_tmp7_, FALSE);
	gtk_widget_set_halign ((GtkWidget*) _tmp7_, GTK_ALIGN_END);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp7_, _tmp6_);
	_g_free0 (_tmp6_);
	g_object_ref_sink (_tmp7_);
	_tmp8_ = _tmp7_;
	font_manager_sidebar_controls_set_edit_button (self, _tmp8_);
	_g_object_unref0 (_tmp8_);
	_tmp9_ = self->priv->_remove_button;
	font_manager_set_control_sensitivity ((GtkWidget*) _tmp9_, FALSE);
	_tmp10_ = self->priv->_edit_button;
	font_manager_set_control_sensitivity ((GtkWidget*) _tmp10_, FALSE);
	_tmp11_ = self->priv->_add_button;
	g_signal_connect_object (_tmp11_, "clicked", (GCallback) __font_manager_sidebar_controls___lambda21__gtk_button_clicked, self, 0);
	_tmp12_ = self->priv->_remove_button;
	g_signal_connect_object (_tmp12_, "clicked", (GCallback) __font_manager_sidebar_controls___lambda22__gtk_button_clicked, self, 0);
	_tmp13_ = self->priv->_edit_button;
	g_signal_connect_object (_tmp13_, "clicked", (GCallback) __font_manager_sidebar_controls___lambda23__gtk_button_clicked, self, 0);
	_tmp14_ = self->priv->_add_button;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp14_);
	_tmp15_ = self->priv->_remove_button;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp15_);
	_tmp16_ = self->priv->_edit_button;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp16_);
	return obj;
}

static void
font_manager_sidebar_controls_class_init (FontManagerSidebarControlsClass * klass,
                                          gpointer klass_data)
{
	font_manager_sidebar_controls_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerSidebarControls_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_sidebar_controls_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_sidebar_controls_set_property;
	G_OBJECT_CLASS (klass)->constructor = font_manager_sidebar_controls_constructor;
	G_OBJECT_CLASS (klass)->finalize = font_manager_sidebar_controls_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_CONTROLS_ADD_BUTTON_PROPERTY, font_manager_sidebar_controls_properties[FONT_MANAGER_SIDEBAR_CONTROLS_ADD_BUTTON_PROPERTY] = g_param_spec_object ("add-button", "add-button", "add-button", gtk_button_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_CONTROLS_REMOVE_BUTTON_PROPERTY, font_manager_sidebar_controls_properties[FONT_MANAGER_SIDEBAR_CONTROLS_REMOVE_BUTTON_PROPERTY] = g_param_spec_object ("remove-button", "remove-button", "remove-button", gtk_button_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_CONTROLS_EDIT_BUTTON_PROPERTY, font_manager_sidebar_controls_properties[FONT_MANAGER_SIDEBAR_CONTROLS_EDIT_BUTTON_PROPERTY] = g_param_spec_object ("edit-button", "edit-button", "edit-button", gtk_button_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_CONTROLS_REMOVABLE_PROPERTY, font_manager_sidebar_controls_properties[FONT_MANAGER_SIDEBAR_CONTROLS_REMOVABLE_PROPERTY] = g_param_spec_boolean ("removable", "removable", "removable", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_CONTROLS_EDITABLE_PROPERTY, font_manager_sidebar_controls_properties[FONT_MANAGER_SIDEBAR_CONTROLS_EDITABLE_PROPERTY] = g_param_spec_boolean ("editable", "editable", "editable", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	font_manager_sidebar_controls_signals[FONT_MANAGER_SIDEBAR_CONTROLS_ADD_SELECTED_SIGNAL] = g_signal_new ("add-selected", FONT_MANAGER_TYPE_SIDEBAR_CONTROLS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	font_manager_sidebar_controls_signals[FONT_MANAGER_SIDEBAR_CONTROLS_REMOVE_SELECTED_SIGNAL] = g_signal_new ("remove-selected", FONT_MANAGER_TYPE_SIDEBAR_CONTROLS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	font_manager_sidebar_controls_signals[FONT_MANAGER_SIDEBAR_CONTROLS_EDIT_SELECTED_SIGNAL] = g_signal_new ("edit-selected", FONT_MANAGER_TYPE_SIDEBAR_CONTROLS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
font_manager_sidebar_controls_instance_init (FontManagerSidebarControls * self,
                                             gpointer klass)
{
	self->priv = font_manager_sidebar_controls_get_instance_private (self);
}

static void
font_manager_sidebar_controls_finalize (GObject * obj)
{
	FontManagerSidebarControls * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_SIDEBAR_CONTROLS, FontManagerSidebarControls);
	_g_object_unref0 (self->priv->_add_button);
	_g_object_unref0 (self->priv->_remove_button);
	_g_object_unref0 (self->priv->_edit_button);
	G_OBJECT_CLASS (font_manager_sidebar_controls_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_sidebar_controls_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerSidebarControlsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_sidebar_controls_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerSidebarControls), 0, (GInstanceInitFunc) font_manager_sidebar_controls_instance_init, NULL };
	GType font_manager_sidebar_controls_type_id;
	font_manager_sidebar_controls_type_id = g_type_register_static (gtk_box_get_type (), "FontManagerSidebarControls", &g_define_type_info, 0);
	FontManagerSidebarControls_private_offset = g_type_add_instance_private (font_manager_sidebar_controls_type_id, sizeof (FontManagerSidebarControlsPrivate));
	return font_manager_sidebar_controls_type_id;
}

GType
font_manager_sidebar_controls_get_type (void)
{
	static volatile gsize font_manager_sidebar_controls_type_id__once = 0;
	if (g_once_init_enter (&font_manager_sidebar_controls_type_id__once)) {
		GType font_manager_sidebar_controls_type_id;
		font_manager_sidebar_controls_type_id = font_manager_sidebar_controls_get_type_once ();
		g_once_init_leave (&font_manager_sidebar_controls_type_id__once, font_manager_sidebar_controls_type_id);
	}
	return font_manager_sidebar_controls_type_id__once;
}

static void
_vala_font_manager_sidebar_controls_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	FontManagerSidebarControls * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_SIDEBAR_CONTROLS, FontManagerSidebarControls);
	switch (property_id) {
		case FONT_MANAGER_SIDEBAR_CONTROLS_ADD_BUTTON_PROPERTY:
		g_value_set_object (value, font_manager_sidebar_controls_get_add_button (self));
		break;
		case FONT_MANAGER_SIDEBAR_CONTROLS_REMOVE_BUTTON_PROPERTY:
		g_value_set_object (value, font_manager_sidebar_controls_get_remove_button (self));
		break;
		case FONT_MANAGER_SIDEBAR_CONTROLS_EDIT_BUTTON_PROPERTY:
		g_value_set_object (value, font_manager_sidebar_controls_get_edit_button (self));
		break;
		case FONT_MANAGER_SIDEBAR_CONTROLS_REMOVABLE_PROPERTY:
		g_value_set_boolean (value, font_manager_sidebar_controls_get_removable (self));
		break;
		case FONT_MANAGER_SIDEBAR_CONTROLS_EDITABLE_PROPERTY:
		g_value_set_boolean (value, font_manager_sidebar_controls_get_editable (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_sidebar_controls_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	FontManagerSidebarControls * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_SIDEBAR_CONTROLS, FontManagerSidebarControls);
	switch (property_id) {
		case FONT_MANAGER_SIDEBAR_CONTROLS_ADD_BUTTON_PROPERTY:
		font_manager_sidebar_controls_set_add_button (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_SIDEBAR_CONTROLS_REMOVE_BUTTON_PROPERTY:
		font_manager_sidebar_controls_set_remove_button (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_SIDEBAR_CONTROLS_EDIT_BUTTON_PROPERTY:
		font_manager_sidebar_controls_set_edit_button (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_SIDEBAR_CONTROLS_REMOVABLE_PROPERTY:
		font_manager_sidebar_controls_set_removable (self, g_value_get_boolean (value));
		break;
		case FONT_MANAGER_SIDEBAR_CONTROLS_EDITABLE_PROPERTY:
		font_manager_sidebar_controls_set_editable (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
font_manager_sidebar_get_instance_private (FontManagerSidebar* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerSidebar_private_offset);
}

static void
_font_manager_sidebar_on_category_changed_font_manager_filter_list_view_selection_changed (FontManagerFilterListView* _sender,
                                                                                           FontManagerFontListFilter* item,
                                                                                           gpointer self)
{
	font_manager_sidebar_on_category_changed ((FontManagerSidebar*) self, item);
}

static void
_font_manager_sidebar_on_collection_changed_font_manager_filter_list_view_selection_changed (FontManagerFilterListView* _sender,
                                                                                             FontManagerFontListFilter* item,
                                                                                             gpointer self)
{
	font_manager_sidebar_on_collection_changed ((FontManagerSidebar*) self, item);
}

static void
_font_manager_sidebar_on_add_selected_font_manager_sidebar_controls_add_selected (FontManagerSidebarControls* _sender,
                                                                                  gpointer self)
{
	font_manager_sidebar_on_add_selected ((FontManagerSidebar*) self);
}

static void
_font_manager_sidebar_on_remove_selected_font_manager_sidebar_controls_remove_selected (FontManagerSidebarControls* _sender,
                                                                                        gpointer self)
{
	font_manager_sidebar_on_remove_selected ((FontManagerSidebar*) self);
}

static void
_font_manager_sidebar_on_edit_selected_font_manager_sidebar_controls_edit_selected (FontManagerSidebarControls* _sender,
                                                                                    gpointer self)
{
	font_manager_sidebar_on_edit_selected ((FontManagerSidebar*) self);
}

static void
__lambda71_ (FontManagerSidebar* self)
{
	FontManagerCategoryListView* _tmp0_;
	FontManagerStringSet* _tmp1_;
	FontManagerStringSet* _tmp2_;
	_tmp0_ = self->priv->categories;
	_tmp1_ = font_manager_sidebar_get_available_sorted (self);
	_tmp2_ = _tmp1_;
	font_manager_category_list_view_set_sorted (_tmp0_, _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
___lambda71__gtk_widget_map (GtkWidget* _sender,
                             gpointer self)
{
	__lambda71_ ((FontManagerSidebar*) self);
}

static void
__lambda72_ (FontManagerSidebar* self)
{
	FontManagerCategoryListView* _tmp0_;
	FontManagerStringSet* _tmp1_;
	FontManagerStringSet* _tmp2_;
	_tmp0_ = self->priv->categories;
	_tmp1_ = font_manager_sidebar_get_available_sorted (self);
	_tmp2_ = _tmp1_;
	font_manager_category_list_view_set_sorted (_tmp0_, _tmp2_);
	_g_object_unref0 (_tmp2_);
	g_signal_emit (self, font_manager_sidebar_signals[FONT_MANAGER_SIDEBAR_CHANGED_SIGNAL], 0);
}

static void
___lambda72__font_manager_collection_list_view_changed (FontManagerCollectionListView* _sender,
                                                        gpointer self)
{
	__lambda72_ ((FontManagerSidebar*) self);
}

FontManagerSidebar*
font_manager_sidebar_construct (GType object_type)
{
	FontManagerSidebar * self = NULL;
	FontManagerSidebarControls* _tmp0_;
	FontManagerSidebarControls* _tmp1_;
	FontManagerSidebarControls* _tmp2_;
	GBindingFlags flags = 0U;
	FontManagerCategoryListView* _tmp3_;
	FontManagerCollectionListView* _tmp4_;
	FontManagerCollectionListModel* _tmp5_;
	FontManagerCollectionListModel* _tmp6_;
	FontManagerCategoryListView* _tmp7_;
	FontManagerCollectionListView* _tmp8_;
	FontManagerSidebarControls* _tmp9_;
	FontManagerSidebarControls* _tmp10_;
	FontManagerSidebarControls* _tmp11_;
	FontManagerCategoryListView* _tmp12_;
	GtkSingleSelection* _tmp13_;
	GtkSingleSelection* _tmp14_;
	GtkMenuButton* _tmp15_;
	GMenuModel* _tmp16_;
	GMenuModel* _tmp17_;
	FontManagerCollectionListView* _tmp18_;
	self = (FontManagerSidebar*) g_object_new (object_type, NULL);
	_tmp0_ = font_manager_sidebar_controls_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->controls);
	self->priv->controls = _tmp0_;
	_tmp1_ = self->priv->controls;
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	_tmp2_ = self->priv->controls;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp2_);
	flags = G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE;
	_tmp3_ = self->priv->categories;
	g_object_bind_property_with_closures ((GObject*) self, "disabled-families", (GObject*) _tmp3_, "disabled-families", flags, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp4_ = self->priv->collections;
	g_object_bind_property_with_closures ((GObject*) self, "disabled-families", (GObject*) _tmp4_, "disabled-families", flags, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp5_ = font_manager_sidebar_get_collection_model (self);
	_tmp6_ = _tmp5_;
	g_object_bind_property_with_closures ((GObject*) self, "sort-type", (GObject*) _tmp6_, "sort-type", G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp7_ = self->priv->categories;
	g_signal_connect_object ((FontManagerFilterListView*) _tmp7_, "selection-changed", (GCallback) _font_manager_sidebar_on_category_changed_font_manager_filter_list_view_selection_changed, self, 0);
	_tmp8_ = self->priv->collections;
	g_signal_connect_object ((FontManagerFilterListView*) _tmp8_, "selection-changed", (GCallback) _font_manager_sidebar_on_collection_changed_font_manager_filter_list_view_selection_changed, self, 0);
	_tmp9_ = self->priv->controls;
	g_signal_connect_object (_tmp9_, "add-selected", (GCallback) _font_manager_sidebar_on_add_selected_font_manager_sidebar_controls_add_selected, self, 0);
	_tmp10_ = self->priv->controls;
	g_signal_connect_object (_tmp10_, "remove-selected", (GCallback) _font_manager_sidebar_on_remove_selected_font_manager_sidebar_controls_remove_selected, self, 0);
	_tmp11_ = self->priv->controls;
	g_signal_connect_object (_tmp11_, "edit-selected", (GCallback) _font_manager_sidebar_on_edit_selected_font_manager_sidebar_controls_edit_selected, self, 0);
	_tmp12_ = self->priv->categories;
	_tmp13_ = font_manager_filter_list_view_get_selection ((FontManagerFilterListView*) _tmp12_);
	_tmp14_ = _tmp13_;
	gtk_selection_model_select_item ((GtkSelectionModel*) _tmp14_, (guint) 0, TRUE);
	_tmp15_ = self->priv->collection_sort_type;
	_tmp16_ = font_manager_get_sort_type_menu_model ();
	_tmp17_ = _tmp16_;
	gtk_menu_button_set_menu_model (_tmp15_, _tmp17_);
	_g_object_unref0 (_tmp17_);
	g_signal_connect_object ((GtkWidget*) self, "map", (GCallback) ___lambda71__gtk_widget_map, self, G_CONNECT_AFTER);
	_tmp18_ = self->priv->collections;
	g_signal_connect_object (_tmp18_, "changed", (GCallback) ___lambda72__font_manager_collection_list_view_changed, self, G_CONNECT_AFTER);
	return self;
}

FontManagerSidebar*
font_manager_sidebar_new (void)
{
	return font_manager_sidebar_construct (FONT_MANAGER_TYPE_SIDEBAR);
}

static FontManagerStringSet*
font_manager_sidebar_get_available_sorted (FontManagerSidebar* self)
{
	FontManagerStringSet* _result_ = NULL;
	FontManagerCollectionListView* _tmp0_;
	FontManagerFontListFilterModel* _tmp1_;
	FontManagerFontListFilterModel* _tmp2_;
	FontManagerStringSet* _tmp3_;
	FontManagerStringSet* available = NULL;
	FontManagerStringSet* _tmp4_;
	FontManagerStringSet* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->collections;
	_tmp1_ = font_manager_filter_list_view_get_model ((FontManagerFilterListView*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = font_manager_collection_list_model_get_full_contents (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, FONT_MANAGER_TYPE_COLLECTION_LIST_MODEL, FontManagerCollectionListModel));
	_result_ = _tmp3_;
	font_manager_update_font_configuration ();
	font_manager_load_user_font_resources ();
	_tmp4_ = font_manager_list_available_font_families ();
	available = _tmp4_;
	font_manager_string_set_retain_all (_result_, available);
	result = _result_;
	_g_object_unref0 (available);
	return result;
}

void
font_manager_sidebar_select_first_row (FontManagerSidebar* self)
{
	FontManagerCategoryListView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->categories;
	font_manager_category_list_view_select_item (_tmp0_, (guint) 0);
	return;
}

void
font_manager_sidebar_update_collections (FontManagerSidebar* self)
{
	FontManagerCollectionListView* _tmp0_;
	FontManagerCollectionListView* _tmp1_;
	FontManagerCategoryListView* _tmp2_;
	FontManagerStringSet* _tmp3_;
	FontManagerStringSet* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->collections;
	font_manager_collection_list_view_queue_update (_tmp0_);
	_tmp1_ = self->priv->collections;
	font_manager_collection_list_view_save (_tmp1_);
	_tmp2_ = self->priv->categories;
	_tmp3_ = font_manager_sidebar_get_available_sorted (self);
	_tmp4_ = _tmp3_;
	font_manager_category_list_view_set_sorted (_tmp2_, _tmp4_);
	_g_object_unref0 (_tmp4_);
	g_signal_emit (self, font_manager_sidebar_signals[FONT_MANAGER_SIDEBAR_CHANGED_SIGNAL], 0);
	return;
}

static void
font_manager_sidebar_on_add_selected (FontManagerSidebar* self)
{
	FontManagerCollectionListView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->collections;
	font_manager_collection_list_view_add_new_collection (_tmp0_);
	return;
}

static void
font_manager_sidebar_on_edit_selected (FontManagerSidebar* self)
{
	FontManagerCategoryListView* _tmp0_;
	FontManagerLanguageFilter* _tmp1_;
	FontManagerLanguageFilter* _tmp2_;
	FontManagerMainWindow* main_window = NULL;
	FontManagerApplication* _tmp3_;
	FontManagerApplication* _tmp4_;
	FontManagerMainWindow* _tmp5_;
	FontManagerMainWindow* _tmp6_;
	FontManagerMainWindow* _tmp7_;
	FontManagerMainWindow* _tmp8_;
	FontManagerLanguageFilterSettings* filter_settings = NULL;
	FontManagerCategoryListView* _tmp9_;
	FontManagerLanguageFilter* _tmp10_;
	FontManagerLanguageFilter* _tmp11_;
	FontManagerLanguageFilterSettings* _tmp12_;
	FontManagerLanguageFilterSettings* _tmp13_;
	FontManagerLanguageFilterSettings* _tmp14_;
	FontManagerLanguageSettingsDialog* dialog = NULL;
	FontManagerLanguageSettingsDialog* _tmp15_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->categories;
	_tmp1_ = font_manager_category_list_view_get_language_filter (_tmp0_);
	_tmp2_ = _tmp1_;
	_vala_return_if_fail (_tmp2_ != NULL, "categories.language_filter != null");
	_tmp3_ = font_manager_get_default_application ();
	_tmp4_ = _tmp3_;
	_tmp5_ = font_manager_application_get_main_window (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = _g_object_ref0 (_tmp6_);
	_tmp8_ = _tmp7_;
	_g_object_unref0 (_tmp4_);
	main_window = _tmp8_;
	_tmp9_ = self->priv->categories;
	_tmp10_ = font_manager_category_list_view_get_language_filter (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = font_manager_language_filter_get_settings (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = _g_object_ref0 (_tmp13_);
	filter_settings = _tmp14_;
	_tmp15_ = font_manager_language_settings_dialog_new ((GtkWindow*) main_window, filter_settings);
	g_object_ref_sink (_tmp15_);
	dialog = _tmp15_;
	gtk_window_present ((GtkWindow*) dialog);
	_g_object_unref0 (dialog);
	_g_object_unref0 (filter_settings);
	_g_object_unref0 (main_window);
	return;
}

static void
font_manager_sidebar_on_remove_selected (FontManagerSidebar* self)
{
	FontManagerCollectionListView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->collections;
	font_manager_collection_list_view_remove_selected_collection (_tmp0_);
	return;
}

static void
font_manager_sidebar_on_selection_changed (FontManagerSidebar* self,
                                           FontManagerFilterListView* view,
                                           FontManagerFontListFilter* item)
{
	GtkSingleSelection* _tmp0_;
	GtkSingleSelection* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	gboolean removable = FALSE;
	FontManagerFontListFilter* _tmp4_;
	gboolean language_filter = FALSE;
	FontManagerFontListFilter* _tmp5_;
	FontManagerSidebarControls* _tmp6_;
	FontManagerSidebarControls* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (view != NULL);
	font_manager_sidebar_set_filter (self, item);
	_tmp0_ = font_manager_filter_list_view_get_selection (view);
	_tmp1_ = _tmp0_;
	_tmp2_ = font_manager_filter_list_view_get_selected_position (view);
	_tmp3_ = _tmp2_;
	gtk_selection_model_unselect_item ((GtkSelectionModel*) _tmp1_, _tmp3_);
	_tmp4_ = self->priv->_filter;
	removable = FONT_MANAGER_IS_COLLECTION (_tmp4_);
	_tmp5_ = self->priv->_filter;
	language_filter = FONT_MANAGER_IS_LANGUAGE_FILTER (_tmp5_);
	_tmp6_ = self->priv->controls;
	font_manager_sidebar_controls_set_removable (_tmp6_, removable);
	_tmp7_ = self->priv->controls;
	font_manager_sidebar_controls_set_editable (_tmp7_, language_filter);
	if (language_filter) {
		FontManagerSidebarControls* _tmp8_;
		GtkButton* _tmp9_;
		GtkButton* _tmp10_;
		FontManagerSidebarControls* _tmp11_;
		GtkButton* _tmp12_;
		GtkButton* _tmp13_;
		_tmp8_ = self->priv->controls;
		_tmp9_ = font_manager_sidebar_controls_get_edit_button (_tmp8_);
		_tmp10_ = _tmp9_;
		gtk_button_set_has_frame (_tmp10_, TRUE);
		_tmp11_ = self->priv->controls;
		_tmp12_ = font_manager_sidebar_controls_get_edit_button (_tmp11_);
		_tmp13_ = _tmp12_;
		gtk_widget_add_css_class ((GtkWidget*) _tmp13_, FONT_MANAGER_STYLE_CLASS_SUGGESTED_ACTION);
	} else {
		FontManagerSidebarControls* _tmp14_;
		GtkButton* _tmp15_;
		GtkButton* _tmp16_;
		FontManagerSidebarControls* _tmp17_;
		GtkButton* _tmp18_;
		GtkButton* _tmp19_;
		_tmp14_ = self->priv->controls;
		_tmp15_ = font_manager_sidebar_controls_get_edit_button (_tmp14_);
		_tmp16_ = _tmp15_;
		gtk_button_set_has_frame (_tmp16_, FALSE);
		_tmp17_ = self->priv->controls;
		_tmp18_ = font_manager_sidebar_controls_get_edit_button (_tmp17_);
		_tmp19_ = _tmp18_;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp19_, FONT_MANAGER_STYLE_CLASS_SUGGESTED_ACTION);
	}
	return;
}

static void
font_manager_sidebar_on_category_changed (FontManagerSidebar* self,
                                          FontManagerFontListFilter* item)
{
	FontManagerCollectionListView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->collections;
	font_manager_sidebar_on_selection_changed (self, (FontManagerFilterListView*) _tmp0_, item);
	return;
}

static void
font_manager_sidebar_on_collection_changed (FontManagerSidebar* self,
                                            FontManagerFontListFilter* item)
{
	FontManagerCategoryListView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->categories;
	font_manager_sidebar_on_selection_changed (self, (FontManagerFilterListView*) _tmp0_, item);
	return;
}

FontManagerFontListFilter*
font_manager_sidebar_get_filter (FontManagerSidebar* self)
{
	FontManagerFontListFilter* result;
	FontManagerFontListFilter* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_filter;
	result = _tmp0_;
	return result;
}

void
font_manager_sidebar_set_filter (FontManagerSidebar* self,
                                 FontManagerFontListFilter* value)
{
	FontManagerFontListFilter* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_sidebar_get_filter (self);
	if (old_value != value) {
		FontManagerFontListFilter* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_filter);
		self->priv->_filter = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_sidebar_properties[FONT_MANAGER_SIDEBAR_FILTER_PROPERTY]);
	}
}

JsonArray*
font_manager_sidebar_get_available_fonts (FontManagerSidebar* self)
{
	JsonArray* result;
	JsonArray* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_available_fonts;
	result = _tmp0_;
	return result;
}

static gpointer
_json_array_ref0 (gpointer self)
{
	return self ? json_array_ref (self) : NULL;
}

void
font_manager_sidebar_set_available_fonts (FontManagerSidebar* self,
                                          JsonArray* value)
{
	JsonArray* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_sidebar_get_available_fonts (self);
	if (old_value != value) {
		JsonArray* _tmp0_;
		_tmp0_ = _json_array_ref0 (value);
		_json_array_unref0 (self->priv->_available_fonts);
		self->priv->_available_fonts = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_sidebar_properties[FONT_MANAGER_SIDEBAR_AVAILABLE_FONTS_PROPERTY]);
	}
}

FontManagerReject*
font_manager_sidebar_get_disabled_families (FontManagerSidebar* 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_sidebar_set_disabled_families (FontManagerSidebar* self,
                                            FontManagerReject* value)
{
	FontManagerReject* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_sidebar_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_sidebar_properties[FONT_MANAGER_SIDEBAR_DISABLED_FAMILIES_PROPERTY]);
	}
}

FontManagerSortType
font_manager_sidebar_get_sort_type (FontManagerSidebar* self)
{
	FontManagerSortType result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_sort_type;
	return result;
}

void
font_manager_sidebar_set_sort_type (FontManagerSidebar* self,
                                    FontManagerSortType value)
{
	FontManagerSortType old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_sidebar_get_sort_type (self);
	if (old_value != value) {
		self->priv->_sort_type = value;
		g_object_notify_by_pspec ((GObject *) self, font_manager_sidebar_properties[FONT_MANAGER_SIDEBAR_SORT_TYPE_PROPERTY]);
	}
}

FontManagerCategoryListModel*
font_manager_sidebar_get_category_model (FontManagerSidebar* self)
{
	FontManagerCategoryListModel* result;
	FontManagerCategoryListView* _tmp0_;
	FontManagerFontListFilterModel* _tmp1_;
	FontManagerFontListFilterModel* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->categories;
	_tmp1_ = font_manager_filter_list_view_get_model ((FontManagerFilterListView*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, FONT_MANAGER_TYPE_CATEGORY_LIST_MODEL, FontManagerCategoryListModel);
	return result;
}

FontManagerCollectionListModel*
font_manager_sidebar_get_collection_model (FontManagerSidebar* self)
{
	FontManagerCollectionListModel* result;
	FontManagerCollectionListView* _tmp0_;
	FontManagerFontListFilterModel* _tmp1_;
	FontManagerFontListFilterModel* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->collections;
	_tmp1_ = font_manager_filter_list_view_get_model ((FontManagerFilterListView*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, FONT_MANAGER_TYPE_COLLECTION_LIST_MODEL, FontManagerCollectionListModel);
	return result;
}

static void
font_manager_sidebar_class_init (FontManagerSidebarClass * klass,
                                 gpointer klass_data)
{
	font_manager_sidebar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerSidebar_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_sidebar_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_sidebar_set_property;
	G_OBJECT_CLASS (klass)->finalize = font_manager_sidebar_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_FILTER_PROPERTY, font_manager_sidebar_properties[FONT_MANAGER_SIDEBAR_FILTER_PROPERTY] = g_param_spec_object ("filter", "filter", "filter", FONT_MANAGER_TYPE_FONT_LIST_FILTER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_AVAILABLE_FONTS_PROPERTY, font_manager_sidebar_properties[FONT_MANAGER_SIDEBAR_AVAILABLE_FONTS_PROPERTY] = g_param_spec_boxed ("available-fonts", "available-fonts", "available-fonts", json_array_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_DISABLED_FAMILIES_PROPERTY, font_manager_sidebar_properties[FONT_MANAGER_SIDEBAR_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));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_SORT_TYPE_PROPERTY, font_manager_sidebar_properties[FONT_MANAGER_SIDEBAR_SORT_TYPE_PROPERTY] = g_param_spec_enum ("sort-type", "sort-type", "sort-type", FONT_MANAGER_TYPE_SORT_TYPE, FONT_MANAGER_SORT_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_CATEGORY_MODEL_PROPERTY, font_manager_sidebar_properties[FONT_MANAGER_SIDEBAR_CATEGORY_MODEL_PROPERTY] = g_param_spec_object ("category-model", "category-model", "category-model", FONT_MANAGER_TYPE_CATEGORY_LIST_MODEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_COLLECTION_MODEL_PROPERTY, font_manager_sidebar_properties[FONT_MANAGER_SIDEBAR_COLLECTION_MODEL_PROPERTY] = g_param_spec_object ("collection-model", "collection-model", "collection-model", FONT_MANAGER_TYPE_COLLECTION_LIST_MODEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/github/FontManager/FontManager/ui/font-manager-sidebar.ui");
	font_manager_sidebar_signals[FONT_MANAGER_SIDEBAR_CHANGED_SIGNAL] = g_signal_new ("changed", FONT_MANAGER_TYPE_SIDEBAR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "categories", FALSE, FontManagerSidebar_private_offset + G_STRUCT_OFFSET (FontManagerSidebarPrivate, categories));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "collections", FALSE, FontManagerSidebar_private_offset + G_STRUCT_OFFSET (FontManagerSidebarPrivate, collections));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "collection_sort_type", FALSE, FontManagerSidebar_private_offset + G_STRUCT_OFFSET (FontManagerSidebarPrivate, collection_sort_type));
	gtk_widget_class_install_property_action (GTK_WIDGET_CLASS (klass), "sort-type", "sort-type");
}

static void
font_manager_sidebar_instance_init (FontManagerSidebar * self,
                                    gpointer klass)
{
	self->priv = font_manager_sidebar_get_instance_private (self);
	self->priv->_filter = NULL;
	self->priv->_available_fonts = NULL;
	self->priv->_disabled_families = NULL;
	self->priv->_sort_type = FONT_MANAGER_SORT_TYPE_NONE;
	g_type_ensure (FONT_MANAGER_TYPE_CATEGORY_LIST_VIEW);
	g_type_ensure (FONT_MANAGER_TYPE_COLLECTION_LIST_VIEW);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
font_manager_sidebar_finalize (GObject * obj)
{
	FontManagerSidebar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_SIDEBAR, FontManagerSidebar);
	_g_object_unref0 (self->priv->_filter);
	_json_array_unref0 (self->priv->_available_fonts);
	_g_object_unref0 (self->priv->_disabled_families);
	_g_object_unref0 (self->priv->controls);
	G_OBJECT_CLASS (font_manager_sidebar_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_sidebar_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerSidebarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_sidebar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerSidebar), 0, (GInstanceInitFunc) font_manager_sidebar_instance_init, NULL };
	GType font_manager_sidebar_type_id;
	font_manager_sidebar_type_id = g_type_register_static (gtk_box_get_type (), "FontManagerSidebar", &g_define_type_info, 0);
	FontManagerSidebar_private_offset = g_type_add_instance_private (font_manager_sidebar_type_id, sizeof (FontManagerSidebarPrivate));
	return font_manager_sidebar_type_id;
}

GType
font_manager_sidebar_get_type (void)
{
	static volatile gsize font_manager_sidebar_type_id__once = 0;
	if (g_once_init_enter (&font_manager_sidebar_type_id__once)) {
		GType font_manager_sidebar_type_id;
		font_manager_sidebar_type_id = font_manager_sidebar_get_type_once ();
		g_once_init_leave (&font_manager_sidebar_type_id__once, font_manager_sidebar_type_id);
	}
	return font_manager_sidebar_type_id__once;
}

static void
_vala_font_manager_sidebar_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	FontManagerSidebar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_SIDEBAR, FontManagerSidebar);
	switch (property_id) {
		case FONT_MANAGER_SIDEBAR_FILTER_PROPERTY:
		g_value_set_object (value, font_manager_sidebar_get_filter (self));
		break;
		case FONT_MANAGER_SIDEBAR_AVAILABLE_FONTS_PROPERTY:
		g_value_set_boxed (value, font_manager_sidebar_get_available_fonts (self));
		break;
		case FONT_MANAGER_SIDEBAR_DISABLED_FAMILIES_PROPERTY:
		g_value_set_object (value, font_manager_sidebar_get_disabled_families (self));
		break;
		case FONT_MANAGER_SIDEBAR_SORT_TYPE_PROPERTY:
		g_value_set_enum (value, font_manager_sidebar_get_sort_type (self));
		break;
		case FONT_MANAGER_SIDEBAR_CATEGORY_MODEL_PROPERTY:
		g_value_set_object (value, font_manager_sidebar_get_category_model (self));
		break;
		case FONT_MANAGER_SIDEBAR_COLLECTION_MODEL_PROPERTY:
		g_value_set_object (value, font_manager_sidebar_get_collection_model (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_sidebar_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	FontManagerSidebar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_SIDEBAR, FontManagerSidebar);
	switch (property_id) {
		case FONT_MANAGER_SIDEBAR_FILTER_PROPERTY:
		font_manager_sidebar_set_filter (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_SIDEBAR_AVAILABLE_FONTS_PROPERTY:
		font_manager_sidebar_set_available_fonts (self, g_value_get_boxed (value));
		break;
		case FONT_MANAGER_SIDEBAR_DISABLED_FAMILIES_PROPERTY:
		font_manager_sidebar_set_disabled_families (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_SIDEBAR_SORT_TYPE_PROPERTY:
		font_manager_sidebar_set_sort_type (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
font_manager_sidebar_stack_get_instance_private (FontManagerSidebarStack* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerSidebarStack_private_offset);
}

static void
__lambda78_ (FontManagerSidebarStack* self)
{
	g_signal_emit (self, font_manager_sidebar_stack_signals[FONT_MANAGER_SIDEBAR_STACK_CHANGED_SIGNAL], 0);
}

static void
___lambda78__font_manager_sidebar_changed (FontManagerSidebar* _sender,
                                           gpointer self)
{
	__lambda78_ ((FontManagerSidebarStack*) self);
}

FontManagerSidebarStack*
font_manager_sidebar_stack_construct (GType object_type,
                                      GSettings* settings)
{
	FontManagerSidebarStack * self = NULL;
	GtkStack* _tmp0_ = NULL;
	GtkStack* _tmp1_;
	FontManagerSidebar* _tmp2_;
	FontManagerOrthographyList* _tmp3_;
	GtkStack* _tmp4_;
	FontManagerOrthographyList* _tmp5_;
	GtkStack* _tmp6_;
	FontManagerSidebar* _tmp7_;
	GtkStack* _tmp8_;
	FontManagerSidebar* _tmp9_;
	GBindingFlags flags = 0U;
	FontManagerSidebar* _tmp10_;
	FontManagerSidebar* _tmp11_;
	FontManagerSidebar* _tmp12_;
	FontManagerOrthographyList* _tmp13_;
	FontManagerOrthographyList* _tmp14_;
	FontManagerSidebar* _tmp15_;
	self = (FontManagerSidebarStack*) g_object_new (object_type, "settings", settings, NULL);
	_tmp0_ = (GtkStack*) gtk_stack_new ();
	gtk_stack_set_transition_duration (_tmp0_, (guint) 500);
	gtk_stack_set_transition_type (_tmp0_, GTK_STACK_TRANSITION_TYPE_OVER_RIGHT_LEFT);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->stack);
	self->priv->stack = _tmp0_;
	_tmp1_ = self->priv->stack;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp1_);
	_tmp2_ = font_manager_sidebar_new ();
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->sidebar);
	self->priv->sidebar = _tmp2_;
	_tmp3_ = font_manager_orthography_list_new ();
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->orthographies);
	self->priv->orthographies = _tmp3_;
	_tmp4_ = self->priv->stack;
	_tmp5_ = self->priv->orthographies;
	gtk_stack_add_child (_tmp4_, (GtkWidget*) _tmp5_);
	_tmp6_ = self->priv->stack;
	_tmp7_ = self->priv->sidebar;
	gtk_stack_add_child (_tmp6_, (GtkWidget*) _tmp7_);
	_tmp8_ = self->priv->stack;
	_tmp9_ = self->priv->sidebar;
	gtk_stack_set_visible_child (_tmp8_, (GtkWidget*) _tmp9_);
	flags = G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE;
	_tmp10_ = self->priv->sidebar;
	g_object_bind_property_with_closures ((GObject*) _tmp10_, "filter", (GObject*) self, "filter", flags, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp11_ = self->priv->sidebar;
	g_object_bind_property_with_closures ((GObject*) self, "available-fonts", (GObject*) _tmp11_, "available-fonts", flags, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp12_ = self->priv->sidebar;
	g_object_bind_property_with_closures ((GObject*) self, "disabled-families", (GObject*) _tmp12_, "disabled-families", flags, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp13_ = self->priv->orthographies;
	g_object_bind_property_with_closures ((GObject*) self, "selected-item", (GObject*) _tmp13_, "selected-item", flags, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp14_ = self->priv->orthographies;
	g_object_bind_property_with_closures ((GObject*) _tmp14_, "selected-orthography", (GObject*) self, "selected-orthography", flags, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp15_ = self->priv->sidebar;
	g_signal_connect_object (_tmp15_, "changed", (GCallback) ___lambda78__font_manager_sidebar_changed, self, 0);
	if (settings != NULL) {
		FontManagerCollectionListModel* _tmp16_;
		FontManagerCollectionListModel* _tmp17_;
		_tmp16_ = font_manager_sidebar_stack_get_collection_model (self);
		_tmp17_ = _tmp16_;
		g_settings_bind (settings, "sort-type", (GObject*) _tmp17_, "sort-type", G_SETTINGS_BIND_DEFAULT);
	}
	return self;
}

FontManagerSidebarStack*
font_manager_sidebar_stack_new (GSettings* settings)
{
	return font_manager_sidebar_stack_construct (FONT_MANAGER_TYPE_SIDEBAR_STACK, settings);
}

void
font_manager_sidebar_stack_select_first_category (FontManagerSidebarStack* self)
{
	FontManagerSidebar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->sidebar;
	font_manager_sidebar_select_first_row (_tmp0_);
	return;
}

void
font_manager_sidebar_stack_update_collections (FontManagerSidebarStack* self)
{
	FontManagerSidebar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->sidebar;
	font_manager_sidebar_update_collections (_tmp0_);
	return;
}

GObject*
font_manager_sidebar_stack_get_selected_item (FontManagerSidebarStack* self)
{
	GObject* result;
	GObject* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selected_item;
	result = _tmp0_;
	return result;
}

void
font_manager_sidebar_stack_set_selected_item (FontManagerSidebarStack* self,
                                              GObject* value)
{
	GObject* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_sidebar_stack_get_selected_item (self);
	if (old_value != value) {
		GObject* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_selected_item);
		self->priv->_selected_item = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_SELECTED_ITEM_PROPERTY]);
	}
}

GSettings*
font_manager_sidebar_stack_get_settings (FontManagerSidebarStack* self)
{
	GSettings* result;
	GSettings* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_settings;
	result = _tmp0_;
	return result;
}

void
font_manager_sidebar_stack_set_settings (FontManagerSidebarStack* self,
                                         GSettings* value)
{
	GSettings* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_sidebar_stack_get_settings (self);
	if (old_value != value) {
		GSettings* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_settings);
		self->priv->_settings = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_SETTINGS_PROPERTY]);
	}
}

FontManagerFontListFilter*
font_manager_sidebar_stack_get_filter (FontManagerSidebarStack* self)
{
	FontManagerFontListFilter* result;
	FontManagerFontListFilter* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_filter;
	result = _tmp0_;
	return result;
}

void
font_manager_sidebar_stack_set_filter (FontManagerSidebarStack* self,
                                       FontManagerFontListFilter* value)
{
	FontManagerFontListFilter* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_sidebar_stack_get_filter (self);
	if (old_value != value) {
		FontManagerFontListFilter* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_filter);
		self->priv->_filter = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_FILTER_PROPERTY]);
	}
}

JsonArray*
font_manager_sidebar_stack_get_available_fonts (FontManagerSidebarStack* self)
{
	JsonArray* result;
	JsonArray* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_available_fonts;
	result = _tmp0_;
	return result;
}

void
font_manager_sidebar_stack_set_available_fonts (FontManagerSidebarStack* self,
                                                JsonArray* value)
{
	JsonArray* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_sidebar_stack_get_available_fonts (self);
	if (old_value != value) {
		JsonArray* _tmp0_;
		_tmp0_ = _json_array_ref0 (value);
		_json_array_unref0 (self->priv->_available_fonts);
		self->priv->_available_fonts = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_AVAILABLE_FONTS_PROPERTY]);
	}
}

FontManagerReject*
font_manager_sidebar_stack_get_disabled_families (FontManagerSidebarStack* 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_sidebar_stack_set_disabled_families (FontManagerSidebarStack* self,
                                                  FontManagerReject* value)
{
	FontManagerReject* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_sidebar_stack_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_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_DISABLED_FAMILIES_PROPERTY]);
	}
}

FontManagerOrthography*
font_manager_sidebar_stack_get_selected_orthography (FontManagerSidebarStack* self)
{
	FontManagerOrthography* result;
	FontManagerOrthography* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selected_orthography;
	result = _tmp0_;
	return result;
}

void
font_manager_sidebar_stack_set_selected_orthography (FontManagerSidebarStack* self,
                                                     FontManagerOrthography* value)
{
	FontManagerOrthography* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_sidebar_stack_get_selected_orthography (self);
	if (old_value != value) {
		FontManagerOrthography* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_selected_orthography);
		self->priv->_selected_orthography = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_SELECTED_ORTHOGRAPHY_PROPERTY]);
	}
}

void
font_manager_sidebar_stack_set_mode (FontManagerSidebarStack* self,
                                     FontManagerPreviewPanePage value)
{
	g_return_if_fail (self != NULL);
	if (value == FONT_MANAGER_PREVIEW_PANE_PAGE_CHARACTER_MAP) {
		GtkStack* _tmp0_;
		FontManagerOrthographyList* _tmp1_;
		_tmp0_ = self->priv->stack;
		_tmp1_ = self->priv->orthographies;
		gtk_stack_set_visible_child (_tmp0_, (GtkWidget*) _tmp1_);
	} else {
		GtkStack* _tmp2_;
		FontManagerSidebar* _tmp3_;
		_tmp2_ = self->priv->stack;
		_tmp3_ = self->priv->sidebar;
		gtk_stack_set_visible_child (_tmp2_, (GtkWidget*) _tmp3_);
	}
	g_object_notify_by_pspec ((GObject *) self, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_MODE_PROPERTY]);
}

FontManagerCategoryListModel*
font_manager_sidebar_stack_get_category_model (FontManagerSidebarStack* self)
{
	FontManagerCategoryListModel* result;
	FontManagerSidebar* _tmp0_;
	FontManagerCategoryListModel* _tmp1_;
	FontManagerCategoryListModel* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->sidebar;
	_tmp1_ = font_manager_sidebar_get_category_model (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

FontManagerCollectionListModel*
font_manager_sidebar_stack_get_collection_model (FontManagerSidebarStack* self)
{
	FontManagerCollectionListModel* result;
	FontManagerSidebar* _tmp0_;
	FontManagerCollectionListModel* _tmp1_;
	FontManagerCollectionListModel* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->sidebar;
	_tmp1_ = font_manager_sidebar_get_collection_model (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

static void
font_manager_sidebar_stack_class_init (FontManagerSidebarStackClass * klass,
                                       gpointer klass_data)
{
	font_manager_sidebar_stack_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerSidebarStack_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_sidebar_stack_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_sidebar_stack_set_property;
	G_OBJECT_CLASS (klass)->finalize = font_manager_sidebar_stack_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_STACK_SELECTED_ITEM_PROPERTY, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_SELECTED_ITEM_PROPERTY] = g_param_spec_object ("selected-item", "selected-item", "selected-item", G_TYPE_OBJECT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_STACK_SETTINGS_PROPERTY, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_SETTINGS_PROPERTY] = g_param_spec_object ("settings", "settings", "settings", g_settings_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_STACK_FILTER_PROPERTY, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_FILTER_PROPERTY] = g_param_spec_object ("filter", "filter", "filter", FONT_MANAGER_TYPE_FONT_LIST_FILTER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_STACK_AVAILABLE_FONTS_PROPERTY, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_AVAILABLE_FONTS_PROPERTY] = g_param_spec_boxed ("available-fonts", "available-fonts", "available-fonts", json_array_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_STACK_DISABLED_FAMILIES_PROPERTY, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_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));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_STACK_SELECTED_ORTHOGRAPHY_PROPERTY, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_SELECTED_ORTHOGRAPHY_PROPERTY] = g_param_spec_object ("selected-orthography", "selected-orthography", "selected-orthography", font_manager_orthography_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_STACK_MODE_PROPERTY, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_MODE_PROPERTY] = g_param_spec_enum ("mode", "mode", "mode", font_manager_preview_pane_page_get_type (), 0, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_STACK_CATEGORY_MODEL_PROPERTY, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_CATEGORY_MODEL_PROPERTY] = g_param_spec_object ("category-model", "category-model", "category-model", FONT_MANAGER_TYPE_CATEGORY_LIST_MODEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_SIDEBAR_STACK_COLLECTION_MODEL_PROPERTY, font_manager_sidebar_stack_properties[FONT_MANAGER_SIDEBAR_STACK_COLLECTION_MODEL_PROPERTY] = g_param_spec_object ("collection-model", "collection-model", "collection-model", FONT_MANAGER_TYPE_COLLECTION_LIST_MODEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	font_manager_sidebar_stack_signals[FONT_MANAGER_SIDEBAR_STACK_CHANGED_SIGNAL] = g_signal_new ("changed", FONT_MANAGER_TYPE_SIDEBAR_STACK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
font_manager_sidebar_stack_instance_init (FontManagerSidebarStack * self,
                                          gpointer klass)
{
	self->priv = font_manager_sidebar_stack_get_instance_private (self);
	self->priv->_selected_item = NULL;
	self->priv->_settings = NULL;
	self->priv->_filter = NULL;
	self->priv->_available_fonts = NULL;
	self->priv->_disabled_families = NULL;
	self->priv->_selected_orthography = NULL;
}

static void
font_manager_sidebar_stack_finalize (GObject * obj)
{
	FontManagerSidebarStack * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_SIDEBAR_STACK, FontManagerSidebarStack);
	_g_object_unref0 (self->priv->_selected_item);
	_g_object_unref0 (self->priv->_settings);
	_g_object_unref0 (self->priv->_filter);
	_json_array_unref0 (self->priv->_available_fonts);
	_g_object_unref0 (self->priv->_disabled_families);
	_g_object_unref0 (self->priv->_selected_orthography);
	_g_object_unref0 (self->priv->stack);
	_g_object_unref0 (self->priv->sidebar);
	_g_object_unref0 (self->priv->orthographies);
	G_OBJECT_CLASS (font_manager_sidebar_stack_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_sidebar_stack_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerSidebarStackClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_sidebar_stack_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerSidebarStack), 0, (GInstanceInitFunc) font_manager_sidebar_stack_instance_init, NULL };
	GType font_manager_sidebar_stack_type_id;
	font_manager_sidebar_stack_type_id = g_type_register_static (gtk_box_get_type (), "FontManagerSidebarStack", &g_define_type_info, 0);
	FontManagerSidebarStack_private_offset = g_type_add_instance_private (font_manager_sidebar_stack_type_id, sizeof (FontManagerSidebarStackPrivate));
	return font_manager_sidebar_stack_type_id;
}

GType
font_manager_sidebar_stack_get_type (void)
{
	static volatile gsize font_manager_sidebar_stack_type_id__once = 0;
	if (g_once_init_enter (&font_manager_sidebar_stack_type_id__once)) {
		GType font_manager_sidebar_stack_type_id;
		font_manager_sidebar_stack_type_id = font_manager_sidebar_stack_get_type_once ();
		g_once_init_leave (&font_manager_sidebar_stack_type_id__once, font_manager_sidebar_stack_type_id);
	}
	return font_manager_sidebar_stack_type_id__once;
}

static void
_vala_font_manager_sidebar_stack_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	FontManagerSidebarStack * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_SIDEBAR_STACK, FontManagerSidebarStack);
	switch (property_id) {
		case FONT_MANAGER_SIDEBAR_STACK_SELECTED_ITEM_PROPERTY:
		g_value_set_object (value, font_manager_sidebar_stack_get_selected_item (self));
		break;
		case FONT_MANAGER_SIDEBAR_STACK_SETTINGS_PROPERTY:
		g_value_set_object (value, font_manager_sidebar_stack_get_settings (self));
		break;
		case FONT_MANAGER_SIDEBAR_STACK_FILTER_PROPERTY:
		g_value_set_object (value, font_manager_sidebar_stack_get_filter (self));
		break;
		case FONT_MANAGER_SIDEBAR_STACK_AVAILABLE_FONTS_PROPERTY:
		g_value_set_boxed (value, font_manager_sidebar_stack_get_available_fonts (self));
		break;
		case FONT_MANAGER_SIDEBAR_STACK_DISABLED_FAMILIES_PROPERTY:
		g_value_set_object (value, font_manager_sidebar_stack_get_disabled_families (self));
		break;
		case FONT_MANAGER_SIDEBAR_STACK_SELECTED_ORTHOGRAPHY_PROPERTY:
		g_value_set_object (value, font_manager_sidebar_stack_get_selected_orthography (self));
		break;
		case FONT_MANAGER_SIDEBAR_STACK_CATEGORY_MODEL_PROPERTY:
		g_value_set_object (value, font_manager_sidebar_stack_get_category_model (self));
		break;
		case FONT_MANAGER_SIDEBAR_STACK_COLLECTION_MODEL_PROPERTY:
		g_value_set_object (value, font_manager_sidebar_stack_get_collection_model (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_sidebar_stack_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec)
{
	FontManagerSidebarStack * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_SIDEBAR_STACK, FontManagerSidebarStack);
	switch (property_id) {
		case FONT_MANAGER_SIDEBAR_STACK_SELECTED_ITEM_PROPERTY:
		font_manager_sidebar_stack_set_selected_item (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_SIDEBAR_STACK_SETTINGS_PROPERTY:
		font_manager_sidebar_stack_set_settings (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_SIDEBAR_STACK_FILTER_PROPERTY:
		font_manager_sidebar_stack_set_filter (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_SIDEBAR_STACK_AVAILABLE_FONTS_PROPERTY:
		font_manager_sidebar_stack_set_available_fonts (self, g_value_get_boxed (value));
		break;
		case FONT_MANAGER_SIDEBAR_STACK_DISABLED_FAMILIES_PROPERTY:
		font_manager_sidebar_stack_set_disabled_families (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_SIDEBAR_STACK_SELECTED_ORTHOGRAPHY_PROPERTY:
		font_manager_sidebar_stack_set_selected_orthography (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_SIDEBAR_STACK_MODE_PROPERTY:
		font_manager_sidebar_stack_set_mode (self, g_value_get_enum (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;
}

