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

/* Compare.vala
 *
 * Copyright (C) 2009-2025 Jerry Casiano
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.
 *
 * If not, see <http://www.gnu.org/licenses/gpl-3.0.txt>.
*/

#include <glib-object.h>
#include <glib.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>
#include <pango/pango.h>
#include <stdlib.h>
#include <string.h>
#include "font-manager.h"
#include <json-glib/json-glib.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include "vala-common.h"
#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>

#define FONT_MANAGER_PINNED_COMPARISON_ROW_placeholder_text _ ("Saved Comparison")
#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_COMPARE_ENTRY (font_manager_compare_entry_get_type ())
#define FONT_MANAGER_COMPARE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_COMPARE_ENTRY, FontManagerCompareEntry))
#define FONT_MANAGER_COMPARE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_COMPARE_ENTRY, FontManagerCompareEntryClass))
#define FONT_MANAGER_IS_COMPARE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_COMPARE_ENTRY))
#define FONT_MANAGER_IS_COMPARE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_COMPARE_ENTRY))
#define FONT_MANAGER_COMPARE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_COMPARE_ENTRY, FontManagerCompareEntryClass))

typedef struct _FontManagerCompareEntry FontManagerCompareEntry;
typedef struct _FontManagerCompareEntryClass FontManagerCompareEntryClass;
typedef struct _FontManagerCompareEntryPrivate FontManagerCompareEntryPrivate;
enum  {
	FONT_MANAGER_COMPARE_ENTRY_0_PROPERTY,
	FONT_MANAGER_COMPARE_ENTRY_ITEM_PROPERTY,
	FONT_MANAGER_COMPARE_ENTRY_PREVIEW_SIZE_PROPERTY,
	FONT_MANAGER_COMPARE_ENTRY_FOREGROUND_COLOR_PROPERTY,
	FONT_MANAGER_COMPARE_ENTRY_BACKGROUND_COLOR_PROPERTY,
	FONT_MANAGER_COMPARE_ENTRY_FONT_DESC_PROPERTY,
	FONT_MANAGER_COMPARE_ENTRY_ATTRS_PROPERTY,
	FONT_MANAGER_COMPARE_ENTRY_PREVIEW_TEXT_PROPERTY,
	FONT_MANAGER_COMPARE_ENTRY_DESCRIPTION_PROPERTY,
	FONT_MANAGER_COMPARE_ENTRY_NUM_PROPERTIES
};
static GParamSpec* font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define __vala_PangoFontDescription_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoFontDescription_free (var), NULL)))
#define _pango_attr_list_unref0(var) ((var == NULL) ? NULL : (var = (pango_attr_list_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))

#define FONT_MANAGER_TYPE_COMPARE_MODEL (font_manager_compare_model_get_type ())
#define FONT_MANAGER_COMPARE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_COMPARE_MODEL, FontManagerCompareModel))
#define FONT_MANAGER_COMPARE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_COMPARE_MODEL, FontManagerCompareModelClass))
#define FONT_MANAGER_IS_COMPARE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_COMPARE_MODEL))
#define FONT_MANAGER_IS_COMPARE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_COMPARE_MODEL))
#define FONT_MANAGER_COMPARE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_COMPARE_MODEL, FontManagerCompareModelClass))

typedef struct _FontManagerCompareModel FontManagerCompareModel;
typedef struct _FontManagerCompareModelClass FontManagerCompareModelClass;
typedef struct _FontManagerCompareModelPrivate FontManagerCompareModelPrivate;
enum  {
	FONT_MANAGER_COMPARE_MODEL_0_PROPERTY,
	FONT_MANAGER_COMPARE_MODEL_ITEMS_PROPERTY,
	FONT_MANAGER_COMPARE_MODEL_NUM_PROPERTIES
};
static GParamSpec* font_manager_compare_model_properties[FONT_MANAGER_COMPARE_MODEL_NUM_PROPERTIES];
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))

#define FONT_MANAGER_TYPE_COMPARE_ROW (font_manager_compare_row_get_type ())
#define FONT_MANAGER_COMPARE_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_COMPARE_ROW, FontManagerCompareRow))
#define FONT_MANAGER_COMPARE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_COMPARE_ROW, FontManagerCompareRowClass))
#define FONT_MANAGER_IS_COMPARE_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_COMPARE_ROW))
#define FONT_MANAGER_IS_COMPARE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_COMPARE_ROW))
#define FONT_MANAGER_COMPARE_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_COMPARE_ROW, FontManagerCompareRowClass))

typedef struct _FontManagerCompareRow FontManagerCompareRow;
typedef struct _FontManagerCompareRowClass FontManagerCompareRowClass;
typedef struct _FontManagerCompareRowPrivate FontManagerCompareRowPrivate;
enum  {
	FONT_MANAGER_COMPARE_ROW_0_PROPERTY,
	FONT_MANAGER_COMPARE_ROW_NUM_PROPERTIES
};
static GParamSpec* font_manager_compare_row_properties[FONT_MANAGER_COMPARE_ROW_NUM_PROPERTIES];

#define FONT_MANAGER_TYPE_COMPARE_PANE (font_manager_compare_pane_get_type ())
#define FONT_MANAGER_COMPARE_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_COMPARE_PANE, FontManagerComparePane))
#define FONT_MANAGER_COMPARE_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_COMPARE_PANE, FontManagerComparePaneClass))
#define FONT_MANAGER_IS_COMPARE_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_COMPARE_PANE))
#define FONT_MANAGER_IS_COMPARE_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_COMPARE_PANE))
#define FONT_MANAGER_COMPARE_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_COMPARE_PANE, FontManagerComparePaneClass))

typedef struct _FontManagerComparePane FontManagerComparePane;
typedef struct _FontManagerComparePaneClass FontManagerComparePaneClass;
typedef struct _FontManagerComparePanePrivate FontManagerComparePanePrivate;

#define FONT_MANAGER_TYPE_PINNED_COMPARISONS (font_manager_pinned_comparisons_get_type ())
#define FONT_MANAGER_PINNED_COMPARISONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_PINNED_COMPARISONS, FontManagerPinnedComparisons))
#define FONT_MANAGER_PINNED_COMPARISONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_PINNED_COMPARISONS, FontManagerPinnedComparisonsClass))
#define FONT_MANAGER_IS_PINNED_COMPARISONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_PINNED_COMPARISONS))
#define FONT_MANAGER_IS_PINNED_COMPARISONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_PINNED_COMPARISONS))
#define FONT_MANAGER_PINNED_COMPARISONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_PINNED_COMPARISONS, FontManagerPinnedComparisonsClass))

typedef struct _FontManagerPinnedComparisons FontManagerPinnedComparisons;
typedef struct _FontManagerPinnedComparisonsClass FontManagerPinnedComparisonsClass;

#define FONT_MANAGER_TYPE_PREVIEW_ENTRY (font_manager_preview_entry_get_type ())
#define FONT_MANAGER_PREVIEW_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_PREVIEW_ENTRY, FontManagerPreviewEntry))
#define FONT_MANAGER_PREVIEW_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_PREVIEW_ENTRY, FontManagerPreviewEntryClass))
#define FONT_MANAGER_IS_PREVIEW_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_PREVIEW_ENTRY))
#define FONT_MANAGER_IS_PREVIEW_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_PREVIEW_ENTRY))
#define FONT_MANAGER_PREVIEW_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_PREVIEW_ENTRY, FontManagerPreviewEntryClass))

typedef struct _FontManagerPreviewEntry FontManagerPreviewEntry;
typedef struct _FontManagerPreviewEntryClass FontManagerPreviewEntryClass;
enum  {
	FONT_MANAGER_COMPARE_PANE_0_PROPERTY,
	FONT_MANAGER_COMPARE_PANE_PREVIEW_SIZE_PROPERTY,
	FONT_MANAGER_COMPARE_PANE_SELECTED_ITEMS_PROPERTY,
	FONT_MANAGER_COMPARE_PANE_SELECTED_CHILDREN_PROPERTY,
	FONT_MANAGER_COMPARE_PANE_AVAILABLE_FAMILIES_PROPERTY,
	FONT_MANAGER_COMPARE_PANE_MODEL_PROPERTY,
	FONT_MANAGER_COMPARE_PANE_PINNED_PROPERTY,
	FONT_MANAGER_COMPARE_PANE_PREVIEW_TEXT_PROPERTY,
	FONT_MANAGER_COMPARE_PANE_FONTSCALE_PROPERTY,
	FONT_MANAGER_COMPARE_PANE_PREVIEW_COLORS_PROPERTY,
	FONT_MANAGER_COMPARE_PANE_ENTRY_PROPERTY,
	FONT_MANAGER_COMPARE_PANE_NUM_PROPERTIES
};
static GParamSpec* font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_NUM_PROPERTIES];

#define FONT_MANAGER_TYPE_PINNED_COMPARISON_MODEL (font_manager_pinned_comparison_model_get_type ())
#define FONT_MANAGER_PINNED_COMPARISON_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_PINNED_COMPARISON_MODEL, FontManagerPinnedComparisonModel))
#define FONT_MANAGER_PINNED_COMPARISON_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_PINNED_COMPARISON_MODEL, FontManagerPinnedComparisonModelClass))
#define FONT_MANAGER_IS_PINNED_COMPARISON_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_PINNED_COMPARISON_MODEL))
#define FONT_MANAGER_IS_PINNED_COMPARISON_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_PINNED_COMPARISON_MODEL))
#define FONT_MANAGER_PINNED_COMPARISON_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_PINNED_COMPARISON_MODEL, FontManagerPinnedComparisonModelClass))

typedef struct _FontManagerPinnedComparisonModel FontManagerPinnedComparisonModel;
typedef struct _FontManagerPinnedComparisonModelClass FontManagerPinnedComparisonModelClass;
#define _json_array_unref0(var) ((var == NULL) ? NULL : (var = (json_array_unref (var), NULL)))
typedef struct _Block3Data Block3Data;

#define FONT_MANAGER_TYPE_PINNED_COMPARISON (font_manager_pinned_comparison_get_type ())
#define FONT_MANAGER_PINNED_COMPARISON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_PINNED_COMPARISON, FontManagerPinnedComparison))
#define FONT_MANAGER_PINNED_COMPARISON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_PINNED_COMPARISON, FontManagerPinnedComparisonClass))
#define FONT_MANAGER_IS_PINNED_COMPARISON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_PINNED_COMPARISON))
#define FONT_MANAGER_IS_PINNED_COMPARISON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_PINNED_COMPARISON))
#define FONT_MANAGER_PINNED_COMPARISON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_PINNED_COMPARISON, FontManagerPinnedComparisonClass))

typedef struct _FontManagerPinnedComparison FontManagerPinnedComparison;
typedef struct _FontManagerPinnedComparisonClass FontManagerPinnedComparisonClass;
typedef struct _FontManagerPinnedComparisonPrivate FontManagerPinnedComparisonPrivate;
enum  {
	FONT_MANAGER_PINNED_COMPARISON_0_PROPERTY,
	FONT_MANAGER_PINNED_COMPARISON_LABEL_PROPERTY,
	FONT_MANAGER_PINNED_COMPARISON_CREATED_PROPERTY,
	FONT_MANAGER_PINNED_COMPARISON_ITEMS_PROPERTY,
	FONT_MANAGER_PINNED_COMPARISON_NUM_PROPERTIES
};
static GParamSpec* font_manager_pinned_comparison_properties[FONT_MANAGER_PINNED_COMPARISON_NUM_PROPERTIES];
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
typedef struct _FontManagerPinnedComparisonModelPrivate FontManagerPinnedComparisonModelPrivate;
enum  {
	FONT_MANAGER_PINNED_COMPARISON_MODEL_0_PROPERTY,
	FONT_MANAGER_PINNED_COMPARISON_MODEL_NUM_PROPERTIES
};
static GParamSpec* font_manager_pinned_comparison_model_properties[FONT_MANAGER_PINNED_COMPARISON_MODEL_NUM_PROPERTIES];

#define FONT_MANAGER_TYPE_PINNED_COMPARISON_ROW (font_manager_pinned_comparison_row_get_type ())
#define FONT_MANAGER_PINNED_COMPARISON_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_PINNED_COMPARISON_ROW, FontManagerPinnedComparisonRow))
#define FONT_MANAGER_PINNED_COMPARISON_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_PINNED_COMPARISON_ROW, FontManagerPinnedComparisonRowClass))
#define FONT_MANAGER_IS_PINNED_COMPARISON_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_PINNED_COMPARISON_ROW))
#define FONT_MANAGER_IS_PINNED_COMPARISON_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_PINNED_COMPARISON_ROW))
#define FONT_MANAGER_PINNED_COMPARISON_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_PINNED_COMPARISON_ROW, FontManagerPinnedComparisonRowClass))

typedef struct _FontManagerPinnedComparisonRow FontManagerPinnedComparisonRow;
typedef struct _FontManagerPinnedComparisonRowClass FontManagerPinnedComparisonRowClass;
typedef struct _FontManagerPinnedComparisonRowPrivate FontManagerPinnedComparisonRowPrivate;
enum  {
	FONT_MANAGER_PINNED_COMPARISON_ROW_0_PROPERTY,
	FONT_MANAGER_PINNED_COMPARISON_ROW_NUM_PROPERTIES
};
static GParamSpec* font_manager_pinned_comparison_row_properties[FONT_MANAGER_PINNED_COMPARISON_ROW_NUM_PROPERTIES];
enum  {
	FONT_MANAGER_PINNED_COMPARISON_ROW_ACTIVATED_SIGNAL,
	FONT_MANAGER_PINNED_COMPARISON_ROW_NUM_SIGNALS
};
static guint font_manager_pinned_comparison_row_signals[FONT_MANAGER_PINNED_COMPARISON_ROW_NUM_SIGNALS] = {0};
typedef struct _FontManagerPinnedComparisonsPrivate FontManagerPinnedComparisonsPrivate;
enum  {
	FONT_MANAGER_PINNED_COMPARISONS_0_PROPERTY,
	FONT_MANAGER_PINNED_COMPARISONS_COMPARE_PROPERTY,
	FONT_MANAGER_PINNED_COMPARISONS_MODEL_PROPERTY,
	FONT_MANAGER_PINNED_COMPARISONS_NUM_PROPERTIES
};
static GParamSpec* font_manager_pinned_comparisons_properties[FONT_MANAGER_PINNED_COMPARISONS_NUM_PROPERTIES];
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))
typedef struct _Block4Data Block4Data;

struct _FontManagerCompareEntry {
	GObject parent_instance;
	FontManagerCompareEntryPrivate * priv;
};

struct _FontManagerCompareEntryClass {
	GObjectClass parent_class;
};

struct _FontManagerCompareEntryPrivate {
	GObject* _item;
	gdouble _preview_size;
	GdkRGBA _foreground_color;
	GdkRGBA _background_color;
	PangoFontDescription* _font_desc;
	PangoAttrList* _attrs;
	gchar* _preview_text;
	gchar* initial_preview;
	gchar* local_pangram;
};

struct _FontManagerCompareModel {
	GObject parent_instance;
	FontManagerCompareModelPrivate * priv;
};

struct _FontManagerCompareModelClass {
	GObjectClass parent_class;
};

struct _FontManagerCompareModelPrivate {
	GPtrArray* _items;
};

struct _FontManagerCompareRow {
	GtkGrid parent_instance;
	FontManagerCompareRowPrivate * priv;
};

struct _FontManagerCompareRowClass {
	GtkGridClass parent_class;
};

struct _FontManagerCompareRowPrivate {
	GtkLabel* description;
	GtkLabel* preview;
};

struct _FontManagerComparePane {
	GtkBox parent_instance;
	FontManagerComparePanePrivate * priv;
};

struct _FontManagerComparePaneClass {
	GtkBoxClass parent_class;
};

struct _FontManagerComparePanePrivate {
	gdouble _preview_size;
	GPtrArray* _selected_items;
	GPtrArray* _selected_children;
	FontManagerStringSet* _available_families;
	FontManagerCompareModel* _model;
	FontManagerPinnedComparisons* _pinned;
	FontManagerFontScale* _fontscale;
	FontManagerPreviewColors* _preview_colors;
	FontManagerPreviewEntry* _entry;
	GtkButton* add_button;
	GtkButton* remove_button;
	GtkMenuButton* pinned_button;
	GtkListBox* list;
	gboolean use_adwaita;
	gchar* _preview_text;
	gchar* default_preview_text;
};

struct _Block3Data {
	int _ref_count_;
	FontManagerComparePane* self;
	GPtrArray* results;
};

struct _FontManagerPinnedComparison {
	GObject parent_instance;
	FontManagerPinnedComparisonPrivate * priv;
};

struct _FontManagerPinnedComparisonClass {
	GObjectClass parent_class;
};

struct _FontManagerPinnedComparisonPrivate {
	gchar* _label;
	gchar* _created;
	GPtrArray* _items;
};

struct _FontManagerPinnedComparisonModel {
	GObject parent_instance;
	FontManagerPinnedComparisonModelPrivate * priv;
	GList* items;
};

struct _FontManagerPinnedComparisonModelClass {
	GObjectClass parent_class;
};

struct _FontManagerPinnedComparisonRow {
	GtkGrid parent_instance;
	FontManagerPinnedComparisonRowPrivate * priv;
};

struct _FontManagerPinnedComparisonRowClass {
	GtkGridClass parent_class;
};

struct _FontManagerPinnedComparisonRowPrivate {
	GtkEntry* label;
	GtkLabel* created;
};

struct _FontManagerPinnedComparisons {
	GtkPopover parent_instance;
	FontManagerPinnedComparisonsPrivate * priv;
};

struct _FontManagerPinnedComparisonsClass {
	GtkPopoverClass parent_class;
};

struct _FontManagerPinnedComparisonsPrivate {
	GtkListBox* list;
	GtkButton* save_button;
	GtkButton* remove_button;
	GtkButton* restore_button;
	FontManagerComparePane* _compare;
	FontManagerPinnedComparisonModel* _model;
};

struct _Block4Data {
	int _ref_count_;
	FontManagerPinnedComparisons* self;
	FontManagerPinnedComparison* item;
};

static gint FontManagerCompareEntry_private_offset;
static gpointer font_manager_compare_entry_parent_class = NULL;
static gint FontManagerCompareModel_private_offset;
static gpointer font_manager_compare_model_parent_class = NULL;
static GListModelInterface * font_manager_compare_model_g_list_model_parent_iface = NULL;
static gint FontManagerCompareRow_private_offset;
static gpointer font_manager_compare_row_parent_class = NULL;
static gint FontManagerComparePane_private_offset;
static gpointer font_manager_compare_pane_parent_class = NULL;
static gint FontManagerPinnedComparison_private_offset;
static gpointer font_manager_pinned_comparison_parent_class = NULL;
static gpointer font_manager_pinned_comparison_model_parent_class = NULL;
static GListModelInterface * font_manager_pinned_comparison_model_g_list_model_parent_iface = NULL;
static gint FontManagerPinnedComparisonRow_private_offset;
static gpointer font_manager_pinned_comparison_row_parent_class = NULL;
static gint FontManagerPinnedComparisons_private_offset;
static gpointer font_manager_pinned_comparisons_parent_class = NULL;

VALA_EXTERN GType font_manager_compare_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerCompareEntry, g_object_unref)
static void _vala_PangoFontDescription_free (PangoFontDescription* self);
VALA_EXTERN FontManagerCompareEntry* font_manager_compare_entry_new (GObject* item,
                                                         const gchar* preview_text,
                                                         const gchar* default_preview);
VALA_EXTERN FontManagerCompareEntry* font_manager_compare_entry_construct (GType object_type,
                                                               GObject* item,
                                                               const gchar* preview_text,
                                                               const gchar* default_preview);
VALA_EXTERN const gchar* font_manager_compare_entry_get_description (FontManagerCompareEntry* self);
VALA_EXTERN void font_manager_compare_entry_set_font_desc (FontManagerCompareEntry* self,
                                               PangoFontDescription* value);
VALA_EXTERN void font_manager_compare_entry_set_attrs (FontManagerCompareEntry* self,
                                           PangoAttrList* value);
VALA_EXTERN PangoAttrList* font_manager_compare_entry_get_attrs (FontManagerCompareEntry* self);
VALA_EXTERN PangoFontDescription* font_manager_compare_entry_get_font_desc (FontManagerCompareEntry* self);
VALA_EXTERN gdouble font_manager_compare_entry_get_preview_size (FontManagerCompareEntry* self);
static void __lambda104_ (FontManagerCompareEntry* self);
static void ___lambda104__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
VALA_EXTERN GObject* font_manager_compare_entry_get_item (FontManagerCompareEntry* self);
VALA_EXTERN void font_manager_compare_entry_set_item (FontManagerCompareEntry* self,
                                          GObject* value);
VALA_EXTERN void font_manager_compare_entry_set_preview_size (FontManagerCompareEntry* self,
                                                  gdouble value);
VALA_EXTERN void font_manager_compare_entry_get_foreground_color (FontManagerCompareEntry* self,
                                                      GdkRGBA * result);
VALA_EXTERN void font_manager_compare_entry_set_foreground_color (FontManagerCompareEntry* self,
                                                      GdkRGBA * value);
static gboolean _gdk_rgba_equal (const GdkRGBA * s1,
                          const GdkRGBA * s2);
VALA_EXTERN void font_manager_compare_entry_get_background_color (FontManagerCompareEntry* self,
                                                      GdkRGBA * result);
VALA_EXTERN void font_manager_compare_entry_set_background_color (FontManagerCompareEntry* self,
                                                      GdkRGBA * value);
static PangoFontDescription* _vala_PangoFontDescription_copy (PangoFontDescription* self);
VALA_EXTERN const gchar* font_manager_compare_entry_get_preview_text (FontManagerCompareEntry* self);
VALA_EXTERN void font_manager_compare_entry_set_preview_text (FontManagerCompareEntry* self,
                                                  const gchar* value);
static void font_manager_compare_entry_finalize (GObject * obj);
static GType font_manager_compare_entry_get_type_once (void);
static void _vala_font_manager_compare_entry_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static void _vala_font_manager_compare_entry_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec);
VALA_EXTERN GType font_manager_compare_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerCompareModel, g_object_unref)
static GType font_manager_compare_model_real_get_item_type (GListModel* base);
static guint font_manager_compare_model_real_get_n_items (GListModel* base);
VALA_EXTERN GPtrArray* font_manager_compare_model_get_items (FontManagerCompareModel* self);
static GObject* font_manager_compare_model_real_get_item (GListModel* base,
                                                   guint position);
VALA_EXTERN void font_manager_compare_model_add_item (FontManagerCompareModel* self,
                                          FontManagerCompareEntry* item);
VALA_EXTERN void font_manager_compare_model_remove_item (FontManagerCompareModel* self,
                                             guint position);
VALA_EXTERN FontManagerCompareModel* font_manager_compare_model_new (void);
VALA_EXTERN FontManagerCompareModel* font_manager_compare_model_construct (GType object_type);
static void font_manager_compare_model_set_items (FontManagerCompareModel* self,
                                           GPtrArray* value);
static GObject * font_manager_compare_model_constructor (GType type,
                                                  guint n_construct_properties,
                                                  GObjectConstructParam * construct_properties);
static void _g_object_unref0_ (gpointer var);
static void font_manager_compare_model_finalize (GObject * obj);
static GType font_manager_compare_model_get_type_once (void);
static void _vala_font_manager_compare_model_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static void _vala_font_manager_compare_model_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec);
VALA_EXTERN GType font_manager_compare_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerCompareRow, g_object_unref)
VALA_EXTERN FontManagerCompareRow* font_manager_compare_row_from_item (GObject* item);
VALA_EXTERN FontManagerCompareRow* font_manager_compare_row_new (void);
VALA_EXTERN FontManagerCompareRow* font_manager_compare_row_construct (GType object_type);
static void font_manager_compare_row_finalize (GObject * obj);
static GType font_manager_compare_row_get_type_once (void);
VALA_EXTERN GType font_manager_compare_pane_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerComparePane, g_object_unref)
VALA_EXTERN GType font_manager_pinned_comparisons_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerPinnedComparisons, g_object_unref)
VALA_EXTERN GType font_manager_preview_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerPreviewEntry, g_object_unref)
VALA_EXTERN FontManagerComparePane* font_manager_compare_pane_new (void);
VALA_EXTERN FontManagerComparePane* font_manager_compare_pane_construct (GType object_type);
static void __lambda114_ (FontManagerComparePane* self);
VALA_EXTERN FontManagerCompareModel* font_manager_compare_pane_get_model (FontManagerComparePane* self);
static GtkWidget* _font_manager_compare_row_from_item_gtk_list_box_create_widget_func (GObject* item,
                                                                                gpointer self);
static void ___lambda114__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
VALA_EXTERN void font_manager_compare_pane_set_model (FontManagerComparePane* self,
                                          FontManagerCompareModel* value);
VALA_EXTERN FontManagerPinnedComparisons* font_manager_pinned_comparisons_new (void);
VALA_EXTERN FontManagerPinnedComparisons* font_manager_pinned_comparisons_construct (GType object_type);
static void font_manager_compare_pane_set_pinned (FontManagerComparePane* self,
                                           FontManagerPinnedComparisons* value);
VALA_EXTERN FontManagerPinnedComparisons* font_manager_compare_pane_get_pinned (FontManagerComparePane* self);
VALA_EXTERN void font_manager_pinned_comparisons_set_compare (FontManagerPinnedComparisons* self,
                                                  FontManagerComparePane* value);
VALA_EXTERN FontManagerPreviewEntry* font_manager_compare_pane_get_entry (FontManagerComparePane* self);
VALA_EXTERN const gchar* font_manager_compare_pane_get_preview_text (FontManagerComparePane* self);
VALA_EXTERN FontManagerFontScale* font_manager_compare_pane_get_fontscale (FontManagerComparePane* self);
VALA_EXTERN void font_manager_set_control_sensitivity (GtkWidget* widget,
                                           gboolean sensitive);
VALA_EXTERN GType font_manager_pinned_comparison_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerPinnedComparisonModel, g_object_unref)
VALA_EXTERN FontManagerPinnedComparisonModel* font_manager_pinned_comparisons_get_model (FontManagerPinnedComparisons* self);
VALA_EXTERN void font_manager_compare_pane_on_items_changed (FontManagerComparePane* self,
                                                 guint position,
                                                 guint added,
                                                 guint removed);
static void _font_manager_compare_pane_on_items_changed_g_list_model_items_changed (GListModel* _sender,
                                                                             guint position,
                                                                             guint removed,
                                                                             guint added,
                                                                             gpointer self);
static void __lambda115_ (FontManagerComparePane* self);
static void ___lambda115__gtk_popover_closed (GtkPopover* _sender,
                                       gpointer self);
static void font_manager_compare_pane_force_css_update (FontManagerComparePane* self);
static void _font_manager_compare_pane_force_css_update_gtk_widget_map (GtkWidget* _sender,
                                                                 gpointer self);
VALA_EXTERN void font_manager_compare_pane_restore_state (FontManagerComparePane* self,
                                              GSettings* settings);
VALA_EXTERN FontManagerPreviewColors* font_manager_compare_pane_get_preview_colors (FontManagerComparePane* self);
VALA_EXTERN void font_manager_compare_pane_set_preview_size (FontManagerComparePane* self,
                                                 gdouble value);
static void font_manager_compare_pane_add_entry (FontManagerComparePane* self,
                                          GObject* item);
VALA_EXTERN void font_manager_compare_pane_add_items (FontManagerComparePane* self,
                                          GPtrArray* items);
VALA_EXTERN FontManagerStringSet* font_manager_compare_pane_get_available_families (FontManagerComparePane* self);
static void ______lambda112_ (FontManagerComparePane* self,
                       JsonArray* a,
                       guint i,
                       JsonNode* n);
static void _______lambda112__json_array_foreach (JsonArray* array,
                                           guint index_,
                                           JsonNode* element_node,
                                           gpointer self);
VALA_EXTERN GPtrArray* font_manager_compare_pane_list_items (FontManagerComparePane* self);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static void __lambda113_ (Block3Data* _data3_,
                   FontManagerCompareEntry* it);
static void ___lambda113__gfunc (gconstpointer data,
                          gpointer self);
static void font_manager_compare_pane_on_entry_changed (FontManagerComparePane* self);
VALA_EXTERN void font_manager_compare_pane_set_preview_text (FontManagerComparePane* self,
                                                 const gchar* value);
static void _font_manager_compare_pane_on_entry_changed_gtk_editable_changed (GtkEditable* _sender,
                                                                       gpointer self);
static void font_manager_compare_pane_on_list_row_selected (FontManagerComparePane* self,
                                                     GtkListBox* box,
                                                     GtkListBoxRow* row);
static void _font_manager_compare_pane_on_list_row_selected_gtk_list_box_row_selected (GtkListBox* _sender,
                                                                                GtkListBoxRow* row,
                                                                                gpointer self);
static void font_manager_compare_pane_on_add_button_clicked (FontManagerComparePane* self);
VALA_EXTERN GPtrArray* font_manager_compare_pane_get_selected_items (FontManagerComparePane* self);
VALA_EXTERN GPtrArray* font_manager_compare_pane_get_selected_children (FontManagerComparePane* self);
static void _font_manager_compare_pane_on_add_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                          gpointer self);
static void font_manager_compare_pane_on_remove_button_clicked (FontManagerComparePane* self);
static void _font_manager_compare_pane_on_remove_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                             gpointer self);
VALA_EXTERN gdouble font_manager_compare_pane_get_preview_size (FontManagerComparePane* self);
VALA_EXTERN void font_manager_compare_pane_set_selected_items (FontManagerComparePane* self,
                                                   GPtrArray* value);
VALA_EXTERN void font_manager_compare_pane_set_selected_children (FontManagerComparePane* self,
                                                      GPtrArray* value);
VALA_EXTERN void font_manager_compare_pane_set_available_families (FontManagerComparePane* self,
                                                       FontManagerStringSet* value);
static void font_manager_compare_pane_finalize (GObject * obj);
static GType font_manager_compare_pane_get_type_once (void);
static void _vala_font_manager_compare_pane_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec);
static void _vala_font_manager_compare_pane_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec);
VALA_EXTERN GType font_manager_pinned_comparison_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerPinnedComparison, g_object_unref)
VALA_EXTERN FontManagerPinnedComparison* font_manager_pinned_comparison_new (void);
VALA_EXTERN FontManagerPinnedComparison* font_manager_pinned_comparison_construct (GType object_type);
VALA_EXTERN const gchar* font_manager_pinned_comparison_get_label (FontManagerPinnedComparison* self);
VALA_EXTERN void font_manager_pinned_comparison_set_label (FontManagerPinnedComparison* self,
                                               const gchar* value);
VALA_EXTERN const gchar* font_manager_pinned_comparison_get_created (FontManagerPinnedComparison* self);
VALA_EXTERN void font_manager_pinned_comparison_set_created (FontManagerPinnedComparison* self,
                                                 const gchar* value);
VALA_EXTERN GPtrArray* font_manager_pinned_comparison_get_items (FontManagerPinnedComparison* self);
VALA_EXTERN void font_manager_pinned_comparison_set_items (FontManagerPinnedComparison* self,
                                               GPtrArray* value);
static void font_manager_pinned_comparison_finalize (GObject * obj);
static GType font_manager_pinned_comparison_get_type_once (void);
static void _vala_font_manager_pinned_comparison_get_property (GObject * object,
                                                        guint property_id,
                                                        GValue * value,
                                                        GParamSpec * pspec);
static void _vala_font_manager_pinned_comparison_set_property (GObject * object,
                                                        guint property_id,
                                                        const GValue * value,
                                                        GParamSpec * pspec);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static GType font_manager_pinned_comparison_model_real_get_item_type (GListModel* base);
static guint font_manager_pinned_comparison_model_real_get_n_items (GListModel* base);
static GObject* font_manager_pinned_comparison_model_real_get_item (GListModel* base,
                                                             guint position);
VALA_EXTERN void font_manager_pinned_comparison_model_add_item (FontManagerPinnedComparisonModel* self,
                                                    FontManagerPinnedComparison* item);
VALA_EXTERN void font_manager_pinned_comparison_model_remove_item (FontManagerPinnedComparisonModel* self,
                                                       guint position);
VALA_EXTERN FontManagerPinnedComparisonModel* font_manager_pinned_comparison_model_new (void);
VALA_EXTERN FontManagerPinnedComparisonModel* font_manager_pinned_comparison_model_construct (GType object_type);
static void font_manager_pinned_comparison_model_finalize (GObject * obj);
static GType font_manager_pinned_comparison_model_get_type_once (void);
VALA_EXTERN GType font_manager_pinned_comparison_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerPinnedComparisonRow, g_object_unref)
VALA_EXTERN FontManagerPinnedComparisonRow* font_manager_pinned_comparison_row_from_item (GObject* item);
VALA_EXTERN FontManagerPinnedComparisonRow* font_manager_pinned_comparison_row_new (void);
VALA_EXTERN FontManagerPinnedComparisonRow* font_manager_pinned_comparison_row_construct (GType object_type);
static gboolean font_manager_pinned_comparison_row_real_grab_focus (GtkWidget* base);
static GObject * font_manager_pinned_comparison_row_constructor (GType type,
                                                          guint n_construct_properties,
                                                          GObjectConstructParam * construct_properties);
static void _font_manager_pinned_comparison_row___lambda108_ (FontManagerPinnedComparisonRow* self);
static void __font_manager_pinned_comparison_row___lambda108__gtk_entry_activate (GtkEntry* _sender,
                                                                           gpointer self);
static void font_manager_pinned_comparison_row_finalize (GObject * obj);
static GType font_manager_pinned_comparison_row_get_type_once (void);
static void font_manager_pinned_comparisons_real_constructed (GObject* base);
static void __lambda105_ (FontManagerPinnedComparisons* self);
VALA_EXTERN FontManagerComparePane* font_manager_pinned_comparisons_get_compare (FontManagerPinnedComparisons* self);
static void ___lambda106_ (FontManagerPinnedComparisons* self,
                    guint p,
                    guint r,
                    guint a);
static void ____lambda106__g_list_model_items_changed (GListModel* _sender,
                                                guint position,
                                                guint removed,
                                                guint added,
                                                gpointer self);
static void ___lambda105__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void __lambda107_ (FontManagerPinnedComparisons* self,
                   GObject* obj,
                   GParamSpec* pspec);
static GtkWidget* _font_manager_pinned_comparison_row_from_item_gtk_list_box_create_widget_func (GObject* item,
                                                                                          gpointer self);
static void font_manager_pinned_comparisons_on_items_changed (FontManagerPinnedComparisons* self,
                                                       guint position,
                                                       guint removed,
                                                       guint added);
static void _font_manager_pinned_comparisons_on_items_changed_g_list_model_items_changed (GListModel* _sender,
                                                                                   guint position,
                                                                                   guint removed,
                                                                                   guint added,
                                                                                   gpointer self);
static void ___lambda107__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
VALA_EXTERN void font_manager_pinned_comparisons_set_model (FontManagerPinnedComparisons* self,
                                                FontManagerPinnedComparisonModel* value);
VALA_EXTERN void font_manager_pinned_comparisons_load (FontManagerPinnedComparisons* self);
static gchar* font_manager_pinned_comparisons_get_cache_file (void);
static void ___lambda109_ (FontManagerPinnedComparisons* self);
static void ____lambda109__font_manager_pinned_comparison_row_activated (FontManagerPinnedComparisonRow* _sender,
                                                                  gpointer self);
static void _vala_JsonNode_free (JsonNode* self);
static void __lambda110_ (FontManagerPinnedComparisons* self,
                   JsonArray* array,
                   guint index,
                   JsonNode* node);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
static void __lambda111_ (Block4Data* _data4_,
                   JsonArray* a,
                   guint i,
                   JsonNode* n);
static void ___lambda111__json_array_foreach (JsonArray* array,
                                       guint index_,
                                       JsonNode* element_node,
                                       gpointer self);
static void ___lambda110__json_array_foreach (JsonArray* array,
                                       guint index_,
                                       JsonNode* element_node,
                                       gpointer self);
static void font_manager_pinned_comparisons_on_list_row_activated (FontManagerPinnedComparisons* self,
                                                            GtkListBox* box,
                                                            GtkListBoxRow* row);
static void font_manager_pinned_comparisons_on_restore_button_clicked (FontManagerPinnedComparisons* self);
static void _font_manager_pinned_comparisons_on_list_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                        GtkListBoxRow* row,
                                                                                        gpointer self);
static void font_manager_pinned_comparisons_on_list_row_selected (FontManagerPinnedComparisons* self,
                                                           GtkListBox* box,
                                                           GtkListBoxRow* row);
static void _font_manager_pinned_comparisons_on_list_row_selected_gtk_list_box_row_selected (GtkListBox* _sender,
                                                                                      GtkListBoxRow* row,
                                                                                      gpointer self);
static void font_manager_pinned_comparisons_on_closed (FontManagerPinnedComparisons* self);
static void _font_manager_pinned_comparisons_on_closed_gtk_popover_closed (GtkPopover* _sender,
                                                                    gpointer self);
static void font_manager_pinned_comparisons_on_save_clicked (FontManagerPinnedComparisons* self);
static void _font_manager_pinned_comparisons_on_save_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                          gpointer self);
static void font_manager_pinned_comparisons_on_remove_clicked (FontManagerPinnedComparisons* self);
static void _font_manager_pinned_comparisons_on_remove_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static void _font_manager_pinned_comparisons_on_restore_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                    gpointer self);
static void font_manager_pinned_comparisons_finalize (GObject * obj);
static GType font_manager_pinned_comparisons_get_type_once (void);
static void _vala_font_manager_pinned_comparisons_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec);
static void _vala_font_manager_pinned_comparisons_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_compare_entry_get_instance_private (FontManagerCompareEntry* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerCompareEntry_private_offset);
}

static void
_vala_PangoFontDescription_free (PangoFontDescription* self)
{
	g_boxed_free (pango_font_description_get_type (), self);
}

static void
__lambda104_ (FontManagerCompareEntry* self)
{
	PangoFontDescription* _tmp0_;
	gdouble _tmp1_;
	PangoAttrList* _tmp2_;
	PangoFontDescription* _tmp3_;
	PangoAttrFontDesc* _tmp4_;
	_tmp0_ = self->priv->_font_desc;
	_tmp1_ = self->priv->_preview_size;
	pango_font_description_set_absolute_size (_tmp0_, _tmp1_ * PANGO_SCALE);
	_tmp2_ = self->priv->_attrs;
	_tmp3_ = self->priv->_font_desc;
	_tmp4_ = (PangoAttrFontDesc*) pango_attr_font_desc_new (_tmp3_);
	pango_attr_list_change (_tmp2_, (PangoAttribute*) _tmp4_);
	g_object_notify ((GObject*) self, "attrs");
}

static void
___lambda104__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda104_ ((FontManagerCompareEntry*) self);
}

FontManagerCompareEntry*
font_manager_compare_entry_construct (GType object_type,
                                      GObject* item,
                                      const gchar* preview_text,
                                      const gchar* default_preview)
{
	FontManagerCompareEntry * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	PangoFontDescription* _tmp4_;
	PangoFontDescription* _tmp5_;
	PangoAttrList* _tmp6_;
	PangoAttrList* _tmp7_;
	PangoAttrList* _tmp8_;
	PangoAttribute* _tmp9_;
	PangoAttrList* _tmp10_;
	PangoFontDescription* _tmp11_;
	PangoAttrFontDesc* _tmp12_;
	PangoFontDescription* _tmp13_;
	gdouble _tmp14_;
	g_return_val_if_fail (item != NULL, NULL);
	g_return_val_if_fail (preview_text != NULL, NULL);
	g_return_val_if_fail (default_preview != NULL, NULL);
	self = (FontManagerCompareEntry*) g_object_new (object_type, "item", item, "preview-text", preview_text, NULL);
	_tmp0_ = g_strdup (default_preview);
	_g_free0 (self->priv->initial_preview);
	self->priv->initial_preview = _tmp0_;
	_tmp1_ = font_manager_get_localized_pangram ();
	_g_free0 (self->priv->local_pangram);
	self->priv->local_pangram = _tmp1_;
	_tmp2_ = font_manager_compare_entry_get_description (self);
	_tmp3_ = _tmp2_;
	_tmp4_ = pango_font_description_from_string (_tmp3_);
	_tmp5_ = _tmp4_;
	font_manager_compare_entry_set_font_desc (self, _tmp5_);
	__vala_PangoFontDescription_free0 (_tmp5_);
	_tmp6_ = pango_attr_list_new ();
	_tmp7_ = _tmp6_;
	font_manager_compare_entry_set_attrs (self, _tmp7_);
	_pango_attr_list_unref0 (_tmp7_);
	_tmp8_ = self->priv->_attrs;
	_tmp9_ = pango_attr_fallback_new (FALSE);
	pango_attr_list_insert (_tmp8_, _tmp9_);
	_tmp10_ = self->priv->_attrs;
	_tmp11_ = self->priv->_font_desc;
	_tmp12_ = (PangoAttrFontDesc*) pango_attr_font_desc_new (_tmp11_);
	pango_attr_list_insert (_tmp10_, (PangoAttribute*) _tmp12_);
	_tmp13_ = self->priv->_font_desc;
	_tmp14_ = self->priv->_preview_size;
	pango_font_description_set_absolute_size (_tmp13_, _tmp14_ * PANGO_SCALE);
	g_signal_connect_object ((GObject*) self, "notify::preview-size", (GCallback) ___lambda104__g_object_notify, self, 0);
	return self;
}

FontManagerCompareEntry*
font_manager_compare_entry_new (GObject* item,
                                const gchar* preview_text,
                                const gchar* default_preview)
{
	return font_manager_compare_entry_construct (FONT_MANAGER_TYPE_COMPARE_ENTRY, item, preview_text, default_preview);
}

GObject*
font_manager_compare_entry_get_item (FontManagerCompareEntry* self)
{
	GObject* result;
	GObject* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_item;
	result = _tmp0_;
	return result;
}

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

void
font_manager_compare_entry_set_item (FontManagerCompareEntry* self,
                                     GObject* value)
{
	GObject* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_compare_entry_get_item (self);
	if (old_value != value) {
		GObject* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_item);
		self->priv->_item = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_ITEM_PROPERTY]);
	}
}

gdouble
font_manager_compare_entry_get_preview_size (FontManagerCompareEntry* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, 0.0);
	result = self->priv->_preview_size;
	return result;
}

void
font_manager_compare_entry_set_preview_size (FontManagerCompareEntry* self,
                                             gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_compare_entry_get_preview_size (self);
	if (old_value != value) {
		self->priv->_preview_size = value;
		g_object_notify_by_pspec ((GObject *) self, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_PREVIEW_SIZE_PROPERTY]);
	}
}

void
font_manager_compare_entry_get_foreground_color (FontManagerCompareEntry* self,
                                                 GdkRGBA * result)
{
	GdkRGBA _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_foreground_color;
	*result = _tmp0_;
	return;
}

static gboolean
_gdk_rgba_equal (const GdkRGBA * s1,
                 const GdkRGBA * s2)
{
	if (s1 == s2) {
		return TRUE;
	}
	if (s1 == NULL) {
		return FALSE;
	}
	if (s2 == NULL) {
		return FALSE;
	}
	if (s1->red != s2->red) {
		return FALSE;
	}
	if (s1->green != s2->green) {
		return FALSE;
	}
	if (s1->blue != s2->blue) {
		return FALSE;
	}
	if (s1->alpha != s2->alpha) {
		return FALSE;
	}
	return TRUE;
}

void
font_manager_compare_entry_set_foreground_color (FontManagerCompareEntry* self,
                                                 GdkRGBA * value)
{
	GdkRGBA old_value;
	g_return_if_fail (self != NULL);
	font_manager_compare_entry_get_foreground_color (self, &old_value);
	if (_gdk_rgba_equal (value, &old_value) != TRUE) {
		GdkRGBA _tmp0_;
		_tmp0_ = *value;
		self->priv->_foreground_color = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_FOREGROUND_COLOR_PROPERTY]);
	}
}

void
font_manager_compare_entry_get_background_color (FontManagerCompareEntry* self,
                                                 GdkRGBA * result)
{
	GdkRGBA _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_background_color;
	*result = _tmp0_;
	return;
}

void
font_manager_compare_entry_set_background_color (FontManagerCompareEntry* self,
                                                 GdkRGBA * value)
{
	GdkRGBA old_value;
	g_return_if_fail (self != NULL);
	font_manager_compare_entry_get_background_color (self, &old_value);
	if (_gdk_rgba_equal (value, &old_value) != TRUE) {
		GdkRGBA _tmp0_;
		_tmp0_ = *value;
		self->priv->_background_color = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_BACKGROUND_COLOR_PROPERTY]);
	}
}

PangoFontDescription*
font_manager_compare_entry_get_font_desc (FontManagerCompareEntry* self)
{
	PangoFontDescription* result;
	PangoFontDescription* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_font_desc;
	result = _tmp0_;
	return result;
}

static PangoFontDescription*
_vala_PangoFontDescription_copy (PangoFontDescription* self)
{
	return g_boxed_copy (pango_font_description_get_type (), self);
}

static gpointer
__vala_PangoFontDescription_copy0 (gpointer self)
{
	return self ? _vala_PangoFontDescription_copy (self) : NULL;
}

void
font_manager_compare_entry_set_font_desc (FontManagerCompareEntry* self,
                                          PangoFontDescription* value)
{
	PangoFontDescription* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_compare_entry_get_font_desc (self);
	if (old_value != value) {
		PangoFontDescription* _tmp0_;
		_tmp0_ = __vala_PangoFontDescription_copy0 (value);
		__vala_PangoFontDescription_free0 (self->priv->_font_desc);
		self->priv->_font_desc = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_FONT_DESC_PROPERTY]);
	}
}

PangoAttrList*
font_manager_compare_entry_get_attrs (FontManagerCompareEntry* self)
{
	PangoAttrList* result;
	PangoAttrList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_attrs;
	result = _tmp0_;
	return result;
}

static gpointer
_pango_attr_list_ref0 (gpointer self)
{
	return self ? pango_attr_list_ref (self) : NULL;
}

void
font_manager_compare_entry_set_attrs (FontManagerCompareEntry* self,
                                      PangoAttrList* value)
{
	PangoAttrList* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_compare_entry_get_attrs (self);
	if (old_value != value) {
		PangoAttrList* _tmp0_;
		_tmp0_ = _pango_attr_list_ref0 (value);
		_pango_attr_list_unref0 (self->priv->_attrs);
		self->priv->_attrs = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_ATTRS_PROPERTY]);
	}
}

const gchar*
font_manager_compare_entry_get_preview_text (FontManagerCompareEntry* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_preview_text;
	result = _tmp0_;
	return result;
}

void
font_manager_compare_entry_set_preview_text (FontManagerCompareEntry* self,
                                             const gchar* value)
{
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	if (value != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = self->priv->local_pangram;
		_tmp1_ = g_strcmp0 (value, _tmp2_) != 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = value;
	} else {
		const gchar* _tmp3_;
		_tmp3_ = self->priv->initial_preview;
		_tmp0_ = _tmp3_;
	}
	_tmp4_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_preview_text);
	self->priv->_preview_text = _tmp4_;
	g_object_notify_by_pspec ((GObject *) self, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_PREVIEW_TEXT_PROPERTY]);
}

const gchar*
font_manager_compare_entry_get_description (FontManagerCompareEntry* self)
{
	const gchar* result;
	JsonObject* source_object = NULL;
	GObject* _tmp0_;
	JsonObject* _tmp1_ = NULL;
	JsonObject* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	source_object = NULL;
	_tmp0_ = self->priv->_item;
	g_object_get (_tmp0_, FONT_MANAGER_JSON_PROXY_SOURCE, &_tmp1_, NULL, NULL);
	_json_object_unref0 (source_object);
	source_object = _tmp1_;
	_tmp2_ = source_object;
	if (_tmp2_ != NULL) {
		JsonObject* _tmp3_;
		const gchar* _tmp4_;
		_tmp3_ = source_object;
		_tmp4_ = json_object_get_string_member (_tmp3_, "description");
		result = _tmp4_;
		_json_object_unref0 (source_object);
		return result;
	}
	result = NULL;
	_json_object_unref0 (source_object);
	return result;
}

static void
font_manager_compare_entry_class_init (FontManagerCompareEntryClass * klass,
                                       gpointer klass_data)
{
	font_manager_compare_entry_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerCompareEntry_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_compare_entry_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_compare_entry_set_property;
	G_OBJECT_CLASS (klass)->finalize = font_manager_compare_entry_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_ENTRY_ITEM_PROPERTY, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_ITEM_PROPERTY] = g_param_spec_object ("item", "item", "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_COMPARE_ENTRY_PREVIEW_SIZE_PROPERTY, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_PREVIEW_SIZE_PROPERTY] = g_param_spec_double ("preview-size", "preview-size", "preview-size", -G_MAXDOUBLE, G_MAXDOUBLE, FONT_MANAGER_LARGE_PREVIEW_SIZE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_ENTRY_FOREGROUND_COLOR_PROPERTY, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_FOREGROUND_COLOR_PROPERTY] = g_param_spec_boxed ("foreground-color", "foreground-color", "foreground-color", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_ENTRY_BACKGROUND_COLOR_PROPERTY, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_BACKGROUND_COLOR_PROPERTY] = g_param_spec_boxed ("background-color", "background-color", "background-color", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_ENTRY_FONT_DESC_PROPERTY, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_FONT_DESC_PROPERTY] = g_param_spec_boxed ("font-desc", "font-desc", "font-desc", pango_font_description_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_ENTRY_ATTRS_PROPERTY, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_ATTRS_PROPERTY] = g_param_spec_boxed ("attrs", "attrs", "attrs", pango_attr_list_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_ENTRY_PREVIEW_TEXT_PROPERTY, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_PREVIEW_TEXT_PROPERTY] = g_param_spec_string ("preview-text", "preview-text", "preview-text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_ENTRY_DESCRIPTION_PROPERTY, font_manager_compare_entry_properties[FONT_MANAGER_COMPARE_ENTRY_DESCRIPTION_PROPERTY] = g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
font_manager_compare_entry_instance_init (FontManagerCompareEntry * self,
                                          gpointer klass)
{
	self->priv = font_manager_compare_entry_get_instance_private (self);
	self->priv->_item = NULL;
	self->priv->_preview_size = FONT_MANAGER_LARGE_PREVIEW_SIZE;
	self->priv->_font_desc = NULL;
	self->priv->_attrs = NULL;
	self->priv->_preview_text = NULL;
	self->priv->initial_preview = NULL;
	self->priv->local_pangram = NULL;
}

static void
font_manager_compare_entry_finalize (GObject * obj)
{
	FontManagerCompareEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_COMPARE_ENTRY, FontManagerCompareEntry);
	_g_object_unref0 (self->priv->_item);
	__vala_PangoFontDescription_free0 (self->priv->_font_desc);
	_pango_attr_list_unref0 (self->priv->_attrs);
	_g_free0 (self->priv->_preview_text);
	_g_free0 (self->priv->initial_preview);
	_g_free0 (self->priv->local_pangram);
	G_OBJECT_CLASS (font_manager_compare_entry_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_compare_entry_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerCompareEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_compare_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerCompareEntry), 0, (GInstanceInitFunc) font_manager_compare_entry_instance_init, NULL };
	GType font_manager_compare_entry_type_id;
	font_manager_compare_entry_type_id = g_type_register_static (G_TYPE_OBJECT, "FontManagerCompareEntry", &g_define_type_info, 0);
	FontManagerCompareEntry_private_offset = g_type_add_instance_private (font_manager_compare_entry_type_id, sizeof (FontManagerCompareEntryPrivate));
	return font_manager_compare_entry_type_id;
}

GType
font_manager_compare_entry_get_type (void)
{
	static volatile gsize font_manager_compare_entry_type_id__once = 0;
	if (g_once_init_enter (&font_manager_compare_entry_type_id__once)) {
		GType font_manager_compare_entry_type_id;
		font_manager_compare_entry_type_id = font_manager_compare_entry_get_type_once ();
		g_once_init_leave (&font_manager_compare_entry_type_id__once, font_manager_compare_entry_type_id);
	}
	return font_manager_compare_entry_type_id__once;
}

static void
_vala_font_manager_compare_entry_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	FontManagerCompareEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_COMPARE_ENTRY, FontManagerCompareEntry);
	switch (property_id) {
		case FONT_MANAGER_COMPARE_ENTRY_ITEM_PROPERTY:
		g_value_set_object (value, font_manager_compare_entry_get_item (self));
		break;
		case FONT_MANAGER_COMPARE_ENTRY_PREVIEW_SIZE_PROPERTY:
		g_value_set_double (value, font_manager_compare_entry_get_preview_size (self));
		break;
		case FONT_MANAGER_COMPARE_ENTRY_FOREGROUND_COLOR_PROPERTY:
		{
			GdkRGBA boxed;
			font_manager_compare_entry_get_foreground_color (self, &boxed);
			g_value_set_boxed (value, &boxed);
		}
		break;
		case FONT_MANAGER_COMPARE_ENTRY_BACKGROUND_COLOR_PROPERTY:
		{
			GdkRGBA boxed;
			font_manager_compare_entry_get_background_color (self, &boxed);
			g_value_set_boxed (value, &boxed);
		}
		break;
		case FONT_MANAGER_COMPARE_ENTRY_FONT_DESC_PROPERTY:
		g_value_set_boxed (value, font_manager_compare_entry_get_font_desc (self));
		break;
		case FONT_MANAGER_COMPARE_ENTRY_ATTRS_PROPERTY:
		g_value_set_boxed (value, font_manager_compare_entry_get_attrs (self));
		break;
		case FONT_MANAGER_COMPARE_ENTRY_PREVIEW_TEXT_PROPERTY:
		g_value_set_string (value, font_manager_compare_entry_get_preview_text (self));
		break;
		case FONT_MANAGER_COMPARE_ENTRY_DESCRIPTION_PROPERTY:
		g_value_set_string (value, font_manager_compare_entry_get_description (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_compare_entry_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec)
{
	FontManagerCompareEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_COMPARE_ENTRY, FontManagerCompareEntry);
	switch (property_id) {
		case FONT_MANAGER_COMPARE_ENTRY_ITEM_PROPERTY:
		font_manager_compare_entry_set_item (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_COMPARE_ENTRY_PREVIEW_SIZE_PROPERTY:
		font_manager_compare_entry_set_preview_size (self, g_value_get_double (value));
		break;
		case FONT_MANAGER_COMPARE_ENTRY_FOREGROUND_COLOR_PROPERTY:
		font_manager_compare_entry_set_foreground_color (self, g_value_get_boxed (value));
		break;
		case FONT_MANAGER_COMPARE_ENTRY_BACKGROUND_COLOR_PROPERTY:
		font_manager_compare_entry_set_background_color (self, g_value_get_boxed (value));
		break;
		case FONT_MANAGER_COMPARE_ENTRY_FONT_DESC_PROPERTY:
		font_manager_compare_entry_set_font_desc (self, g_value_get_boxed (value));
		break;
		case FONT_MANAGER_COMPARE_ENTRY_ATTRS_PROPERTY:
		font_manager_compare_entry_set_attrs (self, g_value_get_boxed (value));
		break;
		case FONT_MANAGER_COMPARE_ENTRY_PREVIEW_TEXT_PROPERTY:
		font_manager_compare_entry_set_preview_text (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
font_manager_compare_model_get_instance_private (FontManagerCompareModel* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerCompareModel_private_offset);
}

static GType
font_manager_compare_model_real_get_item_type (GListModel* base)
{
	FontManagerCompareModel * self;
	GType result;
	self = (FontManagerCompareModel*) base;
	result = FONT_MANAGER_TYPE_COMPARE_ENTRY;
	return result;
}

static gint
vala_g_ptr_array_get_length (GPtrArray* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = (gint) self->len;
	return result;
}

static guint
font_manager_compare_model_real_get_n_items (GListModel* base)
{
	FontManagerCompareModel * self;
	GPtrArray* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	guint result;
	self = (FontManagerCompareModel*) base;
	_tmp0_ = self->priv->_items;
	_tmp1_ = vala_g_ptr_array_get_length (_tmp0_);
	_tmp2_ = _tmp1_;
	result = (guint) _tmp2_;
	return result;
}

static GObject*
font_manager_compare_model_real_get_item (GListModel* base,
                                          guint position)
{
	FontManagerCompareModel * self;
	GPtrArray* _tmp0_;
	gconstpointer _tmp1_;
	GObject* _tmp2_;
	GObject* result;
	self = (FontManagerCompareModel*) base;
	_tmp0_ = self->priv->_items;
	_tmp1_ = g_ptr_array_index (_tmp0_, position);
	_tmp2_ = _g_object_ref0 ((GObject*) ((FontManagerCompareEntry*) _tmp1_));
	result = _tmp2_;
	return result;
}

void
font_manager_compare_model_add_item (FontManagerCompareModel* self,
                                     FontManagerCompareEntry* item)
{
	GPtrArray* _tmp0_;
	FontManagerCompareEntry* _tmp1_;
	guint position = 0U;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->_items;
	_tmp1_ = _g_object_ref0 (item);
	g_ptr_array_add (_tmp0_, _tmp1_);
	position = g_list_model_get_n_items ((GListModel*) self) - 1;
	g_list_model_items_changed ((GListModel*) self, position, (guint) 0, (guint) 1);
	return;
}

void
font_manager_compare_model_remove_item (FontManagerCompareModel* self,
                                        guint position)
{
	GPtrArray* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_items;
	g_ptr_array_remove_index (_tmp0_, position);
	g_list_model_items_changed ((GListModel*) self, position, (guint) 1, (guint) 0);
	return;
}

FontManagerCompareModel*
font_manager_compare_model_construct (GType object_type)
{
	FontManagerCompareModel * self = NULL;
	self = (FontManagerCompareModel*) g_object_new (object_type, NULL);
	return self;
}

FontManagerCompareModel*
font_manager_compare_model_new (void)
{
	return font_manager_compare_model_construct (FONT_MANAGER_TYPE_COMPARE_MODEL);
}

GPtrArray*
font_manager_compare_model_get_items (FontManagerCompareModel* self)
{
	GPtrArray* result;
	GPtrArray* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_items;
	result = _tmp0_;
	return result;
}

static gpointer
_g_ptr_array_ref0 (gpointer self)
{
	return self ? g_ptr_array_ref (self) : NULL;
}

static void
font_manager_compare_model_set_items (FontManagerCompareModel* self,
                                      GPtrArray* value)
{
	GPtrArray* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_compare_model_get_items (self);
	if (old_value != value) {
		GPtrArray* _tmp0_;
		_tmp0_ = _g_ptr_array_ref0 (value);
		_g_ptr_array_unref0 (self->priv->_items);
		self->priv->_items = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_compare_model_properties[FONT_MANAGER_COMPARE_MODEL_ITEMS_PROPERTY]);
	}
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static GObject *
font_manager_compare_model_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FontManagerCompareModel * self;
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	parent_class = G_OBJECT_CLASS (font_manager_compare_model_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_COMPARE_MODEL, FontManagerCompareModel);
	_tmp0_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_tmp1_ = _tmp0_;
	font_manager_compare_model_set_items (self, _tmp1_);
	_g_ptr_array_unref0 (_tmp1_);
	return obj;
}

static void
font_manager_compare_model_class_init (FontManagerCompareModelClass * klass,
                                       gpointer klass_data)
{
	font_manager_compare_model_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerCompareModel_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_compare_model_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_compare_model_set_property;
	G_OBJECT_CLASS (klass)->constructor = font_manager_compare_model_constructor;
	G_OBJECT_CLASS (klass)->finalize = font_manager_compare_model_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_MODEL_ITEMS_PROPERTY, font_manager_compare_model_properties[FONT_MANAGER_COMPARE_MODEL_ITEMS_PROPERTY] = g_param_spec_boxed ("items", "items", "items", G_TYPE_PTR_ARRAY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
font_manager_compare_model_g_list_model_interface_init (GListModelInterface * iface,
                                                        gpointer iface_data)
{
	font_manager_compare_model_g_list_model_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_item_type = (GType (*) (GListModel*)) font_manager_compare_model_real_get_item_type;
	iface->get_n_items = (guint (*) (GListModel*)) font_manager_compare_model_real_get_n_items;
	iface->get_item = (GObject* (*) (GListModel*, guint)) font_manager_compare_model_real_get_item;
}

static void
font_manager_compare_model_instance_init (FontManagerCompareModel * self,
                                          gpointer klass)
{
	self->priv = font_manager_compare_model_get_instance_private (self);
}

static void
font_manager_compare_model_finalize (GObject * obj)
{
	FontManagerCompareModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_COMPARE_MODEL, FontManagerCompareModel);
	_g_ptr_array_unref0 (self->priv->_items);
	G_OBJECT_CLASS (font_manager_compare_model_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_compare_model_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerCompareModelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_compare_model_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerCompareModel), 0, (GInstanceInitFunc) font_manager_compare_model_instance_init, NULL };
	static const GInterfaceInfo g_list_model_info = { (GInterfaceInitFunc) font_manager_compare_model_g_list_model_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType font_manager_compare_model_type_id;
	font_manager_compare_model_type_id = g_type_register_static (G_TYPE_OBJECT, "FontManagerCompareModel", &g_define_type_info, 0);
	g_type_add_interface_static (font_manager_compare_model_type_id, g_list_model_get_type (), &g_list_model_info);
	FontManagerCompareModel_private_offset = g_type_add_instance_private (font_manager_compare_model_type_id, sizeof (FontManagerCompareModelPrivate));
	return font_manager_compare_model_type_id;
}

GType
font_manager_compare_model_get_type (void)
{
	static volatile gsize font_manager_compare_model_type_id__once = 0;
	if (g_once_init_enter (&font_manager_compare_model_type_id__once)) {
		GType font_manager_compare_model_type_id;
		font_manager_compare_model_type_id = font_manager_compare_model_get_type_once ();
		g_once_init_leave (&font_manager_compare_model_type_id__once, font_manager_compare_model_type_id);
	}
	return font_manager_compare_model_type_id__once;
}

static void
_vala_font_manager_compare_model_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	FontManagerCompareModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_COMPARE_MODEL, FontManagerCompareModel);
	switch (property_id) {
		case FONT_MANAGER_COMPARE_MODEL_ITEMS_PROPERTY:
		g_value_set_boxed (value, font_manager_compare_model_get_items (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_compare_model_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec)
{
	FontManagerCompareModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_COMPARE_MODEL, FontManagerCompareModel);
	switch (property_id) {
		case FONT_MANAGER_COMPARE_MODEL_ITEMS_PROPERTY:
		font_manager_compare_model_set_items (self, g_value_get_boxed (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
font_manager_compare_row_get_instance_private (FontManagerCompareRow* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerCompareRow_private_offset);
}

FontManagerCompareRow*
font_manager_compare_row_from_item (GObject* item)
{
	FontManagerCompareRow* row = NULL;
	FontManagerCompareRow* _tmp0_;
	GBindingFlags flags = 0U;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	FontManagerCompareRow* result;
	g_return_val_if_fail (item != NULL, NULL);
	_tmp0_ = font_manager_compare_row_new ();
	g_object_ref_sink (_tmp0_);
	row = _tmp0_;
	flags = G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE;
	_tmp1_ = row->priv->description;
	g_object_bind_property_with_closures (item, "description", (GObject*) _tmp1_, "label", 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)));
	_tmp2_ = row->priv->preview;
	g_object_bind_property_with_closures (item, "preview-text", (GObject*) _tmp2_, "label", 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)));
	_tmp3_ = row->priv->preview;
	g_object_bind_property_with_closures (item, "attrs", (GObject*) _tmp3_, "attributes", 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)));
	result = row;
	return result;
}

FontManagerCompareRow*
font_manager_compare_row_construct (GType object_type)
{
	FontManagerCompareRow * self = NULL;
	self = (FontManagerCompareRow*) g_object_new (object_type, NULL);
	return self;
}

FontManagerCompareRow*
font_manager_compare_row_new (void)
{
	return font_manager_compare_row_construct (FONT_MANAGER_TYPE_COMPARE_ROW);
}

static void
font_manager_compare_row_class_init (FontManagerCompareRowClass * klass,
                                     gpointer klass_data)
{
	font_manager_compare_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerCompareRow_private_offset);
	G_OBJECT_CLASS (klass)->finalize = font_manager_compare_row_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/github/FontManager/FontManager/ui/font-manager-compare-row.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "description", FALSE, FontManagerCompareRow_private_offset + G_STRUCT_OFFSET (FontManagerCompareRowPrivate, description));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "preview", FALSE, FontManagerCompareRow_private_offset + G_STRUCT_OFFSET (FontManagerCompareRowPrivate, preview));
}

static void
font_manager_compare_row_instance_init (FontManagerCompareRow * self,
                                        gpointer klass)
{
	self->priv = font_manager_compare_row_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
font_manager_compare_row_finalize (GObject * obj)
{
	FontManagerCompareRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_COMPARE_ROW, FontManagerCompareRow);
	G_OBJECT_CLASS (font_manager_compare_row_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_compare_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerCompareRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_compare_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerCompareRow), 0, (GInstanceInitFunc) font_manager_compare_row_instance_init, NULL };
	GType font_manager_compare_row_type_id;
	font_manager_compare_row_type_id = g_type_register_static (gtk_grid_get_type (), "FontManagerCompareRow", &g_define_type_info, 0);
	FontManagerCompareRow_private_offset = g_type_add_instance_private (font_manager_compare_row_type_id, sizeof (FontManagerCompareRowPrivate));
	return font_manager_compare_row_type_id;
}

GType
font_manager_compare_row_get_type (void)
{
	static volatile gsize font_manager_compare_row_type_id__once = 0;
	if (g_once_init_enter (&font_manager_compare_row_type_id__once)) {
		GType font_manager_compare_row_type_id;
		font_manager_compare_row_type_id = font_manager_compare_row_get_type_once ();
		g_once_init_leave (&font_manager_compare_row_type_id__once, font_manager_compare_row_type_id);
	}
	return font_manager_compare_row_type_id__once;
}

static inline gpointer
font_manager_compare_pane_get_instance_private (FontManagerComparePane* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerComparePane_private_offset);
}

static GtkWidget*
_font_manager_compare_row_from_item_gtk_list_box_create_widget_func (GObject* item,
                                                                     gpointer self)
{
	GtkWidget* result;
	result = font_manager_compare_row_from_item (item);
	return result;
}

static void
__lambda114_ (FontManagerComparePane* self)
{
	GtkListBox* _tmp0_;
	FontManagerCompareModel* _tmp1_;
	_tmp0_ = self->priv->list;
	_tmp1_ = self->priv->_model;
	gtk_list_box_bind_model (_tmp0_, (GListModel*) _tmp1_, _font_manager_compare_row_from_item_gtk_list_box_create_widget_func, NULL, NULL);
}

static void
___lambda114__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda114_ ((FontManagerComparePane*) self);
}

static void
_font_manager_compare_pane_on_items_changed_g_list_model_items_changed (GListModel* _sender,
                                                                        guint position,
                                                                        guint removed,
                                                                        guint added,
                                                                        gpointer self)
{
	font_manager_compare_pane_on_items_changed ((FontManagerComparePane*) self, position, removed, added);
}

static void
__lambda115_ (FontManagerComparePane* self)
{
	gboolean _tmp0_ = FALSE;
	FontManagerPinnedComparisons* _tmp1_;
	FontManagerPinnedComparisonModel* _tmp2_;
	FontManagerPinnedComparisonModel* _tmp3_;
	gboolean have_items = FALSE;
	GtkMenuButton* _tmp5_;
	_tmp1_ = self->priv->_pinned;
	_tmp2_ = font_manager_pinned_comparisons_get_model (_tmp1_);
	_tmp3_ = _tmp2_;
	if (g_list_model_get_n_items ((GListModel*) _tmp3_) > ((guint) 0)) {
		_tmp0_ = TRUE;
	} else {
		FontManagerCompareModel* _tmp4_;
		_tmp4_ = self->priv->_model;
		_tmp0_ = g_list_model_get_n_items ((GListModel*) _tmp4_) > ((guint) 0);
	}
	have_items = _tmp0_;
	_tmp5_ = self->priv->pinned_button;
	font_manager_set_control_sensitivity ((GtkWidget*) _tmp5_, have_items);
}

static void
___lambda115__gtk_popover_closed (GtkPopover* _sender,
                                  gpointer self)
{
	__lambda115_ ((FontManagerComparePane*) self);
}

static void
_font_manager_compare_pane_force_css_update_gtk_widget_map (GtkWidget* _sender,
                                                            gpointer self)
{
	font_manager_compare_pane_force_css_update ((FontManagerComparePane*) self);
}

FontManagerComparePane*
font_manager_compare_pane_construct (GType object_type)
{
	FontManagerComparePane * self = NULL;
	FontManagerCompareModel* _tmp0_;
	FontManagerCompareModel* _tmp1_;
	FontManagerPinnedComparisons* _tmp2_;
	FontManagerPinnedComparisons* _tmp3_;
	FontManagerPinnedComparisons* _tmp4_;
	GtkMenuButton* _tmp5_;
	FontManagerPinnedComparisons* _tmp6_;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	FontManagerPreviewEntry* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	GtkButton* _tmp13_;
	GBindingFlags flags = 0U;
	FontManagerFontScale* _tmp14_;
	GtkMenuButton* _tmp15_;
	FontManagerPinnedComparisons* _tmp16_;
	FontManagerPinnedComparisonModel* _tmp17_;
	FontManagerPinnedComparisonModel* _tmp18_;
	FontManagerCompareModel* _tmp19_;
	FontManagerPinnedComparisons* _tmp20_;
	GtkListBox* _tmp21_;
	self = (FontManagerComparePane*) g_object_new (object_type, NULL);
	font_manager_widget_set_name ((GtkWidget*) self, "FontManagerCompare");
	g_signal_connect_object ((GObject*) self, "notify::model", (GCallback) ___lambda114__g_object_notify, self, 0);
	_tmp0_ = font_manager_compare_model_new ();
	_tmp1_ = _tmp0_;
	font_manager_compare_pane_set_model (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = font_manager_pinned_comparisons_new ();
	g_object_ref_sink (_tmp2_);
	_tmp3_ = _tmp2_;
	font_manager_compare_pane_set_pinned (self, _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = self->priv->_pinned;
	font_manager_pinned_comparisons_set_compare (_tmp4_, self);
	_tmp5_ = self->priv->pinned_button;
	_tmp6_ = self->priv->_pinned;
	gtk_menu_button_set_popover (_tmp5_, (GtkWidget*) _tmp6_);
	_tmp7_ = font_manager_get_localized_pangram ();
	_g_free0 (self->priv->default_preview_text);
	self->priv->default_preview_text = _tmp7_;
	_tmp8_ = self->priv->default_preview_text;
	_tmp9_ = g_strdup (_tmp8_);
	_g_free0 (self->priv->_preview_text);
	self->priv->_preview_text = _tmp9_;
	_tmp10_ = self->priv->_entry;
	_tmp11_ = font_manager_compare_pane_get_preview_text (self);
	_tmp12_ = _tmp11_;
	gtk_entry_set_placeholder_text ((GtkEntry*) _tmp10_, _tmp12_);
	_tmp13_ = self->priv->add_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp13_, FONT_MANAGER_STYLE_CLASS_SUGGESTED_ACTION);
	flags = G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE;
	_tmp14_ = self->priv->_fontscale;
	g_object_bind_property_with_closures ((GObject*) self, "preview-size", (GObject*) _tmp14_, "value", 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->pinned_button;
	_tmp16_ = self->priv->_pinned;
	_tmp17_ = font_manager_pinned_comparisons_get_model (_tmp16_);
	_tmp18_ = _tmp17_;
	font_manager_set_control_sensitivity ((GtkWidget*) _tmp15_, g_list_model_get_n_items ((GListModel*) _tmp18_) > ((guint) 0));
	_tmp19_ = self->priv->_model;
	g_signal_connect_object ((GListModel*) _tmp19_, "items-changed", (GCallback) _font_manager_compare_pane_on_items_changed_g_list_model_items_changed, self, 0);
	_tmp20_ = self->priv->_pinned;
	g_signal_connect_object ((GtkPopover*) _tmp20_, "closed", (GCallback) ___lambda115__gtk_popover_closed, self, 0);
	_tmp21_ = self->priv->list;
	g_signal_connect_object ((GtkWidget*) _tmp21_, "map", (GCallback) _font_manager_compare_pane_force_css_update_gtk_widget_map, self, G_CONNECT_AFTER);
	return self;
}

FontManagerComparePane*
font_manager_compare_pane_new (void)
{
	return font_manager_compare_pane_construct (FONT_MANAGER_TYPE_COMPARE_PANE);
}

static void
font_manager_compare_pane_force_css_update (FontManagerComparePane* self)
{
	GtkListBox* _tmp0_;
	GtkListBox* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->list;
	gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
	_tmp1_ = self->priv->list;
	gtk_widget_queue_draw ((GtkWidget*) _tmp1_);
	return;
}

void
font_manager_compare_pane_on_items_changed (FontManagerComparePane* self,
                                            guint position,
                                            guint added,
                                            guint removed)
{
	gboolean _tmp3_ = FALSE;
	FontManagerPinnedComparisons* _tmp4_;
	FontManagerPinnedComparisonModel* _tmp5_;
	FontManagerPinnedComparisonModel* _tmp6_;
	gboolean have_items = FALSE;
	GtkMenuButton* _tmp8_;
	g_return_if_fail (self != NULL);
	if (!self->priv->use_adwaita) {
		FontManagerCompareModel* _tmp0_;
		_tmp0_ = self->priv->_model;
		if (g_list_model_get_n_items ((GListModel*) _tmp0_) > ((guint) 0)) {
			GtkButton* _tmp1_;
			_tmp1_ = self->priv->add_button;
			gtk_widget_remove_css_class ((GtkWidget*) _tmp1_, FONT_MANAGER_STYLE_CLASS_SUGGESTED_ACTION);
		} else {
			GtkButton* _tmp2_;
			_tmp2_ = self->priv->add_button;
			gtk_widget_add_css_class ((GtkWidget*) _tmp2_, FONT_MANAGER_STYLE_CLASS_SUGGESTED_ACTION);
		}
	}
	_tmp4_ = self->priv->_pinned;
	_tmp5_ = font_manager_pinned_comparisons_get_model (_tmp4_);
	_tmp6_ = _tmp5_;
	if (g_list_model_get_n_items ((GListModel*) _tmp6_) > ((guint) 0)) {
		_tmp3_ = TRUE;
	} else {
		FontManagerCompareModel* _tmp7_;
		_tmp7_ = self->priv->_model;
		_tmp3_ = g_list_model_get_n_items ((GListModel*) _tmp7_) > ((guint) 0);
	}
	have_items = _tmp3_;
	_tmp8_ = self->priv->pinned_button;
	font_manager_set_control_sensitivity ((GtkWidget*) _tmp8_, have_items);
	return;
}

void
font_manager_compare_pane_restore_state (FontManagerComparePane* self,
                                         GSettings* settings)
{
	FontManagerPreviewColors* _tmp0_;
	FontManagerPreviewEntry* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GSettingsBindFlags flags = 0U;
	FontManagerPreviewEntry* _tmp5_;
	g_return_if_fail (self != NULL);
	if (settings == NULL) {
		return;
	}
	_tmp0_ = self->priv->_preview_colors;
	font_manager_preview_colors_restore_state (_tmp0_, settings);
	self->priv->use_adwaita = g_settings_get_boolean (settings, "use-adwaita-stylesheet");
	if (self->priv->use_adwaita) {
		GtkButton* _tmp1_;
		_tmp1_ = self->priv->add_button;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp1_, FONT_MANAGER_STYLE_CLASS_SUGGESTED_ACTION);
	}
	font_manager_compare_pane_set_preview_size (self, g_settings_get_double (settings, "compare-font-size"));
	_tmp2_ = self->priv->_entry;
	_tmp3_ = g_settings_get_string (settings, "compare-preview-text");
	_tmp4_ = _tmp3_;
	gtk_editable_set_text ((GtkEditable*) _tmp2_, _tmp4_);
	_g_free0 (_tmp4_);
	flags = G_SETTINGS_BIND_DEFAULT;
	_tmp5_ = self->priv->_entry;
	g_settings_bind (settings, "compare-preview-text", (GObject*) _tmp5_, "text", flags);
	g_settings_bind (settings, "compare-font-size", (GObject*) self, "preview-size", flags);
	return;
}

static void
font_manager_compare_pane_add_entry (FontManagerComparePane* self,
                                     GObject* item)
{
	gchar* p = NULL;
	gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	FontManagerPreviewEntry* _tmp2_;
	guint _tmp3_;
	guint _tmp4_;
	gchar* preview = NULL;
	gchar* _tmp13_;
	const gchar* _tmp14_ = NULL;
	const gchar* _tmp15_;
	gchar* default_preview = NULL;
	gchar* _tmp18_;
	FontManagerCompareEntry* entry = NULL;
	const gchar* _tmp19_;
	FontManagerCompareEntry* _tmp20_;
	GBindingFlags flags = 0U;
	FontManagerCompareModel* _tmp21_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	p = NULL;
	g_object_get (item, "preview-text", &_tmp0_, NULL, NULL);
	_g_free0 (p);
	p = _tmp0_;
	_tmp2_ = self->priv->_entry;
	_tmp3_ = gtk_entry_get_text_length ((GtkEntry*) _tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ > ((guint) 0)) {
		FontManagerPreviewEntry* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = self->priv->_entry;
		_tmp6_ = gtk_editable_get_text ((GtkEditable*) _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = _tmp7_;
	} else {
		const gchar* _tmp8_ = NULL;
		const gchar* _tmp9_;
		_tmp9_ = p;
		if (_tmp9_ != NULL) {
			const gchar* _tmp10_;
			_tmp10_ = p;
			_tmp8_ = _tmp10_;
		} else {
			const gchar* _tmp11_;
			const gchar* _tmp12_;
			_tmp11_ = font_manager_compare_pane_get_preview_text (self);
			_tmp12_ = _tmp11_;
			_tmp8_ = _tmp12_;
		}
		_tmp1_ = _tmp8_;
	}
	_tmp13_ = g_strdup (_tmp1_);
	preview = _tmp13_;
	_tmp15_ = p;
	if (_tmp15_ != NULL) {
		const gchar* _tmp16_;
		_tmp16_ = p;
		_tmp14_ = _tmp16_;
	} else {
		const gchar* _tmp17_;
		_tmp17_ = self->priv->default_preview_text;
		_tmp14_ = _tmp17_;
	}
	_tmp18_ = g_strdup (_tmp14_);
	default_preview = _tmp18_;
	_tmp19_ = preview;
	_tmp20_ = font_manager_compare_entry_new (item, _tmp19_, default_preview);
	entry = _tmp20_;
	flags = G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE;
	g_object_bind_property_with_closures ((GObject*) self, "preview-size", (GObject*) entry, "preview-size", 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)));
	g_object_bind_property_with_closures ((GObject*) self, "preview-text", (GObject*) entry, "preview-text", 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)));
	_tmp21_ = self->priv->_model;
	font_manager_compare_model_add_item (_tmp21_, entry);
	_g_object_unref0 (entry);
	_g_free0 (default_preview);
	_g_free0 (preview);
	_g_free0 (p);
	return;
}

static void
______lambda112_ (FontManagerComparePane* self,
                  JsonArray* a,
                  guint i,
                  JsonNode* n)
{
	FontManagerFont* _item = NULL;
	FontManagerFont* _tmp0_;
	JsonObject* _tmp1_;
	g_return_if_fail (a != NULL);
	g_return_if_fail (n != NULL);
	_tmp0_ = font_manager_font_new ();
	_item = _tmp0_;
	_tmp1_ = json_node_get_object (n);
	g_object_set (_item, "source-object", _tmp1_, NULL);
	font_manager_compare_pane_add_entry (self, (GObject*) _item);
	_g_object_unref0 (_item);
}

static void
_______lambda112__json_array_foreach (JsonArray* array,
                                      guint index_,
                                      JsonNode* element_node,
                                      gpointer self)
{
	______lambda112_ ((FontManagerComparePane*) self, array, index_, element_node);
}

void
font_manager_compare_pane_add_items (FontManagerComparePane* self,
                                     GPtrArray* items)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (items != NULL);
	{
		GPtrArray* item_collection = NULL;
		guint item_index = 0U;
		item_collection = items;
		for (item_index = 0; item_index < item_collection->len; item_index = item_index + 1) {
			GObject* _tmp0_;
			GObject* item = NULL;
			_tmp0_ = _g_object_ref0 ((GObject*) g_ptr_array_index (item_collection, item_index));
			item = _tmp0_;
			{
				gchar* family = NULL;
				GObject* _tmp1_;
				gchar* _tmp2_ = NULL;
				gboolean _tmp3_ = FALSE;
				FontManagerStringSet* _tmp4_;
				family = NULL;
				_tmp1_ = item;
				g_object_get (_tmp1_, "family", &_tmp2_, NULL, NULL);
				_g_free0 (family);
				family = _tmp2_;
				_tmp4_ = self->priv->_available_families;
				if (_tmp4_ == NULL) {
					_tmp3_ = TRUE;
				} else {
					FontManagerStringSet* _tmp5_;
					const gchar* _tmp6_;
					_tmp5_ = self->priv->_available_families;
					_tmp6_ = family;
					_tmp3_ = font_manager_string_set_contains (_tmp5_, _tmp6_);
				}
				if (_tmp3_) {
					GObject* _tmp7_;
					_tmp7_ = item;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, font_manager_family_get_type ())) {
						JsonArray* variations = NULL;
						GObject* _tmp8_;
						JsonArray* _tmp9_;
						JsonArray* _tmp10_;
						JsonArray* _tmp11_;
						_tmp8_ = item;
						g_object_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, font_manager_family_get_type (), FontManagerFamily), "variations", &_tmp9_, NULL);
						_tmp10_ = _tmp9_;
						variations = _tmp10_;
						_tmp11_ = variations;
						json_array_foreach_element (_tmp11_, _______lambda112__json_array_foreach, self);
						_json_array_unref0 (variations);
					} else {
						GObject* _tmp12_;
						_tmp12_ = item;
						font_manager_compare_pane_add_entry (self, _tmp12_);
					}
				}
				_g_free0 (family);
				_g_object_unref0 (item);
			}
		}
	}
	return;
}

static Block3Data*
block3_data_ref (Block3Data* _data3_)
{
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}

static void
block3_data_unref (void * _userdata_)
{
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		FontManagerComparePane* self;
		self = _data3_->self;
		_g_ptr_array_unref0 (_data3_->results);
		_g_object_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}

static void
__lambda113_ (Block3Data* _data3_,
              FontManagerCompareEntry* it)
{
	FontManagerComparePane* self;
	GObject* _tmp0_;
	GObject* _tmp1_;
	FontManagerFont* _tmp2_;
	self = _data3_->self;
	g_return_if_fail (it != NULL);
	_tmp0_ = font_manager_compare_entry_get_item (it);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, font_manager_font_get_type (), FontManagerFont));
	g_ptr_array_add (_data3_->results, _tmp2_);
}

static void
___lambda113__gfunc (gconstpointer data,
                     gpointer self)
{
	__lambda113_ (self, (FontManagerCompareEntry*) data);
}

GPtrArray*
font_manager_compare_pane_list_items (FontManagerComparePane* self)
{
	Block3Data* _data3_;
	GPtrArray* _tmp0_;
	FontManagerCompareModel* _tmp1_;
	GPtrArray* _tmp2_;
	GPtrArray* _tmp3_;
	GPtrArray* _tmp4_;
	GPtrArray* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data3_ = g_slice_new0 (Block3Data);
	_data3_->_ref_count_ = 1;
	_data3_->self = g_object_ref (self);
	_tmp0_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_data3_->results = _tmp0_;
	_tmp1_ = self->priv->_model;
	_tmp2_ = font_manager_compare_model_get_items (_tmp1_);
	_tmp3_ = _tmp2_;
	g_ptr_array_foreach (_tmp3_, ___lambda113__gfunc, _data3_);
	_tmp4_ = _g_ptr_array_ref0 (_data3_->results);
	result = _tmp4_;
	block3_data_unref (_data3_);
	_data3_ = NULL;
	return result;
}

static void
font_manager_compare_pane_on_entry_changed (FontManagerComparePane* self)
{
	const gchar* _tmp0_ = NULL;
	FontManagerPreviewEntry* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_entry;
	_tmp2_ = gtk_entry_get_text_length ((GtkEntry*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ > ((guint) 0)) {
		FontManagerPreviewEntry* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp4_ = self->priv->_entry;
		_tmp5_ = gtk_editable_get_text ((GtkEditable*) _tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_;
	} else {
		_tmp0_ = NULL;
	}
	font_manager_compare_pane_set_preview_text (self, _tmp0_);
	return;
}

static void
_font_manager_compare_pane_on_entry_changed_gtk_editable_changed (GtkEditable* _sender,
                                                                  gpointer self)
{
	font_manager_compare_pane_on_entry_changed ((FontManagerComparePane*) self);
}

static void
font_manager_compare_pane_on_list_row_selected (FontManagerComparePane* self,
                                                GtkListBox* box,
                                                GtkListBoxRow* row)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (box != NULL);
	_tmp0_ = self->priv->remove_button;
	font_manager_set_control_sensitivity ((GtkWidget*) _tmp0_, row != NULL);
	return;
}

static void
_font_manager_compare_pane_on_list_row_selected_gtk_list_box_row_selected (GtkListBox* _sender,
                                                                           GtkListBoxRow* row,
                                                                           gpointer self)
{
	font_manager_compare_pane_on_list_row_selected ((FontManagerComparePane*) self, _sender, row);
}

static void
font_manager_compare_pane_on_add_button_clicked (FontManagerComparePane* self)
{
	GPtrArray* _tmp0_;
	FontManagerStringSet* selected_families = NULL;
	FontManagerStringSet* _tmp1_;
	GPtrArray* _tmp2_;
	GPtrArray* _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_selected_items;
	font_manager_compare_pane_add_items (self, _tmp0_);
	_tmp1_ = font_manager_string_set_new ();
	selected_families = _tmp1_;
	_tmp2_ = self->priv->_selected_items;
	{
		GPtrArray* item_collection = NULL;
		guint item_index = 0U;
		item_collection = _tmp2_;
		for (item_index = 0; item_index < item_collection->len; item_index = item_index + 1) {
			GObject* _tmp3_;
			GObject* item = NULL;
			_tmp3_ = _g_object_ref0 ((GObject*) g_ptr_array_index (item_collection, item_index));
			item = _tmp3_;
			{
				FontManagerStringSet* _tmp4_;
				GObject* _tmp5_;
				gchar* _tmp6_;
				gchar* _tmp7_;
				gchar* _tmp8_;
				_tmp4_ = selected_families;
				_tmp5_ = item;
				g_object_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, font_manager_family_get_type (), FontManagerFamily), "family", &_tmp6_, NULL);
				_tmp7_ = _tmp6_;
				_tmp8_ = _tmp7_;
				font_manager_string_set_add (_tmp4_, _tmp8_);
				_g_free0 (_tmp8_);
				_g_object_unref0 (item);
			}
		}
	}
	_tmp9_ = self->priv->_selected_children;
	{
		GPtrArray* item_collection = NULL;
		guint item_index = 0U;
		item_collection = _tmp9_;
		for (item_index = 0; item_index < item_collection->len; item_index = item_index + 1) {
			GObject* _tmp10_;
			GObject* item = NULL;
			_tmp10_ = _g_object_ref0 ((GObject*) g_ptr_array_index (item_collection, item_index));
			item = _tmp10_;
			{
				FontManagerStringSet* _tmp11_;
				GObject* _tmp12_;
				gchar* _tmp13_;
				gchar* _tmp14_;
				gchar* _tmp15_;
				gboolean _tmp16_;
				_tmp11_ = selected_families;
				_tmp12_ = item;
				g_object_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, font_manager_font_get_type (), FontManagerFont), "family", &_tmp13_, NULL);
				_tmp14_ = _tmp13_;
				_tmp15_ = _tmp14_;
				_tmp16_ = !font_manager_string_set_contains (_tmp11_, _tmp15_);
				_g_free0 (_tmp15_);
				if (_tmp16_) {
					GObject* _tmp17_;
					_tmp17_ = item;
					font_manager_compare_pane_add_entry (self, _tmp17_);
				}
				_g_object_unref0 (item);
			}
		}
	}
	_g_object_unref0 (selected_families);
	return;
}

static void
_font_manager_compare_pane_on_add_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self)
{
	font_manager_compare_pane_on_add_button_clicked ((FontManagerComparePane*) self);
}

static void
font_manager_compare_pane_on_remove_button_clicked (FontManagerComparePane* self)
{
	GtkListBox* _tmp0_;
	GtkListBoxRow* _tmp1_;
	guint position = 0U;
	GtkListBox* _tmp2_;
	GtkListBoxRow* _tmp3_;
	FontManagerCompareModel* _tmp4_;
	GtkListBox* _tmp8_;
	GtkListBox* _tmp9_;
	GtkListBoxRow* _tmp10_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->list;
	_tmp1_ = gtk_list_box_get_selected_row (_tmp0_);
	if (_tmp1_ == NULL) {
		return;
	}
	_tmp2_ = self->priv->list;
	_tmp3_ = gtk_list_box_get_selected_row (_tmp2_);
	position = (guint) gtk_list_box_row_get_index (_tmp3_);
	_tmp4_ = self->priv->_model;
	font_manager_compare_model_remove_item (_tmp4_, position);
	while (TRUE) {
		gboolean _tmp5_ = FALSE;
		guint _tmp7_;
		if (position > ((guint) 0)) {
			FontManagerCompareModel* _tmp6_;
			_tmp6_ = self->priv->_model;
			_tmp5_ = position >= g_list_model_get_n_items ((GListModel*) _tmp6_);
		} else {
			_tmp5_ = FALSE;
		}
		if (!_tmp5_) {
			break;
		}
		_tmp7_ = position;
		position = _tmp7_ - 1;
	}
	_tmp8_ = self->priv->list;
	_tmp9_ = self->priv->list;
	_tmp10_ = gtk_list_box_get_row_at_index (_tmp9_, (gint) position);
	gtk_list_box_select_row (_tmp8_, _tmp10_);
	return;
}

static void
_font_manager_compare_pane_on_remove_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                        gpointer self)
{
	font_manager_compare_pane_on_remove_button_clicked ((FontManagerComparePane*) self);
}

gdouble
font_manager_compare_pane_get_preview_size (FontManagerComparePane* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, 0.0);
	result = self->priv->_preview_size;
	return result;
}

void
font_manager_compare_pane_set_preview_size (FontManagerComparePane* self,
                                            gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_compare_pane_get_preview_size (self);
	if (old_value != value) {
		self->priv->_preview_size = value;
		g_object_notify_by_pspec ((GObject *) self, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_PREVIEW_SIZE_PROPERTY]);
	}
}

GPtrArray*
font_manager_compare_pane_get_selected_items (FontManagerComparePane* self)
{
	GPtrArray* result;
	GPtrArray* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selected_items;
	result = _tmp0_;
	return result;
}

void
font_manager_compare_pane_set_selected_items (FontManagerComparePane* self,
                                              GPtrArray* value)
{
	GPtrArray* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_compare_pane_get_selected_items (self);
	if (old_value != value) {
		GPtrArray* _tmp0_;
		_tmp0_ = _g_ptr_array_ref0 (value);
		_g_ptr_array_unref0 (self->priv->_selected_items);
		self->priv->_selected_items = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_SELECTED_ITEMS_PROPERTY]);
	}
}

GPtrArray*
font_manager_compare_pane_get_selected_children (FontManagerComparePane* self)
{
	GPtrArray* result;
	GPtrArray* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selected_children;
	result = _tmp0_;
	return result;
}

void
font_manager_compare_pane_set_selected_children (FontManagerComparePane* self,
                                                 GPtrArray* value)
{
	GPtrArray* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_compare_pane_get_selected_children (self);
	if (old_value != value) {
		GPtrArray* _tmp0_;
		_tmp0_ = _g_ptr_array_ref0 (value);
		_g_ptr_array_unref0 (self->priv->_selected_children);
		self->priv->_selected_children = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_SELECTED_CHILDREN_PROPERTY]);
	}
}

FontManagerStringSet*
font_manager_compare_pane_get_available_families (FontManagerComparePane* self)
{
	FontManagerStringSet* result;
	FontManagerStringSet* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_available_families;
	result = _tmp0_;
	return result;
}

void
font_manager_compare_pane_set_available_families (FontManagerComparePane* self,
                                                  FontManagerStringSet* value)
{
	FontManagerStringSet* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_compare_pane_get_available_families (self);
	if (old_value != value) {
		FontManagerStringSet* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_available_families);
		self->priv->_available_families = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_AVAILABLE_FAMILIES_PROPERTY]);
	}
}

FontManagerCompareModel*
font_manager_compare_pane_get_model (FontManagerComparePane* self)
{
	FontManagerCompareModel* result;
	FontManagerCompareModel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_model;
	result = _tmp0_;
	return result;
}

void
font_manager_compare_pane_set_model (FontManagerComparePane* self,
                                     FontManagerCompareModel* value)
{
	FontManagerCompareModel* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_compare_pane_get_model (self);
	if (old_value != value) {
		FontManagerCompareModel* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_model);
		self->priv->_model = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_MODEL_PROPERTY]);
	}
}

FontManagerPinnedComparisons*
font_manager_compare_pane_get_pinned (FontManagerComparePane* self)
{
	FontManagerPinnedComparisons* result;
	FontManagerPinnedComparisons* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_pinned;
	result = _tmp0_;
	return result;
}

static void
font_manager_compare_pane_set_pinned (FontManagerComparePane* self,
                                      FontManagerPinnedComparisons* value)
{
	FontManagerPinnedComparisons* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_compare_pane_get_pinned (self);
	if (old_value != value) {
		FontManagerPinnedComparisons* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_pinned);
		self->priv->_pinned = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_PINNED_PROPERTY]);
	}
}

const gchar*
font_manager_compare_pane_get_preview_text (FontManagerComparePane* self)
{
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->_preview_text;
	if (_tmp1_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = self->priv->_preview_text;
		_tmp0_ = _tmp2_;
	} else {
		const gchar* _tmp3_;
		_tmp3_ = self->priv->default_preview_text;
		_tmp0_ = _tmp3_;
	}
	result = _tmp0_;
	return result;
}

void
font_manager_compare_pane_set_preview_text (FontManagerComparePane* self,
                                            const gchar* value)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_preview_text);
	self->priv->_preview_text = _tmp0_;
	g_object_notify_by_pspec ((GObject *) self, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_PREVIEW_TEXT_PROPERTY]);
}

FontManagerFontScale*
font_manager_compare_pane_get_fontscale (FontManagerComparePane* self)
{
	FontManagerFontScale* result;
	FontManagerFontScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_fontscale;
	result = _tmp0_;
	return result;
}

FontManagerPreviewColors*
font_manager_compare_pane_get_preview_colors (FontManagerComparePane* self)
{
	FontManagerPreviewColors* result;
	FontManagerPreviewColors* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_preview_colors;
	result = _tmp0_;
	return result;
}

FontManagerPreviewEntry*
font_manager_compare_pane_get_entry (FontManagerComparePane* self)
{
	FontManagerPreviewEntry* result;
	FontManagerPreviewEntry* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_entry;
	result = _tmp0_;
	return result;
}

static void
font_manager_compare_pane_class_init (FontManagerComparePaneClass * klass,
                                      gpointer klass_data)
{
	font_manager_compare_pane_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerComparePane_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_compare_pane_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_compare_pane_set_property;
	G_OBJECT_CLASS (klass)->finalize = font_manager_compare_pane_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_PANE_PREVIEW_SIZE_PROPERTY, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_PREVIEW_SIZE_PROPERTY] = g_param_spec_double ("preview-size", "preview-size", "preview-size", -G_MAXDOUBLE, G_MAXDOUBLE, FONT_MANAGER_LARGE_PREVIEW_SIZE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_PANE_SELECTED_ITEMS_PROPERTY, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_SELECTED_ITEMS_PROPERTY] = g_param_spec_boxed ("selected-items", "selected-items", "selected-items", G_TYPE_PTR_ARRAY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_PANE_SELECTED_CHILDREN_PROPERTY, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_SELECTED_CHILDREN_PROPERTY] = g_param_spec_boxed ("selected-children", "selected-children", "selected-children", G_TYPE_PTR_ARRAY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_PANE_AVAILABLE_FAMILIES_PROPERTY, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_AVAILABLE_FAMILIES_PROPERTY] = g_param_spec_object ("available-families", "available-families", "available-families", font_manager_string_set_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_PANE_MODEL_PROPERTY, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_MODEL_PROPERTY] = g_param_spec_object ("model", "model", "model", FONT_MANAGER_TYPE_COMPARE_MODEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_PANE_PINNED_PROPERTY, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_PINNED_PROPERTY] = g_param_spec_object ("pinned", "pinned", "pinned", FONT_MANAGER_TYPE_PINNED_COMPARISONS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_PANE_PREVIEW_TEXT_PROPERTY, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_PREVIEW_TEXT_PROPERTY] = g_param_spec_string ("preview-text", "preview-text", "preview-text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_PANE_FONTSCALE_PROPERTY, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_FONTSCALE_PROPERTY] = g_param_spec_object ("fontscale", "fontscale", "fontscale", font_manager_font_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_PANE_PREVIEW_COLORS_PROPERTY, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_PREVIEW_COLORS_PROPERTY] = g_param_spec_object ("preview-colors", "preview-colors", "preview-colors", FONT_MANAGER_TYPE_PREVIEW_COLORS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_COMPARE_PANE_ENTRY_PROPERTY, font_manager_compare_pane_properties[FONT_MANAGER_COMPARE_PANE_ENTRY_PROPERTY] = g_param_spec_object ("entry", "entry", "entry", FONT_MANAGER_TYPE_PREVIEW_ENTRY, 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-compare-view.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "fontscale", FALSE, FontManagerComparePane_private_offset + G_STRUCT_OFFSET (FontManagerComparePanePrivate, _fontscale));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "preview_colors", FALSE, FontManagerComparePane_private_offset + G_STRUCT_OFFSET (FontManagerComparePanePrivate, _preview_colors));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "entry", FALSE, FontManagerComparePane_private_offset + G_STRUCT_OFFSET (FontManagerComparePanePrivate, _entry));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "add_button", FALSE, FontManagerComparePane_private_offset + G_STRUCT_OFFSET (FontManagerComparePanePrivate, add_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "remove_button", FALSE, FontManagerComparePane_private_offset + G_STRUCT_OFFSET (FontManagerComparePanePrivate, remove_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "pinned_button", FALSE, FontManagerComparePane_private_offset + G_STRUCT_OFFSET (FontManagerComparePanePrivate, pinned_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "list", FALSE, FontManagerComparePane_private_offset + G_STRUCT_OFFSET (FontManagerComparePanePrivate, list));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_entry_changed", G_CALLBACK(_font_manager_compare_pane_on_entry_changed_gtk_editable_changed));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_list_row_selected", G_CALLBACK(_font_manager_compare_pane_on_list_row_selected_gtk_list_box_row_selected));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_add_button_clicked", G_CALLBACK(_font_manager_compare_pane_on_add_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_remove_button_clicked", G_CALLBACK(_font_manager_compare_pane_on_remove_button_clicked_gtk_button_clicked));
}

static void
font_manager_compare_pane_instance_init (FontManagerComparePane * self,
                                         gpointer klass)
{
	self->priv = font_manager_compare_pane_get_instance_private (self);
	self->priv->_preview_size = FONT_MANAGER_LARGE_PREVIEW_SIZE;
	self->priv->_selected_items = NULL;
	self->priv->_selected_children = NULL;
	self->priv->_available_families = NULL;
	self->priv->use_adwaita = FALSE;
	self->priv->_preview_text = NULL;
	self->priv->default_preview_text = NULL;
	g_type_ensure (FONT_MANAGER_TYPE_PREVIEW_ENTRY);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
font_manager_compare_pane_finalize (GObject * obj)
{
	FontManagerComparePane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_COMPARE_PANE, FontManagerComparePane);
	_g_ptr_array_unref0 (self->priv->_selected_items);
	_g_ptr_array_unref0 (self->priv->_selected_children);
	_g_object_unref0 (self->priv->_available_families);
	_g_object_unref0 (self->priv->_model);
	_g_object_unref0 (self->priv->_pinned);
	_g_free0 (self->priv->_preview_text);
	_g_free0 (self->priv->default_preview_text);
	G_OBJECT_CLASS (font_manager_compare_pane_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_compare_pane_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerComparePaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_compare_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerComparePane), 0, (GInstanceInitFunc) font_manager_compare_pane_instance_init, NULL };
	GType font_manager_compare_pane_type_id;
	font_manager_compare_pane_type_id = g_type_register_static (gtk_box_get_type (), "FontManagerComparePane", &g_define_type_info, 0);
	FontManagerComparePane_private_offset = g_type_add_instance_private (font_manager_compare_pane_type_id, sizeof (FontManagerComparePanePrivate));
	return font_manager_compare_pane_type_id;
}

GType
font_manager_compare_pane_get_type (void)
{
	static volatile gsize font_manager_compare_pane_type_id__once = 0;
	if (g_once_init_enter (&font_manager_compare_pane_type_id__once)) {
		GType font_manager_compare_pane_type_id;
		font_manager_compare_pane_type_id = font_manager_compare_pane_get_type_once ();
		g_once_init_leave (&font_manager_compare_pane_type_id__once, font_manager_compare_pane_type_id);
	}
	return font_manager_compare_pane_type_id__once;
}

static void
_vala_font_manager_compare_pane_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec)
{
	FontManagerComparePane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_COMPARE_PANE, FontManagerComparePane);
	switch (property_id) {
		case FONT_MANAGER_COMPARE_PANE_PREVIEW_SIZE_PROPERTY:
		g_value_set_double (value, font_manager_compare_pane_get_preview_size (self));
		break;
		case FONT_MANAGER_COMPARE_PANE_SELECTED_ITEMS_PROPERTY:
		g_value_set_boxed (value, font_manager_compare_pane_get_selected_items (self));
		break;
		case FONT_MANAGER_COMPARE_PANE_SELECTED_CHILDREN_PROPERTY:
		g_value_set_boxed (value, font_manager_compare_pane_get_selected_children (self));
		break;
		case FONT_MANAGER_COMPARE_PANE_AVAILABLE_FAMILIES_PROPERTY:
		g_value_set_object (value, font_manager_compare_pane_get_available_families (self));
		break;
		case FONT_MANAGER_COMPARE_PANE_MODEL_PROPERTY:
		g_value_set_object (value, font_manager_compare_pane_get_model (self));
		break;
		case FONT_MANAGER_COMPARE_PANE_PINNED_PROPERTY:
		g_value_set_object (value, font_manager_compare_pane_get_pinned (self));
		break;
		case FONT_MANAGER_COMPARE_PANE_PREVIEW_TEXT_PROPERTY:
		g_value_set_string (value, font_manager_compare_pane_get_preview_text (self));
		break;
		case FONT_MANAGER_COMPARE_PANE_FONTSCALE_PROPERTY:
		g_value_set_object (value, font_manager_compare_pane_get_fontscale (self));
		break;
		case FONT_MANAGER_COMPARE_PANE_PREVIEW_COLORS_PROPERTY:
		g_value_set_object (value, font_manager_compare_pane_get_preview_colors (self));
		break;
		case FONT_MANAGER_COMPARE_PANE_ENTRY_PROPERTY:
		g_value_set_object (value, font_manager_compare_pane_get_entry (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_compare_pane_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec)
{
	FontManagerComparePane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_COMPARE_PANE, FontManagerComparePane);
	switch (property_id) {
		case FONT_MANAGER_COMPARE_PANE_PREVIEW_SIZE_PROPERTY:
		font_manager_compare_pane_set_preview_size (self, g_value_get_double (value));
		break;
		case FONT_MANAGER_COMPARE_PANE_SELECTED_ITEMS_PROPERTY:
		font_manager_compare_pane_set_selected_items (self, g_value_get_boxed (value));
		break;
		case FONT_MANAGER_COMPARE_PANE_SELECTED_CHILDREN_PROPERTY:
		font_manager_compare_pane_set_selected_children (self, g_value_get_boxed (value));
		break;
		case FONT_MANAGER_COMPARE_PANE_AVAILABLE_FAMILIES_PROPERTY:
		font_manager_compare_pane_set_available_families (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_COMPARE_PANE_MODEL_PROPERTY:
		font_manager_compare_pane_set_model (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_COMPARE_PANE_PINNED_PROPERTY:
		font_manager_compare_pane_set_pinned (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_COMPARE_PANE_PREVIEW_TEXT_PROPERTY:
		font_manager_compare_pane_set_preview_text (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
font_manager_pinned_comparison_get_instance_private (FontManagerPinnedComparison* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerPinnedComparison_private_offset);
}

FontManagerPinnedComparison*
font_manager_pinned_comparison_construct (GType object_type)
{
	FontManagerPinnedComparison * self = NULL;
	self = (FontManagerPinnedComparison*) g_object_new (object_type, NULL);
	return self;
}

FontManagerPinnedComparison*
font_manager_pinned_comparison_new (void)
{
	return font_manager_pinned_comparison_construct (FONT_MANAGER_TYPE_PINNED_COMPARISON);
}

const gchar*
font_manager_pinned_comparison_get_label (FontManagerPinnedComparison* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_label;
	result = _tmp0_;
	return result;
}

void
font_manager_pinned_comparison_set_label (FontManagerPinnedComparison* self,
                                          const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_pinned_comparison_get_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_label);
		self->priv->_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_pinned_comparison_properties[FONT_MANAGER_PINNED_COMPARISON_LABEL_PROPERTY]);
	}
}

const gchar*
font_manager_pinned_comparison_get_created (FontManagerPinnedComparison* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_created;
	result = _tmp0_;
	return result;
}

void
font_manager_pinned_comparison_set_created (FontManagerPinnedComparison* self,
                                            const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_pinned_comparison_get_created (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_created);
		self->priv->_created = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_pinned_comparison_properties[FONT_MANAGER_PINNED_COMPARISON_CREATED_PROPERTY]);
	}
}

GPtrArray*
font_manager_pinned_comparison_get_items (FontManagerPinnedComparison* self)
{
	GPtrArray* result;
	GPtrArray* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_items;
	result = _tmp0_;
	return result;
}

void
font_manager_pinned_comparison_set_items (FontManagerPinnedComparison* self,
                                          GPtrArray* value)
{
	GPtrArray* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_pinned_comparison_get_items (self);
	if (old_value != value) {
		GPtrArray* _tmp0_;
		_tmp0_ = _g_ptr_array_ref0 (value);
		_g_ptr_array_unref0 (self->priv->_items);
		self->priv->_items = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_pinned_comparison_properties[FONT_MANAGER_PINNED_COMPARISON_ITEMS_PROPERTY]);
	}
}

static void
font_manager_pinned_comparison_class_init (FontManagerPinnedComparisonClass * klass,
                                           gpointer klass_data)
{
	font_manager_pinned_comparison_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerPinnedComparison_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_pinned_comparison_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_pinned_comparison_set_property;
	G_OBJECT_CLASS (klass)->finalize = font_manager_pinned_comparison_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_PINNED_COMPARISON_LABEL_PROPERTY, font_manager_pinned_comparison_properties[FONT_MANAGER_PINNED_COMPARISON_LABEL_PROPERTY] = g_param_spec_string ("label", "label", "label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_PINNED_COMPARISON_CREATED_PROPERTY, font_manager_pinned_comparison_properties[FONT_MANAGER_PINNED_COMPARISON_CREATED_PROPERTY] = g_param_spec_string ("created", "created", "created", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_PINNED_COMPARISON_ITEMS_PROPERTY, font_manager_pinned_comparison_properties[FONT_MANAGER_PINNED_COMPARISON_ITEMS_PROPERTY] = g_param_spec_boxed ("items", "items", "items", G_TYPE_PTR_ARRAY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
font_manager_pinned_comparison_instance_init (FontManagerPinnedComparison * self,
                                              gpointer klass)
{
	gchar* _tmp0_;
	GDateTime* _tmp1_;
	GDateTime* _tmp2_;
	gchar* _tmp3_;
	self->priv = font_manager_pinned_comparison_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_label = _tmp0_;
	_tmp1_ = g_date_time_new_now_local ();
	_tmp2_ = _tmp1_;
	_tmp3_ = g_date_time_format (_tmp2_, "%c");
	self->priv->_created = _tmp3_;
	_g_date_time_unref0 (_tmp2_);
	self->priv->_items = NULL;
}

static void
font_manager_pinned_comparison_finalize (GObject * obj)
{
	FontManagerPinnedComparison * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_PINNED_COMPARISON, FontManagerPinnedComparison);
	_g_free0 (self->priv->_label);
	_g_free0 (self->priv->_created);
	_g_ptr_array_unref0 (self->priv->_items);
	G_OBJECT_CLASS (font_manager_pinned_comparison_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_pinned_comparison_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerPinnedComparisonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_pinned_comparison_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerPinnedComparison), 0, (GInstanceInitFunc) font_manager_pinned_comparison_instance_init, NULL };
	GType font_manager_pinned_comparison_type_id;
	font_manager_pinned_comparison_type_id = g_type_register_static (G_TYPE_OBJECT, "FontManagerPinnedComparison", &g_define_type_info, 0);
	FontManagerPinnedComparison_private_offset = g_type_add_instance_private (font_manager_pinned_comparison_type_id, sizeof (FontManagerPinnedComparisonPrivate));
	return font_manager_pinned_comparison_type_id;
}

GType
font_manager_pinned_comparison_get_type (void)
{
	static volatile gsize font_manager_pinned_comparison_type_id__once = 0;
	if (g_once_init_enter (&font_manager_pinned_comparison_type_id__once)) {
		GType font_manager_pinned_comparison_type_id;
		font_manager_pinned_comparison_type_id = font_manager_pinned_comparison_get_type_once ();
		g_once_init_leave (&font_manager_pinned_comparison_type_id__once, font_manager_pinned_comparison_type_id);
	}
	return font_manager_pinned_comparison_type_id__once;
}

static void
_vala_font_manager_pinned_comparison_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec)
{
	FontManagerPinnedComparison * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_PINNED_COMPARISON, FontManagerPinnedComparison);
	switch (property_id) {
		case FONT_MANAGER_PINNED_COMPARISON_LABEL_PROPERTY:
		g_value_set_string (value, font_manager_pinned_comparison_get_label (self));
		break;
		case FONT_MANAGER_PINNED_COMPARISON_CREATED_PROPERTY:
		g_value_set_string (value, font_manager_pinned_comparison_get_created (self));
		break;
		case FONT_MANAGER_PINNED_COMPARISON_ITEMS_PROPERTY:
		g_value_set_boxed (value, font_manager_pinned_comparison_get_items (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_pinned_comparison_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec)
{
	FontManagerPinnedComparison * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_PINNED_COMPARISON, FontManagerPinnedComparison);
	switch (property_id) {
		case FONT_MANAGER_PINNED_COMPARISON_LABEL_PROPERTY:
		font_manager_pinned_comparison_set_label (self, g_value_get_string (value));
		break;
		case FONT_MANAGER_PINNED_COMPARISON_CREATED_PROPERTY:
		font_manager_pinned_comparison_set_created (self, g_value_get_string (value));
		break;
		case FONT_MANAGER_PINNED_COMPARISON_ITEMS_PROPERTY:
		font_manager_pinned_comparison_set_items (self, g_value_get_boxed (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

static GType
font_manager_pinned_comparison_model_real_get_item_type (GListModel* base)
{
	FontManagerPinnedComparisonModel * self;
	GType result;
	self = (FontManagerPinnedComparisonModel*) base;
	result = FONT_MANAGER_TYPE_PINNED_COMPARISON;
	return result;
}

static guint
font_manager_pinned_comparison_model_real_get_n_items (GListModel* base)
{
	FontManagerPinnedComparisonModel * self;
	guint _tmp0_ = 0U;
	GList* _tmp1_;
	guint result;
	self = (FontManagerPinnedComparisonModel*) base;
	_tmp1_ = self->items;
	if (_tmp1_ != NULL) {
		GList* _tmp2_;
		_tmp2_ = self->items;
		_tmp0_ = g_list_length (_tmp2_);
	} else {
		_tmp0_ = (guint) 0;
	}
	result = _tmp0_;
	return result;
}

static GObject*
font_manager_pinned_comparison_model_real_get_item (GListModel* base,
                                                    guint position)
{
	FontManagerPinnedComparisonModel * self;
	GList* _tmp0_;
	gconstpointer _tmp1_;
	GObject* _tmp2_;
	GObject* result;
	self = (FontManagerPinnedComparisonModel*) base;
	_tmp0_ = self->items;
	_tmp1_ = g_list_nth_data (_tmp0_, position);
	_tmp2_ = _g_object_ref0 ((GObject*) ((FontManagerPinnedComparison*) _tmp1_));
	result = _tmp2_;
	return result;
}

void
font_manager_pinned_comparison_model_add_item (FontManagerPinnedComparisonModel* self,
                                               FontManagerPinnedComparison* item)
{
	FontManagerPinnedComparison* _tmp0_;
	guint position = 0U;
	GList* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = _g_object_ref0 (item);
	self->items = g_list_append (self->items, _tmp0_);
	_tmp1_ = self->items;
	position = g_list_length (_tmp1_) - 1;
	g_list_model_items_changed ((GListModel*) self, position, (guint) 0, (guint) 1);
	return;
}

static GList*
vala_g_list_remove_full (GList* self,
                         gconstpointer data,
                         GFreeFunc func)
{
	GList* l = NULL;
	GList* result;
	l = self;
	while (TRUE) {
		GList* _tmp0_;
		GList* _tmp1_;
		gconstpointer _tmp2_;
		_tmp0_ = l;
		if (!(_tmp0_ != NULL)) {
			break;
		}
		_tmp1_ = l;
		_tmp2_ = ((GList*) _tmp1_)->data;
		if (_tmp2_ != data) {
			GList* _tmp3_;
			GList* _tmp4_;
			_tmp3_ = l;
			_tmp4_ = ((GList*) _tmp3_)->next;
			l = _tmp4_;
		} else {
			GList* _tmp5_;
			gconstpointer _tmp6_;
			GList* _tmp7_;
			_tmp5_ = l;
			_tmp6_ = ((GList*) _tmp5_)->data;
			func (_tmp6_);
			_tmp7_ = l;
			self = g_list_delete_link (self, (GList*) _tmp7_);
			break;
		}
	}
	result = self;
	return result;
}

void
font_manager_pinned_comparison_model_remove_item (FontManagerPinnedComparisonModel* self,
                                                  guint position)
{
	GList* _tmp0_;
	gconstpointer _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->items;
	_tmp1_ = g_list_nth_data (_tmp0_, position);
	self->items = vala_g_list_remove_full (self->items, (FontManagerPinnedComparison*) _tmp1_, _g_object_unref0_);
	g_list_model_items_changed ((GListModel*) self, position, (guint) 1, (guint) 0);
	return;
}

FontManagerPinnedComparisonModel*
font_manager_pinned_comparison_model_construct (GType object_type)
{
	FontManagerPinnedComparisonModel * self = NULL;
	self = (FontManagerPinnedComparisonModel*) g_object_new (object_type, NULL);
	return self;
}

FontManagerPinnedComparisonModel*
font_manager_pinned_comparison_model_new (void)
{
	return font_manager_pinned_comparison_model_construct (FONT_MANAGER_TYPE_PINNED_COMPARISON_MODEL);
}

static void
font_manager_pinned_comparison_model_class_init (FontManagerPinnedComparisonModelClass * klass,
                                                 gpointer klass_data)
{
	font_manager_pinned_comparison_model_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = font_manager_pinned_comparison_model_finalize;
}

static void
font_manager_pinned_comparison_model_g_list_model_interface_init (GListModelInterface * iface,
                                                                  gpointer iface_data)
{
	font_manager_pinned_comparison_model_g_list_model_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_item_type = (GType (*) (GListModel*)) font_manager_pinned_comparison_model_real_get_item_type;
	iface->get_n_items = (guint (*) (GListModel*)) font_manager_pinned_comparison_model_real_get_n_items;
	iface->get_item = (GObject* (*) (GListModel*, guint)) font_manager_pinned_comparison_model_real_get_item;
}

static void
font_manager_pinned_comparison_model_instance_init (FontManagerPinnedComparisonModel * self,
                                                    gpointer klass)
{
	self->items = NULL;
}

static void
font_manager_pinned_comparison_model_finalize (GObject * obj)
{
	FontManagerPinnedComparisonModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_PINNED_COMPARISON_MODEL, FontManagerPinnedComparisonModel);
	(self->items == NULL) ? NULL : (self->items = (_g_list_free__g_object_unref0_ (self->items), NULL));
	G_OBJECT_CLASS (font_manager_pinned_comparison_model_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_pinned_comparison_model_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerPinnedComparisonModelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_pinned_comparison_model_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerPinnedComparisonModel), 0, (GInstanceInitFunc) font_manager_pinned_comparison_model_instance_init, NULL };
	static const GInterfaceInfo g_list_model_info = { (GInterfaceInitFunc) font_manager_pinned_comparison_model_g_list_model_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType font_manager_pinned_comparison_model_type_id;
	font_manager_pinned_comparison_model_type_id = g_type_register_static (G_TYPE_OBJECT, "FontManagerPinnedComparisonModel", &g_define_type_info, 0);
	g_type_add_interface_static (font_manager_pinned_comparison_model_type_id, g_list_model_get_type (), &g_list_model_info);
	return font_manager_pinned_comparison_model_type_id;
}

GType
font_manager_pinned_comparison_model_get_type (void)
{
	static volatile gsize font_manager_pinned_comparison_model_type_id__once = 0;
	if (g_once_init_enter (&font_manager_pinned_comparison_model_type_id__once)) {
		GType font_manager_pinned_comparison_model_type_id;
		font_manager_pinned_comparison_model_type_id = font_manager_pinned_comparison_model_get_type_once ();
		g_once_init_leave (&font_manager_pinned_comparison_model_type_id__once, font_manager_pinned_comparison_model_type_id);
	}
	return font_manager_pinned_comparison_model_type_id__once;
}

static inline gpointer
font_manager_pinned_comparison_row_get_instance_private (FontManagerPinnedComparisonRow* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerPinnedComparisonRow_private_offset);
}

FontManagerPinnedComparisonRow*
font_manager_pinned_comparison_row_from_item (GObject* item)
{
	FontManagerPinnedComparisonRow* row = NULL;
	FontManagerPinnedComparisonRow* _tmp0_;
	GBindingFlags flags = 0U;
	GtkEntry* _tmp1_;
	GtkLabel* _tmp2_;
	FontManagerPinnedComparisonRow* result;
	g_return_val_if_fail (item != NULL, NULL);
	_tmp0_ = font_manager_pinned_comparison_row_new ();
	g_object_ref_sink (_tmp0_);
	row = _tmp0_;
	flags = G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE;
	_tmp1_ = row->priv->label;
	g_object_bind_property_with_closures (item, "label", (GObject*) _tmp1_, "text", 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)));
	_tmp2_ = row->priv->created;
	g_object_bind_property_with_closures (item, "created", (GObject*) _tmp2_, "label", 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)));
	result = row;
	return result;
}

static gboolean
font_manager_pinned_comparison_row_real_grab_focus (GtkWidget* base)
{
	FontManagerPinnedComparisonRow * self;
	GtkEntry* _tmp0_;
	GtkEntry* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gboolean result;
	self = (FontManagerPinnedComparisonRow*) base;
	GTK_WIDGET_CLASS (font_manager_pinned_comparison_row_parent_class)->grab_focus ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_grid_get_type (), GtkGrid));
	_tmp0_ = self->priv->label;
	gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
	_tmp1_ = self->priv->label;
	g_object_get ((GtkWidget*) _tmp1_, "has-focus", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	result = _tmp3_;
	return result;
}

FontManagerPinnedComparisonRow*
font_manager_pinned_comparison_row_construct (GType object_type)
{
	FontManagerPinnedComparisonRow * self = NULL;
	self = (FontManagerPinnedComparisonRow*) g_object_new (object_type, NULL);
	return self;
}

FontManagerPinnedComparisonRow*
font_manager_pinned_comparison_row_new (void)
{
	return font_manager_pinned_comparison_row_construct (FONT_MANAGER_TYPE_PINNED_COMPARISON_ROW);
}

static void
_font_manager_pinned_comparison_row___lambda108_ (FontManagerPinnedComparisonRow* self)
{
	g_signal_emit (self, font_manager_pinned_comparison_row_signals[FONT_MANAGER_PINNED_COMPARISON_ROW_ACTIVATED_SIGNAL], 0);
}

static void
__font_manager_pinned_comparison_row___lambda108__gtk_entry_activate (GtkEntry* _sender,
                                                                      gpointer self)
{
	_font_manager_pinned_comparison_row___lambda108_ ((FontManagerPinnedComparisonRow*) self);
}

static GObject *
font_manager_pinned_comparison_row_constructor (GType type,
                                                guint n_construct_properties,
                                                GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FontManagerPinnedComparisonRow * self;
	GtkEntry* _tmp0_;
	GtkEntry* _tmp1_;
	parent_class = G_OBJECT_CLASS (font_manager_pinned_comparison_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_PINNED_COMPARISON_ROW, FontManagerPinnedComparisonRow);
	_tmp0_ = self->priv->label;
	gtk_entry_set_placeholder_text (_tmp0_, FONT_MANAGER_PINNED_COMPARISON_ROW_placeholder_text);
	_tmp1_ = self->priv->label;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_entry_get_type (), GtkEntry), "activate", (GCallback) __font_manager_pinned_comparison_row___lambda108__gtk_entry_activate, self, 0);
	return obj;
}

static void
font_manager_pinned_comparison_row_class_init (FontManagerPinnedComparisonRowClass * klass,
                                               gpointer klass_data)
{
	font_manager_pinned_comparison_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerPinnedComparisonRow_private_offset);
	((GtkWidgetClass *) klass)->grab_focus = (gboolean (*) (GtkWidget*)) font_manager_pinned_comparison_row_real_grab_focus;
	G_OBJECT_CLASS (klass)->constructor = font_manager_pinned_comparison_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = font_manager_pinned_comparison_row_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/github/FontManager/FontManager/ui/font-manager-pinned-comparisons-row.ui");
	font_manager_pinned_comparison_row_signals[FONT_MANAGER_PINNED_COMPARISON_ROW_ACTIVATED_SIGNAL] = g_signal_new ("activated", FONT_MANAGER_TYPE_PINNED_COMPARISON_ROW, 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), "label", FALSE, FontManagerPinnedComparisonRow_private_offset + G_STRUCT_OFFSET (FontManagerPinnedComparisonRowPrivate, label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "created", FALSE, FontManagerPinnedComparisonRow_private_offset + G_STRUCT_OFFSET (FontManagerPinnedComparisonRowPrivate, created));
}

static void
font_manager_pinned_comparison_row_instance_init (FontManagerPinnedComparisonRow * self,
                                                  gpointer klass)
{
	self->priv = font_manager_pinned_comparison_row_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
font_manager_pinned_comparison_row_finalize (GObject * obj)
{
	FontManagerPinnedComparisonRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_PINNED_COMPARISON_ROW, FontManagerPinnedComparisonRow);
	G_OBJECT_CLASS (font_manager_pinned_comparison_row_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_pinned_comparison_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerPinnedComparisonRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_pinned_comparison_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerPinnedComparisonRow), 0, (GInstanceInitFunc) font_manager_pinned_comparison_row_instance_init, NULL };
	GType font_manager_pinned_comparison_row_type_id;
	font_manager_pinned_comparison_row_type_id = g_type_register_static (gtk_grid_get_type (), "FontManagerPinnedComparisonRow", &g_define_type_info, 0);
	FontManagerPinnedComparisonRow_private_offset = g_type_add_instance_private (font_manager_pinned_comparison_row_type_id, sizeof (FontManagerPinnedComparisonRowPrivate));
	return font_manager_pinned_comparison_row_type_id;
}

GType
font_manager_pinned_comparison_row_get_type (void)
{
	static volatile gsize font_manager_pinned_comparison_row_type_id__once = 0;
	if (g_once_init_enter (&font_manager_pinned_comparison_row_type_id__once)) {
		GType font_manager_pinned_comparison_row_type_id;
		font_manager_pinned_comparison_row_type_id = font_manager_pinned_comparison_row_get_type_once ();
		g_once_init_leave (&font_manager_pinned_comparison_row_type_id__once, font_manager_pinned_comparison_row_type_id);
	}
	return font_manager_pinned_comparison_row_type_id__once;
}

static inline gpointer
font_manager_pinned_comparisons_get_instance_private (FontManagerPinnedComparisons* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerPinnedComparisons_private_offset);
}

static void
___lambda106_ (FontManagerPinnedComparisons* self,
               guint p,
               guint r,
               guint a)
{
	GtkButton* _tmp0_;
	FontManagerComparePane* _tmp1_;
	FontManagerCompareModel* _tmp2_;
	FontManagerCompareModel* _tmp3_;
	_tmp0_ = self->priv->save_button;
	_tmp1_ = self->priv->_compare;
	_tmp2_ = font_manager_compare_pane_get_model (_tmp1_);
	_tmp3_ = _tmp2_;
	font_manager_set_control_sensitivity ((GtkWidget*) _tmp0_, g_list_model_get_n_items ((GListModel*) _tmp3_) > ((guint) 0));
}

static void
____lambda106__g_list_model_items_changed (GListModel* _sender,
                                           guint position,
                                           guint removed,
                                           guint added,
                                           gpointer self)
{
	___lambda106_ ((FontManagerPinnedComparisons*) self, position, removed, added);
}

static void
__lambda105_ (FontManagerPinnedComparisons* self)
{
	FontManagerComparePane* _tmp0_;
	_tmp0_ = self->priv->_compare;
	if (_tmp0_ != NULL) {
		FontManagerComparePane* _tmp1_;
		FontManagerCompareModel* _tmp2_;
		FontManagerCompareModel* _tmp3_;
		_tmp1_ = self->priv->_compare;
		_tmp2_ = font_manager_compare_pane_get_model (_tmp1_);
		_tmp3_ = _tmp2_;
		g_signal_connect_object ((GListModel*) _tmp3_, "items-changed", (GCallback) ____lambda106__g_list_model_items_changed, self, 0);
	}
}

static void
___lambda105__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda105_ ((FontManagerPinnedComparisons*) self);
}

static GtkWidget*
_font_manager_pinned_comparison_row_from_item_gtk_list_box_create_widget_func (GObject* item,
                                                                               gpointer self)
{
	GtkWidget* result;
	result = font_manager_pinned_comparison_row_from_item (item);
	return result;
}

static void
_font_manager_pinned_comparisons_on_items_changed_g_list_model_items_changed (GListModel* _sender,
                                                                              guint position,
                                                                              guint removed,
                                                                              guint added,
                                                                              gpointer self)
{
	font_manager_pinned_comparisons_on_items_changed ((FontManagerPinnedComparisons*) self, position, removed, added);
}

static void
__lambda107_ (FontManagerPinnedComparisons* self,
              GObject* obj,
              GParamSpec* pspec)
{
	GtkListBox* _tmp0_;
	FontManagerPinnedComparisonModel* _tmp1_;
	FontManagerPinnedComparisonModel* _tmp2_;
	g_return_if_fail (obj != NULL);
	g_return_if_fail (pspec != NULL);
	_tmp0_ = self->priv->list;
	_tmp1_ = self->priv->_model;
	gtk_list_box_bind_model (_tmp0_, (GListModel*) _tmp1_, _font_manager_pinned_comparison_row_from_item_gtk_list_box_create_widget_func, NULL, NULL);
	_tmp2_ = self->priv->_model;
	g_signal_connect_object ((GListModel*) _tmp2_, "items-changed", (GCallback) _font_manager_pinned_comparisons_on_items_changed_g_list_model_items_changed, self, 0);
}

static void
___lambda107__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda107_ ((FontManagerPinnedComparisons*) self, _sender, pspec);
}

static void
font_manager_pinned_comparisons_real_constructed (GObject* base)
{
	FontManagerPinnedComparisons * self;
	gchar* place_holder_text = NULL;
	gchar* _tmp0_;
	FontManagerPlaceHolder* place_holder = NULL;
	FontManagerPlaceHolder* _tmp1_;
	GtkListBox* _tmp2_;
	FontManagerPinnedComparisonModel* _tmp3_;
	FontManagerPinnedComparisonModel* _tmp4_;
	self = (FontManagerPinnedComparisons*) base;
	_tmp0_ = g_strdup (_ ("Save the current comparison\nby clicking the + button"));
	place_holder_text = _tmp0_;
	_tmp1_ = (FontManagerPlaceHolder*) font_manager_place_holder_new (NULL, NULL, place_holder_text, "view-pin-symbolic");
	g_object_ref_sink (_tmp1_);
	place_holder = _tmp1_;
	_tmp2_ = self->priv->list;
	gtk_list_box_set_placeholder (_tmp2_, (GtkWidget*) place_holder);
	g_signal_connect_object ((GObject*) self, "notify::compare", (GCallback) ___lambda105__g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::model", (GCallback) ___lambda107__g_object_notify, self, 0);
	_tmp3_ = font_manager_pinned_comparison_model_new ();
	_tmp4_ = _tmp3_;
	font_manager_pinned_comparisons_set_model (self, _tmp4_);
	_g_object_unref0 (_tmp4_);
	font_manager_pinned_comparisons_load (self);
	G_OBJECT_CLASS (font_manager_pinned_comparisons_parent_class)->constructed ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_popover_get_type (), GtkPopover));
	_g_object_unref0 (place_holder);
	_g_free0 (place_holder_text);
	return;
}

static gchar*
font_manager_pinned_comparisons_get_cache_file (void)
{
	gchar* dirpath = NULL;
	gchar* _tmp0_;
	gchar* filepath = NULL;
	gchar* _tmp1_;
	gchar* result;
	_tmp0_ = font_manager_get_package_config_directory ();
	dirpath = _tmp0_;
	_tmp1_ = g_build_filename (dirpath, "PinnedComparisons.json", NULL);
	filepath = _tmp1_;
	g_mkdir_with_parents (dirpath, 0755);
	result = filepath;
	_g_free0 (dirpath);
	return result;
}

static void
___lambda109_ (FontManagerPinnedComparisons* self)
{
	gtk_popover_popdown ((GtkPopover*) self);
}

static void
____lambda109__font_manager_pinned_comparison_row_activated (FontManagerPinnedComparisonRow* _sender,
                                                             gpointer self)
{
	___lambda109_ ((FontManagerPinnedComparisons*) self);
}

static void
font_manager_pinned_comparisons_on_items_changed (FontManagerPinnedComparisons* self,
                                                  guint position,
                                                  guint removed,
                                                  guint added)
{
	g_return_if_fail (self != NULL);
	if (added > ((guint) 0)) {
		GtkListBoxRow* row = NULL;
		GtkListBox* _tmp0_;
		GtkListBoxRow* _tmp1_;
		GtkListBoxRow* _tmp2_;
		FontManagerPinnedComparisonRow* widget = NULL;
		GtkListBoxRow* _tmp3_;
		GtkWidget* _tmp4_;
		FontManagerPinnedComparisonRow* _tmp5_;
		GtkListBox* _tmp6_;
		GtkListBoxRow* _tmp7_;
		FontManagerPinnedComparisonRow* _tmp8_;
		FontManagerPinnedComparisonRow* _tmp9_;
		_tmp0_ = self->priv->list;
		_tmp1_ = gtk_list_box_get_row_at_index (_tmp0_, (gint) position);
		_tmp2_ = _g_object_ref0 (_tmp1_);
		row = _tmp2_;
		_tmp3_ = row;
		_tmp4_ = gtk_list_box_row_get_child (_tmp3_);
		_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, FONT_MANAGER_TYPE_PINNED_COMPARISON_ROW, FontManagerPinnedComparisonRow));
		widget = _tmp5_;
		_tmp6_ = self->priv->list;
		_tmp7_ = row;
		gtk_list_box_select_row (_tmp6_, _tmp7_);
		_tmp8_ = widget;
		gtk_widget_grab_focus ((GtkWidget*) _tmp8_);
		_tmp9_ = widget;
		g_signal_connect_object (_tmp9_, "activated", (GCallback) ____lambda109__font_manager_pinned_comparison_row_activated, self, 0);
		_g_object_unref0 (widget);
		_g_object_unref0 (row);
	}
	return;
}

static void
_vala_JsonNode_free (JsonNode* self)
{
	g_boxed_free (json_node_get_type (), self);
}

static Block4Data*
block4_data_ref (Block4Data* _data4_)
{
	g_atomic_int_inc (&_data4_->_ref_count_);
	return _data4_;
}

static void
block4_data_unref (void * _userdata_)
{
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
		FontManagerPinnedComparisons* self;
		self = _data4_->self;
		_g_object_unref0 (_data4_->item);
		_g_object_unref0 (self);
		g_slice_free (Block4Data, _data4_);
	}
}

static gpointer
_json_object_ref0 (gpointer self)
{
	return self ? json_object_ref (self) : NULL;
}

static void
__lambda111_ (Block4Data* _data4_,
              JsonArray* a,
              guint i,
              JsonNode* n)
{
	FontManagerPinnedComparisons* self;
	JsonObject* o = NULL;
	JsonObject* _tmp0_;
	JsonObject* _tmp1_;
	FontManagerFont* entry = NULL;
	FontManagerFont* _tmp2_;
	GPtrArray* _tmp3_;
	GPtrArray* _tmp4_;
	GObject* _tmp5_;
	self = _data4_->self;
	g_return_if_fail (a != NULL);
	g_return_if_fail (n != NULL);
	_tmp0_ = json_node_get_object (n);
	_tmp1_ = _json_object_ref0 (_tmp0_);
	o = _tmp1_;
	_tmp2_ = font_manager_font_new ();
	entry = _tmp2_;
	g_object_set (entry, "source-object", o, NULL);
	_tmp3_ = font_manager_pinned_comparison_get_items (_data4_->item);
	_tmp4_ = _tmp3_;
	_tmp5_ = _g_object_ref0 ((GObject*) entry);
	g_ptr_array_add (_tmp4_, _tmp5_);
	_g_object_unref0 (entry);
	_json_object_unref0 (o);
}

static void
___lambda111__json_array_foreach (JsonArray* array,
                                  guint index_,
                                  JsonNode* element_node,
                                  gpointer self)
{
	__lambda111_ (self, array, index_, element_node);
}

static void
__lambda110_ (FontManagerPinnedComparisons* self,
              JsonArray* array,
              guint index,
              JsonNode* node)
{
	Block4Data* _data4_;
	JsonObject* obj = NULL;
	JsonObject* _tmp0_;
	JsonObject* _tmp1_;
	FontManagerPinnedComparison* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GPtrArray* _tmp5_;
	GPtrArray* _tmp6_;
	JsonArray* _tmp7_;
	FontManagerPinnedComparisonModel* _tmp8_;
	g_return_if_fail (array != NULL);
	g_return_if_fail (node != NULL);
	_data4_ = g_slice_new0 (Block4Data);
	_data4_->_ref_count_ = 1;
	_data4_->self = g_object_ref (self);
	_tmp0_ = json_node_get_object (node);
	_tmp1_ = _json_object_ref0 (_tmp0_);
	obj = _tmp1_;
	_tmp2_ = font_manager_pinned_comparison_new ();
	_data4_->item = _tmp2_;
	_tmp3_ = json_object_get_string_member (obj, "label");
	font_manager_pinned_comparison_set_label (_data4_->item, _tmp3_);
	_tmp4_ = json_object_get_string_member (obj, "created");
	font_manager_pinned_comparison_set_created (_data4_->item, _tmp4_);
	_tmp5_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_tmp6_ = _tmp5_;
	font_manager_pinned_comparison_set_items (_data4_->item, _tmp6_);
	_g_ptr_array_unref0 (_tmp6_);
	_tmp7_ = json_object_get_array_member (obj, "items");
	json_array_foreach_element (_tmp7_, ___lambda111__json_array_foreach, _data4_);
	_tmp8_ = self->priv->_model;
	font_manager_pinned_comparison_model_add_item (_tmp8_, _data4_->item);
	_json_object_unref0 (obj);
	block4_data_unref (_data4_);
	_data4_ = NULL;
}

static void
___lambda110__json_array_foreach (JsonArray* array,
                                  guint index_,
                                  JsonNode* element_node,
                                  gpointer self)
{
	__lambda110_ ((FontManagerPinnedComparisons*) self, array, index_, element_node);
}

void
font_manager_pinned_comparisons_load (FontManagerPinnedComparisons* self)
{
	JsonNode* root_node = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	JsonNode* _tmp2_;
	JsonNode* _tmp3_;
	JsonNode* _tmp4_;
	JsonNode* _tmp5_;
	JsonArray* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = font_manager_pinned_comparisons_get_cache_file ();
	_tmp1_ = _tmp0_;
	_tmp2_ = font_manager_load_json_file (_tmp1_);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	root_node = _tmp3_;
	_tmp4_ = root_node;
	if (_tmp4_ == NULL) {
		__vala_JsonNode_free0 (root_node);
		return;
	}
	_tmp5_ = root_node;
	_tmp6_ = json_node_get_array (_tmp5_);
	json_array_foreach_element (_tmp6_, ___lambda110__json_array_foreach, self);
	__vala_JsonNode_free0 (root_node);
	return;
}

static void
font_manager_pinned_comparisons_on_list_row_activated (FontManagerPinnedComparisons* self,
                                                       GtkListBox* box,
                                                       GtkListBoxRow* row)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (box != NULL);
	font_manager_pinned_comparisons_on_restore_button_clicked (self);
	return;
}

static void
_font_manager_pinned_comparisons_on_list_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                   GtkListBoxRow* row,
                                                                                   gpointer self)
{
	font_manager_pinned_comparisons_on_list_row_activated ((FontManagerPinnedComparisons*) self, _sender, row);
}

static void
font_manager_pinned_comparisons_on_list_row_selected (FontManagerPinnedComparisons* self,
                                                      GtkListBox* box,
                                                      GtkListBoxRow* row)
{
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (box != NULL);
	_tmp0_ = self->priv->remove_button;
	font_manager_set_control_sensitivity ((GtkWidget*) _tmp0_, row != NULL);
	_tmp1_ = self->priv->restore_button;
	font_manager_set_control_sensitivity ((GtkWidget*) _tmp1_, row != NULL);
	return;
}

static void
_font_manager_pinned_comparisons_on_list_row_selected_gtk_list_box_row_selected (GtkListBox* _sender,
                                                                                 GtkListBoxRow* row,
                                                                                 gpointer self)
{
	font_manager_pinned_comparisons_on_list_row_selected ((FontManagerPinnedComparisons*) self, _sender, row);
}

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

static void
font_manager_pinned_comparisons_on_closed (FontManagerPinnedComparisons* self)
{
	JsonArray* arr = NULL;
	JsonArray* _tmp0_;
	guint total = 0U;
	FontManagerPinnedComparisonModel* _tmp1_;
	JsonNode* node = NULL;
	JsonNode* _tmp30_;
	JsonArray* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	g_return_if_fail (self != NULL);
	_tmp0_ = json_array_new ();
	arr = _tmp0_;
	_tmp1_ = self->priv->_model;
	total = g_list_model_get_n_items ((GListModel*) _tmp1_);
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				FontManagerPinnedComparison* item = NULL;
				FontManagerPinnedComparisonModel* _tmp4_;
				GObject* _tmp5_;
				JsonObject* obj = NULL;
				JsonObject* _tmp6_;
				JsonObject* _tmp7_;
				FontManagerPinnedComparison* _tmp8_;
				const gchar* _tmp9_;
				const gchar* _tmp10_;
				JsonObject* _tmp11_;
				FontManagerPinnedComparison* _tmp12_;
				const gchar* _tmp13_;
				const gchar* _tmp14_;
				JsonArray* _arr = NULL;
				JsonArray* _tmp15_;
				FontManagerPinnedComparison* _tmp16_;
				GPtrArray* _tmp17_;
				GPtrArray* _tmp18_;
				JsonObject* _tmp24_;
				JsonArray* _tmp25_;
				JsonArray* _tmp26_;
				JsonArray* _tmp27_;
				JsonObject* _tmp28_;
				JsonObject* _tmp29_;
				if (!_tmp2_) {
					guint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				if (!(i < total)) {
					break;
				}
				_tmp4_ = self->priv->_model;
				_tmp5_ = g_list_model_get_item ((GListModel*) _tmp4_, i);
				item = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, FONT_MANAGER_TYPE_PINNED_COMPARISON, FontManagerPinnedComparison);
				_tmp6_ = json_object_new ();
				obj = _tmp6_;
				_tmp7_ = obj;
				_tmp8_ = item;
				_tmp9_ = font_manager_pinned_comparison_get_label (_tmp8_);
				_tmp10_ = _tmp9_;
				json_object_set_string_member (_tmp7_, "label", _tmp10_);
				_tmp11_ = obj;
				_tmp12_ = item;
				_tmp13_ = font_manager_pinned_comparison_get_created (_tmp12_);
				_tmp14_ = _tmp13_;
				json_object_set_string_member (_tmp11_, "created", _tmp14_);
				_tmp15_ = json_array_new ();
				_arr = _tmp15_;
				_tmp16_ = item;
				_tmp17_ = font_manager_pinned_comparison_get_items (_tmp16_);
				_tmp18_ = _tmp17_;
				{
					GPtrArray* it_collection = NULL;
					guint it_index = 0U;
					it_collection = _tmp18_;
					for (it_index = 0; it_index < it_collection->len; it_index = it_index + 1) {
						GObject* _tmp19_;
						GObject* it = NULL;
						_tmp19_ = _g_object_ref0 ((GObject*) g_ptr_array_index (it_collection, it_index));
						it = _tmp19_;
						{
							JsonArray* _tmp20_;
							GObject* _tmp21_;
							JsonObject* _tmp22_;
							JsonObject* _tmp23_;
							_tmp20_ = _arr;
							_tmp21_ = it;
							g_object_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, font_manager_font_get_type (), FontManagerFont), "source-object", &_tmp22_, NULL);
							_tmp23_ = _tmp22_;
							json_array_add_object_element (_tmp20_, _tmp23_);
							_g_object_unref0 (it);
						}
					}
				}
				_tmp24_ = obj;
				_tmp25_ = _arr;
				_tmp26_ = _json_array_ref0 (_tmp25_);
				json_object_set_array_member (_tmp24_, "items", _tmp26_);
				_tmp27_ = arr;
				_tmp28_ = obj;
				_tmp29_ = _json_object_ref0 (_tmp28_);
				json_array_add_object_element (_tmp27_, _tmp29_);
				_json_array_unref0 (_arr);
				_json_object_unref0 (obj);
				_g_object_unref0 (item);
			}
		}
	}
	_tmp30_ = json_node_new (JSON_NODE_ARRAY);
	node = _tmp30_;
	_tmp31_ = arr;
	json_node_set_array (node, _tmp31_);
	_tmp32_ = font_manager_pinned_comparisons_get_cache_file ();
	_tmp33_ = _tmp32_;
	font_manager_write_json_file (node, _tmp33_, TRUE);
	_g_free0 (_tmp33_);
	__vala_JsonNode_free0 (node);
	_json_array_unref0 (arr);
	return;
}

static void
_font_manager_pinned_comparisons_on_closed_gtk_popover_closed (GtkPopover* _sender,
                                                               gpointer self)
{
	font_manager_pinned_comparisons_on_closed ((FontManagerPinnedComparisons*) self);
}

static void
font_manager_pinned_comparisons_on_save_clicked (FontManagerPinnedComparisons* self)
{
	FontManagerPinnedComparison* item = NULL;
	FontManagerPinnedComparison* _tmp0_;
	FontManagerPinnedComparisonModel* _tmp1_;
	FontManagerComparePane* _tmp2_;
	GPtrArray* _tmp3_;
	GPtrArray* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = font_manager_pinned_comparison_new ();
	item = _tmp0_;
	_tmp1_ = self->priv->_model;
	font_manager_pinned_comparison_model_add_item (_tmp1_, item);
	_tmp2_ = self->priv->_compare;
	_tmp3_ = font_manager_compare_pane_list_items (_tmp2_);
	_tmp4_ = _tmp3_;
	font_manager_pinned_comparison_set_items (item, _tmp4_);
	_g_ptr_array_unref0 (_tmp4_);
	_g_object_unref0 (item);
	return;
}

static void
_font_manager_pinned_comparisons_on_save_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self)
{
	font_manager_pinned_comparisons_on_save_clicked ((FontManagerPinnedComparisons*) self);
}

static void
font_manager_pinned_comparisons_on_remove_clicked (FontManagerPinnedComparisons* self)
{
	GtkListBox* _tmp0_;
	GtkListBoxRow* _tmp1_;
	guint position = 0U;
	GtkListBox* _tmp2_;
	GtkListBoxRow* _tmp3_;
	FontManagerPinnedComparisonModel* _tmp4_;
	GtkListBox* _tmp8_;
	GtkListBox* _tmp9_;
	GtkListBoxRow* _tmp10_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->list;
	_tmp1_ = gtk_list_box_get_selected_row (_tmp0_);
	if (_tmp1_ == NULL) {
		return;
	}
	_tmp2_ = self->priv->list;
	_tmp3_ = gtk_list_box_get_selected_row (_tmp2_);
	position = (guint) gtk_list_box_row_get_index (_tmp3_);
	_tmp4_ = self->priv->_model;
	font_manager_pinned_comparison_model_remove_item (_tmp4_, position);
	while (TRUE) {
		gboolean _tmp5_ = FALSE;
		guint _tmp7_;
		if (position > ((guint) 0)) {
			FontManagerPinnedComparisonModel* _tmp6_;
			_tmp6_ = self->priv->_model;
			_tmp5_ = position >= g_list_model_get_n_items ((GListModel*) _tmp6_);
		} else {
			_tmp5_ = FALSE;
		}
		if (!_tmp5_) {
			break;
		}
		_tmp7_ = position;
		position = _tmp7_ - 1;
	}
	_tmp8_ = self->priv->list;
	_tmp9_ = self->priv->list;
	_tmp10_ = gtk_list_box_get_row_at_index (_tmp9_, (gint) position);
	gtk_list_box_select_row (_tmp8_, _tmp10_);
	return;
}

static void
_font_manager_pinned_comparisons_on_remove_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	font_manager_pinned_comparisons_on_remove_clicked ((FontManagerPinnedComparisons*) self);
}

static void
font_manager_pinned_comparisons_on_restore_button_clicked (FontManagerPinnedComparisons* self)
{
	GtkListBox* _tmp0_;
	GtkListBoxRow* _tmp1_;
	guint position = 0U;
	GtkListBox* _tmp2_;
	GtkListBoxRow* _tmp3_;
	GObject* item = NULL;
	FontManagerPinnedComparisonModel* _tmp4_;
	GObject* _tmp5_;
	FontManagerComparePane* _tmp6_;
	GPtrArray* items = NULL;
	GPtrArray* _tmp13_;
	GObject* _tmp14_;
	GPtrArray* _tmp15_;
	GPtrArray* _tmp16_;
	FontManagerComparePane* _tmp21_;
	GPtrArray* _tmp22_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->list;
	_tmp1_ = gtk_list_box_get_selected_row (_tmp0_);
	if (_tmp1_ == NULL) {
		return;
	}
	_tmp2_ = self->priv->list;
	_tmp3_ = gtk_list_box_get_selected_row (_tmp2_);
	position = (guint) gtk_list_box_row_get_index (_tmp3_);
	_tmp4_ = self->priv->_model;
	_tmp5_ = g_list_model_get_item ((GListModel*) _tmp4_, position);
	item = _tmp5_;
	_tmp6_ = self->priv->_compare;
	g_return_if_fail (_tmp6_ != NULL);
	while (TRUE) {
		FontManagerComparePane* _tmp7_;
		FontManagerCompareModel* _tmp8_;
		FontManagerCompareModel* _tmp9_;
		FontManagerComparePane* _tmp10_;
		FontManagerCompareModel* _tmp11_;
		FontManagerCompareModel* _tmp12_;
		_tmp7_ = self->priv->_compare;
		_tmp8_ = font_manager_compare_pane_get_model (_tmp7_);
		_tmp9_ = _tmp8_;
		if (!(g_list_model_get_n_items ((GListModel*) _tmp9_) > ((guint) 0))) {
			break;
		}
		_tmp10_ = self->priv->_compare;
		_tmp11_ = font_manager_compare_pane_get_model (_tmp10_);
		_tmp12_ = _tmp11_;
		font_manager_compare_model_remove_item (_tmp12_, (guint) 0);
	}
	_tmp13_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	items = _tmp13_;
	_tmp14_ = item;
	_tmp15_ = font_manager_pinned_comparison_get_items (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, FONT_MANAGER_TYPE_PINNED_COMPARISON, FontManagerPinnedComparison));
	_tmp16_ = _tmp15_;
	{
		GPtrArray* it_collection = NULL;
		guint it_index = 0U;
		it_collection = _tmp16_;
		for (it_index = 0; it_index < it_collection->len; it_index = it_index + 1) {
			GObject* _tmp17_;
			GObject* it = NULL;
			_tmp17_ = _g_object_ref0 ((GObject*) g_ptr_array_index (it_collection, it_index));
			it = _tmp17_;
			{
				GPtrArray* _tmp18_;
				GObject* _tmp19_;
				GObject* _tmp20_;
				_tmp18_ = items;
				_tmp19_ = it;
				_tmp20_ = _g_object_ref0 (_tmp19_);
				g_ptr_array_add (_tmp18_, _tmp20_);
				_g_object_unref0 (it);
			}
		}
	}
	_tmp21_ = self->priv->_compare;
	_tmp22_ = items;
	font_manager_compare_pane_add_items (_tmp21_, _tmp22_);
	gtk_popover_popdown ((GtkPopover*) self);
	_g_ptr_array_unref0 (items);
	_g_object_unref0 (item);
	return;
}

static void
_font_manager_pinned_comparisons_on_restore_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                               gpointer self)
{
	font_manager_pinned_comparisons_on_restore_button_clicked ((FontManagerPinnedComparisons*) self);
}

FontManagerPinnedComparisons*
font_manager_pinned_comparisons_construct (GType object_type)
{
	FontManagerPinnedComparisons * self = NULL;
	self = (FontManagerPinnedComparisons*) g_object_new (object_type, NULL);
	return self;
}

FontManagerPinnedComparisons*
font_manager_pinned_comparisons_new (void)
{
	return font_manager_pinned_comparisons_construct (FONT_MANAGER_TYPE_PINNED_COMPARISONS);
}

FontManagerComparePane*
font_manager_pinned_comparisons_get_compare (FontManagerPinnedComparisons* self)
{
	FontManagerComparePane* result;
	FontManagerComparePane* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_compare;
	result = _tmp0_;
	return result;
}

void
font_manager_pinned_comparisons_set_compare (FontManagerPinnedComparisons* self,
                                             FontManagerComparePane* value)
{
	FontManagerComparePane* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_pinned_comparisons_get_compare (self);
	if (old_value != value) {
		FontManagerComparePane* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_compare);
		self->priv->_compare = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_pinned_comparisons_properties[FONT_MANAGER_PINNED_COMPARISONS_COMPARE_PROPERTY]);
	}
}

FontManagerPinnedComparisonModel*
font_manager_pinned_comparisons_get_model (FontManagerPinnedComparisons* self)
{
	FontManagerPinnedComparisonModel* result;
	FontManagerPinnedComparisonModel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_model;
	result = _tmp0_;
	return result;
}

void
font_manager_pinned_comparisons_set_model (FontManagerPinnedComparisons* self,
                                           FontManagerPinnedComparisonModel* value)
{
	FontManagerPinnedComparisonModel* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_pinned_comparisons_get_model (self);
	if (old_value != value) {
		FontManagerPinnedComparisonModel* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_model);
		self->priv->_model = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_pinned_comparisons_properties[FONT_MANAGER_PINNED_COMPARISONS_MODEL_PROPERTY]);
	}
}

static void
font_manager_pinned_comparisons_class_init (FontManagerPinnedComparisonsClass * klass,
                                            gpointer klass_data)
{
	font_manager_pinned_comparisons_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerPinnedComparisons_private_offset);
	((GObjectClass *) klass)->constructed = (void (*) (GObject*)) font_manager_pinned_comparisons_real_constructed;
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_pinned_comparisons_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_pinned_comparisons_set_property;
	G_OBJECT_CLASS (klass)->finalize = font_manager_pinned_comparisons_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_PINNED_COMPARISONS_COMPARE_PROPERTY, font_manager_pinned_comparisons_properties[FONT_MANAGER_PINNED_COMPARISONS_COMPARE_PROPERTY] = g_param_spec_object ("compare", "compare", "compare", FONT_MANAGER_TYPE_COMPARE_PANE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_PINNED_COMPARISONS_MODEL_PROPERTY, font_manager_pinned_comparisons_properties[FONT_MANAGER_PINNED_COMPARISONS_MODEL_PROPERTY] = g_param_spec_object ("model", "model", "model", FONT_MANAGER_TYPE_PINNED_COMPARISON_MODEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/github/FontManager/FontManager/ui/font-manager-pinned-comparisons.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "list", FALSE, FontManagerPinnedComparisons_private_offset + G_STRUCT_OFFSET (FontManagerPinnedComparisonsPrivate, list));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "save_button", FALSE, FontManagerPinnedComparisons_private_offset + G_STRUCT_OFFSET (FontManagerPinnedComparisonsPrivate, save_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "remove_button", FALSE, FontManagerPinnedComparisons_private_offset + G_STRUCT_OFFSET (FontManagerPinnedComparisonsPrivate, remove_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "restore_button", FALSE, FontManagerPinnedComparisons_private_offset + G_STRUCT_OFFSET (FontManagerPinnedComparisonsPrivate, restore_button));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_list_row_activated", G_CALLBACK(_font_manager_pinned_comparisons_on_list_row_activated_gtk_list_box_row_activated));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_list_row_selected", G_CALLBACK(_font_manager_pinned_comparisons_on_list_row_selected_gtk_list_box_row_selected));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_closed", G_CALLBACK(_font_manager_pinned_comparisons_on_closed_gtk_popover_closed));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_save_clicked", G_CALLBACK(_font_manager_pinned_comparisons_on_save_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_remove_clicked", G_CALLBACK(_font_manager_pinned_comparisons_on_remove_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_restore_button_clicked", G_CALLBACK(_font_manager_pinned_comparisons_on_restore_button_clicked_gtk_button_clicked));
}

static void
font_manager_pinned_comparisons_instance_init (FontManagerPinnedComparisons * self,
                                               gpointer klass)
{
	self->priv = font_manager_pinned_comparisons_get_instance_private (self);
	self->priv->_compare = NULL;
	self->priv->_model = NULL;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
font_manager_pinned_comparisons_finalize (GObject * obj)
{
	FontManagerPinnedComparisons * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_PINNED_COMPARISONS, FontManagerPinnedComparisons);
	_g_object_unref0 (self->priv->_compare);
	_g_object_unref0 (self->priv->_model);
	G_OBJECT_CLASS (font_manager_pinned_comparisons_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_pinned_comparisons_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerPinnedComparisonsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_pinned_comparisons_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerPinnedComparisons), 0, (GInstanceInitFunc) font_manager_pinned_comparisons_instance_init, NULL };
	GType font_manager_pinned_comparisons_type_id;
	font_manager_pinned_comparisons_type_id = g_type_register_static (gtk_popover_get_type (), "FontManagerPinnedComparisons", &g_define_type_info, 0);
	FontManagerPinnedComparisons_private_offset = g_type_add_instance_private (font_manager_pinned_comparisons_type_id, sizeof (FontManagerPinnedComparisonsPrivate));
	return font_manager_pinned_comparisons_type_id;
}

GType
font_manager_pinned_comparisons_get_type (void)
{
	static volatile gsize font_manager_pinned_comparisons_type_id__once = 0;
	if (g_once_init_enter (&font_manager_pinned_comparisons_type_id__once)) {
		GType font_manager_pinned_comparisons_type_id;
		font_manager_pinned_comparisons_type_id = font_manager_pinned_comparisons_get_type_once ();
		g_once_init_leave (&font_manager_pinned_comparisons_type_id__once, font_manager_pinned_comparisons_type_id);
	}
	return font_manager_pinned_comparisons_type_id__once;
}

static void
_vala_font_manager_pinned_comparisons_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec)
{
	FontManagerPinnedComparisons * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_PINNED_COMPARISONS, FontManagerPinnedComparisons);
	switch (property_id) {
		case FONT_MANAGER_PINNED_COMPARISONS_COMPARE_PROPERTY:
		g_value_set_object (value, font_manager_pinned_comparisons_get_compare (self));
		break;
		case FONT_MANAGER_PINNED_COMPARISONS_MODEL_PROPERTY:
		g_value_set_object (value, font_manager_pinned_comparisons_get_model (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_pinned_comparisons_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec)
{
	FontManagerPinnedComparisons * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_PINNED_COMPARISONS, FontManagerPinnedComparisons);
	switch (property_id) {
		case FONT_MANAGER_PINNED_COMPARISONS_COMPARE_PROPERTY:
		font_manager_pinned_comparisons_set_compare (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_PINNED_COMPARISONS_MODEL_PROPERTY:
		font_manager_pinned_comparisons_set_model (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

