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

/* FontListFilter.vala
 *
 * Copyright (C) 2009-2024 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 <json-glib/json-glib.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define FONT_MANAGER_TYPE_CACHEABLE (font_manager_cacheable_get_type ())
#define FONT_MANAGER_CACHEABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FONT_MANAGER_TYPE_CACHEABLE, FontManagerCacheable))
#define FONT_MANAGER_CACHEABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FONT_MANAGER_TYPE_CACHEABLE, FontManagerCacheableClass))
#define FONT_MANAGER_IS_CACHEABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FONT_MANAGER_TYPE_CACHEABLE))
#define FONT_MANAGER_IS_CACHEABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FONT_MANAGER_TYPE_CACHEABLE))
#define FONT_MANAGER_CACHEABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FONT_MANAGER_TYPE_CACHEABLE, FontManagerCacheableClass))

typedef struct _FontManagerCacheable FontManagerCacheable;
typedef struct _FontManagerCacheableClass FontManagerCacheableClass;

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

typedef struct _FontManagerFontListFilter FontManagerFontListFilter;
typedef struct _FontManagerFontListFilterClass FontManagerFontListFilterClass;
typedef struct _FontManagerCacheablePrivate FontManagerCacheablePrivate;
typedef struct _FontManagerFontListFilterPrivate FontManagerFontListFilterPrivate;
enum  {
	FONT_MANAGER_FONT_LIST_FILTER_0_PROPERTY,
	FONT_MANAGER_FONT_LIST_FILTER_NAME_PROPERTY,
	FONT_MANAGER_FONT_LIST_FILTER_ICON_PROPERTY,
	FONT_MANAGER_FONT_LIST_FILTER_COMMENT_PROPERTY,
	FONT_MANAGER_FONT_LIST_FILTER_INDEX_PROPERTY,
	FONT_MANAGER_FONT_LIST_FILTER_SIZE_PROPERTY,
	FONT_MANAGER_FONT_LIST_FILTER_DEPTH_PROPERTY,
	FONT_MANAGER_FONT_LIST_FILTER_NUM_PROPERTIES
};
static GParamSpec* font_manager_font_list_filter_properties[FONT_MANAGER_FONT_LIST_FILTER_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _FontManagerFontListFilterUpdateData FontManagerFontListFilterUpdateData;

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

typedef struct _FontManagerFontListFilterModel FontManagerFontListFilterModel;
typedef struct _FontManagerFontListFilterModelClass FontManagerFontListFilterModelClass;
typedef struct _FontManagerFontListFilterModelPrivate FontManagerFontListFilterModelPrivate;
enum  {
	FONT_MANAGER_FONT_LIST_FILTER_MODEL_0_PROPERTY,
	FONT_MANAGER_FONT_LIST_FILTER_MODEL_ITEMS_PROPERTY,
	FONT_MANAGER_FONT_LIST_FILTER_MODEL_NUM_PROPERTIES
};
static GParamSpec* font_manager_font_list_filter_model_properties[FONT_MANAGER_FONT_LIST_FILTER_MODEL_NUM_PROPERTIES];
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))

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

typedef struct _FontManagerFilterListView FontManagerFilterListView;
typedef struct _FontManagerFilterListViewClass FontManagerFilterListViewClass;
typedef struct _FontManagerFilterListViewPrivate FontManagerFilterListViewPrivate;
enum  {
	FONT_MANAGER_FILTER_LIST_VIEW_0_PROPERTY,
	FONT_MANAGER_FILTER_LIST_VIEW_SELECTED_POSITION_PROPERTY,
	FONT_MANAGER_FILTER_LIST_VIEW_SELECTED_ITEM_PROPERTY,
	FONT_MANAGER_FILTER_LIST_VIEW_TREEMODEL_PROPERTY,
	FONT_MANAGER_FILTER_LIST_VIEW_SELECTION_PROPERTY,
	FONT_MANAGER_FILTER_LIST_VIEW_MODEL_PROPERTY,
	FONT_MANAGER_FILTER_LIST_VIEW_NUM_PROPERTIES
};
static GParamSpec* font_manager_filter_list_view_properties[FONT_MANAGER_FILTER_LIST_VIEW_NUM_PROPERTIES];
#define _gtk_bitset_unref0(var) ((var == NULL) ? NULL : (var = (gtk_bitset_unref (var), NULL)))
enum  {
	FONT_MANAGER_FILTER_LIST_VIEW_SELECTION_CHANGED_SIGNAL,
	FONT_MANAGER_FILTER_LIST_VIEW_NUM_SIGNALS
};
static guint font_manager_filter_list_view_signals[FONT_MANAGER_FILTER_LIST_VIEW_NUM_SIGNALS] = {0};
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

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

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

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

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

struct _FontManagerFontListFilterPrivate {
	gchar* _name;
	gchar* _icon;
	gchar* _comment;
	gint _index;
	gint _depth;
};

struct _FontManagerFontListFilterUpdateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FontManagerFontListFilter* self;
};

struct _FontManagerFontListFilterModel {
	GObject parent_instance;
	FontManagerFontListFilterModelPrivate * priv;
};

struct _FontManagerFontListFilterModelClass {
	GObjectClass parent_class;
	void (*add_item) (FontManagerFontListFilterModel* self, FontManagerFontListFilter* item);
	void (*remove_item) (FontManagerFontListFilterModel* self, FontManagerFontListFilter* item);
};

struct _FontManagerFontListFilterModelPrivate {
	GPtrArray* _items;
};

struct _FontManagerFilterListView {
	GtkBox parent_instance;
	FontManagerFilterListViewPrivate * priv;
	GtkListView* listview;
};

struct _FontManagerFilterListViewClass {
	GtkBoxClass parent_class;
	void (*on_show_context_menu) (FontManagerFilterListView* self, gint n_press, gdouble x, gdouble y);
	void (*setup_list_row) (FontManagerFilterListView* self, GtkSignalListItemFactory* factory, GObject* item);
	void (*bind_list_row) (FontManagerFilterListView* self, GtkSignalListItemFactory* factory, GObject* item);
	void (*collapse_all) (FontManagerFilterListView* self);
	void (*on_row_selected) (FontManagerFilterListView* self, GtkTreeListRow* row);
	void (*on_selection_changed) (FontManagerFilterListView* self, guint position, guint n_items);
};

struct _FontManagerFilterListViewPrivate {
	guint _selected_position;
	FontManagerFontListFilter* _selected_item;
	GtkTreeListModel* _treemodel;
	GtkSingleSelection* _selection;
};

static gint FontManagerFontListFilter_private_offset;
static gpointer font_manager_font_list_filter_parent_class = NULL;
static gint FontManagerFontListFilterModel_private_offset;
static gpointer font_manager_font_list_filter_model_parent_class = NULL;
static GListModelInterface * font_manager_font_list_filter_model_g_list_model_parent_iface = NULL;
static gint FontManagerFilterListView_private_offset;
static gpointer font_manager_filter_list_view_parent_class = NULL;

VALA_EXTERN GType font_manager_cacheable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerCacheable, g_object_unref)
VALA_EXTERN GType font_manager_font_list_filter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerFontListFilter, g_object_unref)
VALA_EXTERN gint font_manager_filter_sort (FontManagerFontListFilter* a,
                               FontManagerFontListFilter* b);
VALA_EXTERN gint font_manager_font_list_filter_get_index (FontManagerFontListFilter* self);
VALA_EXTERN void font_manager_font_list_filter_update (FontManagerFontListFilter* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
VALA_EXTERN void font_manager_font_list_filter_update_finish (FontManagerFontListFilter* self,
                                                  GAsyncResult* _res_);
VALA_EXTERN gboolean font_manager_font_list_filter_matches (FontManagerFontListFilter* self,
                                                GObject* item);
VALA_EXTERN gchar* font_manager_font_list_filter_get_name (FontManagerFontListFilter* self);
VALA_EXTERN void font_manager_font_list_filter_set_name (FontManagerFontListFilter* self,
                                             const gchar* value);
VALA_EXTERN gchar* font_manager_font_list_filter_get_icon (FontManagerFontListFilter* self);
VALA_EXTERN void font_manager_font_list_filter_set_icon (FontManagerFontListFilter* self,
                                             const gchar* value);
VALA_EXTERN gchar* font_manager_font_list_filter_get_comment (FontManagerFontListFilter* self);
VALA_EXTERN void font_manager_font_list_filter_set_comment (FontManagerFontListFilter* self,
                                                const gchar* value);
VALA_EXTERN void font_manager_font_list_filter_set_index (FontManagerFontListFilter* self,
                                              gint value);
VALA_EXTERN gint font_manager_font_list_filter_get_size (FontManagerFontListFilter* self);
VALA_EXTERN gint font_manager_font_list_filter_get_depth (FontManagerFontListFilter* self);
VALA_EXTERN void font_manager_font_list_filter_set_depth (FontManagerFontListFilter* self,
                                              gint value);
static void font_manager_font_list_filter_real_update_data_free (gpointer _data);
static void font_manager_font_list_filter_real_update (FontManagerFontListFilter* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static gboolean font_manager_font_list_filter_real_update_co (FontManagerFontListFilterUpdateData* _data_);
static gboolean font_manager_font_list_filter_real_matches (FontManagerFontListFilter* self,
                                                     GObject* item);
VALA_EXTERN FontManagerFontListFilter* font_manager_font_list_filter_new (void);
VALA_EXTERN FontManagerFontListFilter* font_manager_font_list_filter_construct (GType object_type);
VALA_EXTERN FontManagerCacheable* font_manager_cacheable_new (void);
VALA_EXTERN FontManagerCacheable* font_manager_cacheable_construct (GType object_type);
static void font_manager_font_list_filter_finalize (GObject * obj);
static GType font_manager_font_list_filter_get_type_once (void);
static void _vala_font_manager_font_list_filter_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_font_manager_font_list_filter_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);
VALA_EXTERN GType font_manager_font_list_filter_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerFontListFilterModel, g_object_unref)
VALA_EXTERN void font_manager_font_list_filter_model_add_item (FontManagerFontListFilterModel* self,
                                                   FontManagerFontListFilter* item);
VALA_EXTERN void font_manager_font_list_filter_model_remove_item (FontManagerFontListFilterModel* self,
                                                      FontManagerFontListFilter* item);
static GType font_manager_font_list_filter_model_real_get_item_type (GListModel* base);
static guint font_manager_font_list_filter_model_real_get_n_items (GListModel* base);
VALA_EXTERN GPtrArray* font_manager_font_list_filter_model_get_items (FontManagerFontListFilterModel* self);
static GObject* font_manager_font_list_filter_model_real_get_item (GListModel* base,
                                                            guint position);
VALA_EXTERN void font_manager_font_list_filter_model_clear (FontManagerFontListFilterModel* self);
VALA_EXTERN void font_manager_font_list_filter_model_set_items (FontManagerFontListFilterModel* self,
                                                    GPtrArray* value);
static void _g_object_unref0_ (gpointer var);
static void font_manager_font_list_filter_model_real_add_item (FontManagerFontListFilterModel* self,
                                                        FontManagerFontListFilter* item);
static void __lambda24_ (FontManagerFontListFilterModel* self);
static void ___lambda24__font_manager_cacheable_changed (FontManagerCacheable* _sender,
                                                  gpointer self);
static void font_manager_font_list_filter_model_real_remove_item (FontManagerFontListFilterModel* self,
                                                           FontManagerFontListFilter* item);
VALA_EXTERN FontManagerFontListFilterModel* font_manager_font_list_filter_model_new (void);
VALA_EXTERN FontManagerFontListFilterModel* font_manager_font_list_filter_model_construct (GType object_type);
static GObject * font_manager_font_list_filter_model_constructor (GType type,
                                                           guint n_construct_properties,
                                                           GObjectConstructParam * construct_properties);
static void font_manager_font_list_filter_model_finalize (GObject * obj);
static GType font_manager_font_list_filter_model_get_type_once (void);
static void _vala_font_manager_font_list_filter_model_get_property (GObject * object,
                                                             guint property_id,
                                                             GValue * value,
                                                             GParamSpec * pspec);
static void _vala_font_manager_font_list_filter_model_set_property (GObject * object,
                                                             guint property_id,
                                                             const GValue * value,
                                                             GParamSpec * pspec);
VALA_EXTERN GType font_manager_filter_list_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FontManagerFilterListView, g_object_unref)
VALA_EXTERN void font_manager_filter_list_view_on_show_context_menu (FontManagerFilterListView* self,
                                                         gint n_press,
                                                         gdouble x,
                                                         gdouble y);
VALA_EXTERN void font_manager_filter_list_view_setup_list_row (FontManagerFilterListView* self,
                                                   GtkSignalListItemFactory* factory,
                                                   GObject* item);
VALA_EXTERN void font_manager_filter_list_view_bind_list_row (FontManagerFilterListView* self,
                                                  GtkSignalListItemFactory* factory,
                                                  GObject* item);
VALA_EXTERN void font_manager_filter_list_view_collapse_all (FontManagerFilterListView* self);
VALA_EXTERN void font_manager_filter_list_view_on_row_selected (FontManagerFilterListView* self,
                                                    GtkTreeListRow* row);
VALA_EXTERN void font_manager_filter_list_view_on_selection_changed (FontManagerFilterListView* self,
                                                         guint position,
                                                         guint n_items);
static void font_manager_filter_list_view_real_on_show_context_menu (FontManagerFilterListView* self,
                                                              gint n_press,
                                                              gdouble x,
                                                              gdouble y);
static void font_manager_filter_list_view_real_setup_list_row (FontManagerFilterListView* self,
                                                        GtkSignalListItemFactory* factory,
                                                        GObject* item);
static void font_manager_filter_list_view_real_bind_list_row (FontManagerFilterListView* self,
                                                       GtkSignalListItemFactory* factory,
                                                       GObject* item);
static GtkSignalListItemFactory* font_manager_filter_list_view_get_factory (FontManagerFilterListView* self);
static void _font_manager_filter_list_view_setup_list_row_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                       GObject* object,
                                                                                       gpointer self);
static void _font_manager_filter_list_view_bind_list_row_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                     GObject* object,
                                                                                     gpointer self);
static void font_manager_filter_list_view_real_collapse_all (FontManagerFilterListView* self);
VALA_EXTERN GtkTreeListModel* font_manager_filter_list_view_get_treemodel (FontManagerFilterListView* self);
static void font_manager_filter_list_view_real_on_row_selected (FontManagerFilterListView* self,
                                                         GtkTreeListRow* row);
VALA_EXTERN FontManagerFontListFilter* font_manager_filter_list_view_get_selected_item (FontManagerFilterListView* self);
static void font_manager_filter_list_view_real_on_selection_changed (FontManagerFilterListView* self,
                                                              guint position,
                                                              guint n_items);
VALA_EXTERN GtkSingleSelection* font_manager_filter_list_view_get_selection (FontManagerFilterListView* self);
VALA_EXTERN void font_manager_filter_list_view_set_selected_item (FontManagerFilterListView* self,
                                                      FontManagerFontListFilter* value);
VALA_EXTERN void font_manager_filter_list_view_set_selected_position (FontManagerFilterListView* self,
                                                          guint value);
VALA_EXTERN FontManagerFilterListView* font_manager_filter_list_view_new (void);
VALA_EXTERN FontManagerFilterListView* font_manager_filter_list_view_construct (GType object_type);
VALA_EXTERN guint font_manager_filter_list_view_get_selected_position (FontManagerFilterListView* self);
VALA_EXTERN void font_manager_filter_list_view_set_treemodel (FontManagerFilterListView* self,
                                                  GtkTreeListModel* value);
VALA_EXTERN void font_manager_filter_list_view_set_selection (FontManagerFilterListView* self,
                                                  GtkSingleSelection* value);
VALA_EXTERN FontManagerFontListFilterModel* font_manager_filter_list_view_get_model (FontManagerFilterListView* self);
static GObject * font_manager_filter_list_view_constructor (GType type,
                                                     guint n_construct_properties,
                                                     GObjectConstructParam * construct_properties);
static void _font_manager_filter_list_view_on_show_context_menu_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                                    gint n_press,
                                                                                    gdouble x,
                                                                                    gdouble y,
                                                                                    gpointer self);
static void _font_manager_filter_list_view___lambda25_ (FontManagerFilterListView* self,
                                                 GParamSpec* pspec);
static void _font_manager_filter_list_view_on_selection_changed_gtk_selection_model_selection_changed (GtkSelectionModel* _sender,
                                                                                                guint position,
                                                                                                guint n_items,
                                                                                                gpointer self);
static void __font_manager_filter_list_view___lambda25__g_object_notify (GObject* _sender,
                                                                  GParamSpec* pspec,
                                                                  gpointer self);
static void font_manager_filter_list_view_finalize (GObject * obj);
static GType font_manager_filter_list_view_get_type_once (void);
static void _vala_font_manager_filter_list_view_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_font_manager_filter_list_view_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

gint
font_manager_filter_sort (FontManagerFontListFilter* a,
                          FontManagerFontListFilter* b)
{
	gint _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint result;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = font_manager_font_list_filter_get_index (a);
	_tmp1_ = _tmp0_;
	_tmp2_ = font_manager_font_list_filter_get_index (b);
	_tmp3_ = _tmp2_;
	result = _tmp1_ - _tmp3_;
	return result;
}

static inline gpointer
font_manager_font_list_filter_get_instance_private (FontManagerFontListFilter* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerFontListFilter_private_offset);
}

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

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

static void
font_manager_font_list_filter_real_update (FontManagerFontListFilter* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	FontManagerFontListFilterUpdateData* _data_;
	FontManagerFontListFilter* _tmp0_;
	_data_ = g_slice_new0 (FontManagerFontListFilterUpdateData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, font_manager_font_list_filter_real_update_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	font_manager_font_list_filter_real_update_co (_data_);
}

static void
font_manager_font_list_filter_real_update_finish (FontManagerFontListFilter* self,
                                                  GAsyncResult* _res_)
{
	FontManagerFontListFilterUpdateData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gboolean
font_manager_font_list_filter_real_update_co (FontManagerFontListFilterUpdateData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
font_manager_font_list_filter_update (FontManagerFontListFilter* self,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_)
{
	FontManagerFontListFilterClass* _klass_;
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS (self);
	if (_klass_->update) {
		_klass_->update (self, _callback_, _user_data_);
	}
}

void
font_manager_font_list_filter_update_finish (FontManagerFontListFilter* self,
                                             GAsyncResult* _res_)
{
	FontManagerFontListFilterClass* _klass_;
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS (self);
	if (_klass_->update_finish) {
		_klass_->update_finish (self, _res_);
	}
}

static gboolean
font_manager_font_list_filter_real_matches (FontManagerFontListFilter* self,
                                            GObject* item)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	if (item != NULL) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

gboolean
font_manager_font_list_filter_matches (FontManagerFontListFilter* self,
                                       GObject* item)
{
	FontManagerFontListFilterClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS (self);
	if (_klass_->matches) {
		return _klass_->matches (self, item);
	}
	return FALSE;
}

FontManagerFontListFilter*
font_manager_font_list_filter_construct (GType object_type)
{
	FontManagerFontListFilter * self = NULL;
	self = (FontManagerFontListFilter*) font_manager_cacheable_construct (object_type);
	return self;
}

FontManagerFontListFilter*
font_manager_font_list_filter_new (void)
{
	return font_manager_font_list_filter_construct (FONT_MANAGER_TYPE_FONT_LIST_FILTER);
}

gchar*
font_manager_font_list_filter_get_name (FontManagerFontListFilter* self)
{
	FontManagerFontListFilterClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS (self);
	if (_klass_->get_name) {
		return _klass_->get_name (self);
	}
	return NULL;
}

static gchar*
font_manager_font_list_filter_real_get_name (FontManagerFontListFilter* base)
{
	gchar* result;
	FontManagerFontListFilter* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	self = base;
	_tmp0_ = self->priv->_name;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

void
font_manager_font_list_filter_set_name (FontManagerFontListFilter* self,
                                        const gchar* value)
{
	FontManagerFontListFilterClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS (self);
	if (_klass_->set_name) {
		_klass_->set_name (self, value);
	}
}

static void
font_manager_font_list_filter_real_set_name (FontManagerFontListFilter* base,
                                             const gchar* value)
{
	FontManagerFontListFilter* self;
	gchar* old_value;
	self = base;
	old_value = font_manager_font_list_filter_real_get_name (base);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_name);
		self->priv->_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_filter_properties[FONT_MANAGER_FONT_LIST_FILTER_NAME_PROPERTY]);
	}
	_g_free0 (old_value);
}

gchar*
font_manager_font_list_filter_get_icon (FontManagerFontListFilter* self)
{
	FontManagerFontListFilterClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS (self);
	if (_klass_->get_icon) {
		return _klass_->get_icon (self);
	}
	return NULL;
}

static gchar*
font_manager_font_list_filter_real_get_icon (FontManagerFontListFilter* base)
{
	gchar* result;
	FontManagerFontListFilter* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	self = base;
	_tmp0_ = self->priv->_icon;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

void
font_manager_font_list_filter_set_icon (FontManagerFontListFilter* self,
                                        const gchar* value)
{
	FontManagerFontListFilterClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS (self);
	if (_klass_->set_icon) {
		_klass_->set_icon (self, value);
	}
}

static void
font_manager_font_list_filter_real_set_icon (FontManagerFontListFilter* base,
                                             const gchar* value)
{
	FontManagerFontListFilter* self;
	gchar* old_value;
	self = base;
	old_value = font_manager_font_list_filter_real_get_icon (base);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_icon);
		self->priv->_icon = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_filter_properties[FONT_MANAGER_FONT_LIST_FILTER_ICON_PROPERTY]);
	}
	_g_free0 (old_value);
}

gchar*
font_manager_font_list_filter_get_comment (FontManagerFontListFilter* self)
{
	FontManagerFontListFilterClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS (self);
	if (_klass_->get_comment) {
		return _klass_->get_comment (self);
	}
	return NULL;
}

static gchar*
font_manager_font_list_filter_real_get_comment (FontManagerFontListFilter* base)
{
	gchar* result;
	FontManagerFontListFilter* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	self = base;
	_tmp0_ = self->priv->_comment;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

void
font_manager_font_list_filter_set_comment (FontManagerFontListFilter* self,
                                           const gchar* value)
{
	FontManagerFontListFilterClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS (self);
	if (_klass_->set_comment) {
		_klass_->set_comment (self, value);
	}
}

static void
font_manager_font_list_filter_real_set_comment (FontManagerFontListFilter* base,
                                                const gchar* value)
{
	FontManagerFontListFilter* self;
	gchar* old_value;
	self = base;
	old_value = font_manager_font_list_filter_real_get_comment (base);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_comment);
		self->priv->_comment = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_filter_properties[FONT_MANAGER_FONT_LIST_FILTER_COMMENT_PROPERTY]);
	}
	_g_free0 (old_value);
}

gint
font_manager_font_list_filter_get_index (FontManagerFontListFilter* self)
{
	FontManagerFontListFilterClass* _klass_;
	g_return_val_if_fail (self != NULL, 0);
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS (self);
	if (_klass_->get_index) {
		return _klass_->get_index (self);
	}
	return -1;
}

static gint
font_manager_font_list_filter_real_get_index (FontManagerFontListFilter* base)
{
	gint result;
	FontManagerFontListFilter* self;
	self = base;
	result = self->priv->_index;
	return result;
}

void
font_manager_font_list_filter_set_index (FontManagerFontListFilter* self,
                                         gint value)
{
	FontManagerFontListFilterClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS (self);
	if (_klass_->set_index) {
		_klass_->set_index (self, value);
	}
}

static void
font_manager_font_list_filter_real_set_index (FontManagerFontListFilter* base,
                                              gint value)
{
	FontManagerFontListFilter* self;
	gint old_value;
	self = base;
	old_value = font_manager_font_list_filter_real_get_index (base);
	if (old_value != value) {
		self->priv->_index = value;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_filter_properties[FONT_MANAGER_FONT_LIST_FILTER_INDEX_PROPERTY]);
	}
}

gint
font_manager_font_list_filter_get_size (FontManagerFontListFilter* self)
{
	FontManagerFontListFilterClass* _klass_;
	g_return_val_if_fail (self != NULL, 0);
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS (self);
	if (_klass_->get_size) {
		return _klass_->get_size (self);
	}
	return -1;
}

static gint
font_manager_font_list_filter_real_get_size (FontManagerFontListFilter* base)
{
	gint result;
	FontManagerFontListFilter* self;
	self = base;
	result = 0;
	return result;
}

gint
font_manager_font_list_filter_get_depth (FontManagerFontListFilter* self)
{
	FontManagerFontListFilterClass* _klass_;
	g_return_val_if_fail (self != NULL, 0);
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS (self);
	if (_klass_->get_depth) {
		return _klass_->get_depth (self);
	}
	return -1;
}

static gint
font_manager_font_list_filter_real_get_depth (FontManagerFontListFilter* base)
{
	gint result;
	FontManagerFontListFilter* self;
	self = base;
	result = self->priv->_depth;
	return result;
}

void
font_manager_font_list_filter_set_depth (FontManagerFontListFilter* self,
                                         gint value)
{
	FontManagerFontListFilterClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_GET_CLASS (self);
	if (_klass_->set_depth) {
		_klass_->set_depth (self, value);
	}
}

static void
font_manager_font_list_filter_real_set_depth (FontManagerFontListFilter* base,
                                              gint value)
{
	FontManagerFontListFilter* self;
	gint old_value;
	self = base;
	old_value = font_manager_font_list_filter_real_get_depth (base);
	if (old_value != value) {
		self->priv->_depth = value;
		g_object_notify_by_pspec ((GObject *) self, font_manager_font_list_filter_properties[FONT_MANAGER_FONT_LIST_FILTER_DEPTH_PROPERTY]);
	}
}

static void
font_manager_font_list_filter_class_init (FontManagerFontListFilterClass * klass,
                                          gpointer klass_data)
{
	font_manager_font_list_filter_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerFontListFilter_private_offset);
	((FontManagerFontListFilterClass *) klass)->update = (void (*) (FontManagerFontListFilter*, GAsyncReadyCallback, gpointer)) font_manager_font_list_filter_real_update;
	((FontManagerFontListFilterClass *) klass)->update_finish = (void (*) (FontManagerFontListFilter*, GAsyncResult*)) font_manager_font_list_filter_real_update_finish;
	((FontManagerFontListFilterClass *) klass)->matches = (gboolean (*) (FontManagerFontListFilter*, GObject*)) font_manager_font_list_filter_real_matches;
	FONT_MANAGER_FONT_LIST_FILTER_CLASS (klass)->get_name = (gchar* (*) (FontManagerFontListFilter*)) font_manager_font_list_filter_real_get_name;
	FONT_MANAGER_FONT_LIST_FILTER_CLASS (klass)->set_name = (void (*) (FontManagerFontListFilter*, const gchar*)) font_manager_font_list_filter_real_set_name;
	FONT_MANAGER_FONT_LIST_FILTER_CLASS (klass)->get_icon = (gchar* (*) (FontManagerFontListFilter*)) font_manager_font_list_filter_real_get_icon;
	FONT_MANAGER_FONT_LIST_FILTER_CLASS (klass)->set_icon = (void (*) (FontManagerFontListFilter*, const gchar*)) font_manager_font_list_filter_real_set_icon;
	FONT_MANAGER_FONT_LIST_FILTER_CLASS (klass)->get_comment = (gchar* (*) (FontManagerFontListFilter*)) font_manager_font_list_filter_real_get_comment;
	FONT_MANAGER_FONT_LIST_FILTER_CLASS (klass)->set_comment = (void (*) (FontManagerFontListFilter*, const gchar*)) font_manager_font_list_filter_real_set_comment;
	FONT_MANAGER_FONT_LIST_FILTER_CLASS (klass)->get_index = (gint (*) (FontManagerFontListFilter*)) font_manager_font_list_filter_real_get_index;
	FONT_MANAGER_FONT_LIST_FILTER_CLASS (klass)->set_index = (void (*) (FontManagerFontListFilter*, gint)) font_manager_font_list_filter_real_set_index;
	FONT_MANAGER_FONT_LIST_FILTER_CLASS (klass)->get_size = (gint (*) (FontManagerFontListFilter*)) font_manager_font_list_filter_real_get_size;
	FONT_MANAGER_FONT_LIST_FILTER_CLASS (klass)->get_depth = (gint (*) (FontManagerFontListFilter*)) font_manager_font_list_filter_real_get_depth;
	FONT_MANAGER_FONT_LIST_FILTER_CLASS (klass)->set_depth = (void (*) (FontManagerFontListFilter*, gint)) font_manager_font_list_filter_real_set_depth;
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_font_list_filter_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_font_list_filter_set_property;
	G_OBJECT_CLASS (klass)->finalize = font_manager_font_list_filter_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_FILTER_NAME_PROPERTY, font_manager_font_list_filter_properties[FONT_MANAGER_FONT_LIST_FILTER_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_FILTER_ICON_PROPERTY, font_manager_font_list_filter_properties[FONT_MANAGER_FONT_LIST_FILTER_ICON_PROPERTY] = g_param_spec_string ("icon", "icon", "icon", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_FILTER_COMMENT_PROPERTY, font_manager_font_list_filter_properties[FONT_MANAGER_FONT_LIST_FILTER_COMMENT_PROPERTY] = g_param_spec_string ("comment", "comment", "comment", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_FILTER_INDEX_PROPERTY, font_manager_font_list_filter_properties[FONT_MANAGER_FONT_LIST_FILTER_INDEX_PROPERTY] = g_param_spec_int ("index", "index", "index", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_FILTER_SIZE_PROPERTY, font_manager_font_list_filter_properties[FONT_MANAGER_FONT_LIST_FILTER_SIZE_PROPERTY] = g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_FILTER_DEPTH_PROPERTY, font_manager_font_list_filter_properties[FONT_MANAGER_FONT_LIST_FILTER_DEPTH_PROPERTY] = g_param_spec_int ("depth", "depth", "depth", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
font_manager_font_list_filter_instance_init (FontManagerFontListFilter * self,
                                             gpointer klass)
{
	self->priv = font_manager_font_list_filter_get_instance_private (self);
	self->priv->_index = 0;
	self->priv->_depth = 0;
}

static void
font_manager_font_list_filter_finalize (GObject * obj)
{
	FontManagerFontListFilter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_FONT_LIST_FILTER, FontManagerFontListFilter);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_icon);
	_g_free0 (self->priv->_comment);
	G_OBJECT_CLASS (font_manager_font_list_filter_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_font_list_filter_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerFontListFilterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_font_list_filter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerFontListFilter), 0, (GInstanceInitFunc) font_manager_font_list_filter_instance_init, NULL };
	GType font_manager_font_list_filter_type_id;
	font_manager_font_list_filter_type_id = g_type_register_static (FONT_MANAGER_TYPE_CACHEABLE, "FontManagerFontListFilter", &g_define_type_info, 0);
	FontManagerFontListFilter_private_offset = g_type_add_instance_private (font_manager_font_list_filter_type_id, sizeof (FontManagerFontListFilterPrivate));
	return font_manager_font_list_filter_type_id;
}

GType
font_manager_font_list_filter_get_type (void)
{
	static volatile gsize font_manager_font_list_filter_type_id__once = 0;
	if (g_once_init_enter (&font_manager_font_list_filter_type_id__once)) {
		GType font_manager_font_list_filter_type_id;
		font_manager_font_list_filter_type_id = font_manager_font_list_filter_get_type_once ();
		g_once_init_leave (&font_manager_font_list_filter_type_id__once, font_manager_font_list_filter_type_id);
	}
	return font_manager_font_list_filter_type_id__once;
}

static void
_vala_font_manager_font_list_filter_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	FontManagerFontListFilter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_FONT_LIST_FILTER, FontManagerFontListFilter);
	switch (property_id) {
		case FONT_MANAGER_FONT_LIST_FILTER_NAME_PROPERTY:
		g_value_take_string (value, font_manager_font_list_filter_get_name (self));
		break;
		case FONT_MANAGER_FONT_LIST_FILTER_ICON_PROPERTY:
		g_value_take_string (value, font_manager_font_list_filter_get_icon (self));
		break;
		case FONT_MANAGER_FONT_LIST_FILTER_COMMENT_PROPERTY:
		g_value_take_string (value, font_manager_font_list_filter_get_comment (self));
		break;
		case FONT_MANAGER_FONT_LIST_FILTER_INDEX_PROPERTY:
		g_value_set_int (value, font_manager_font_list_filter_get_index (self));
		break;
		case FONT_MANAGER_FONT_LIST_FILTER_SIZE_PROPERTY:
		g_value_set_int (value, font_manager_font_list_filter_get_size (self));
		break;
		case FONT_MANAGER_FONT_LIST_FILTER_DEPTH_PROPERTY:
		g_value_set_int (value, font_manager_font_list_filter_get_depth (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_font_list_filter_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	FontManagerFontListFilter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_FONT_LIST_FILTER, FontManagerFontListFilter);
	switch (property_id) {
		case FONT_MANAGER_FONT_LIST_FILTER_NAME_PROPERTY:
		font_manager_font_list_filter_set_name (self, g_value_get_string (value));
		break;
		case FONT_MANAGER_FONT_LIST_FILTER_ICON_PROPERTY:
		font_manager_font_list_filter_set_icon (self, g_value_get_string (value));
		break;
		case FONT_MANAGER_FONT_LIST_FILTER_COMMENT_PROPERTY:
		font_manager_font_list_filter_set_comment (self, g_value_get_string (value));
		break;
		case FONT_MANAGER_FONT_LIST_FILTER_INDEX_PROPERTY:
		font_manager_font_list_filter_set_index (self, g_value_get_int (value));
		break;
		case FONT_MANAGER_FONT_LIST_FILTER_DEPTH_PROPERTY:
		font_manager_font_list_filter_set_depth (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
font_manager_font_list_filter_model_get_instance_private (FontManagerFontListFilterModel* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerFontListFilterModel_private_offset);
}

static GType
font_manager_font_list_filter_model_real_get_item_type (GListModel* base)
{
	FontManagerFontListFilterModel * self;
	GType result;
	self = (FontManagerFontListFilterModel*) base;
	result = FONT_MANAGER_TYPE_FONT_LIST_FILTER;
	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_font_list_filter_model_real_get_n_items (GListModel* base)
{
	FontManagerFontListFilterModel * self;
	gint _tmp0_ = 0;
	GPtrArray* _tmp1_;
	guint result;
	self = (FontManagerFontListFilterModel*) base;
	_tmp1_ = self->priv->_items;
	if (_tmp1_ != NULL) {
		GPtrArray* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		_tmp2_ = self->priv->_items;
		_tmp3_ = vala_g_ptr_array_get_length (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = 0;
	}
	result = (guint) _tmp0_;
	return result;
}

static GObject*
font_manager_font_list_filter_model_real_get_item (GListModel* base,
                                                   guint position)
{
	FontManagerFontListFilterModel * self;
	GPtrArray* _tmp0_;
	gconstpointer _tmp1_;
	GPtrArray* _tmp2_;
	gconstpointer _tmp3_;
	GObject* _tmp4_;
	GObject* result;
	self = (FontManagerFontListFilterModel*) base;
	_tmp0_ = self->priv->_items;
	_tmp1_ = g_ptr_array_index (_tmp0_, position);
	g_return_val_if_fail (((FontManagerFontListFilter*) _tmp1_) != NULL, NULL);
	_tmp2_ = self->priv->_items;
	_tmp3_ = g_ptr_array_index (_tmp2_, position);
	_tmp4_ = _g_object_ref0 ((GObject*) ((FontManagerFontListFilter*) _tmp3_));
	result = _tmp4_;
	return result;
}

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

void
font_manager_font_list_filter_model_clear (FontManagerFontListFilterModel* self)
{
	guint n_items = 0U;
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	g_return_if_fail (self != NULL);
	n_items = g_list_model_get_n_items ((GListModel*) self);
	font_manager_font_list_filter_model_set_items (self, NULL);
	g_list_model_items_changed ((GListModel*) self, (guint) 0, n_items, (guint) 0);
	_tmp0_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_tmp1_ = _tmp0_;
	font_manager_font_list_filter_model_set_items (self, _tmp1_);
	_g_ptr_array_unref0 (_tmp1_);
	return;
}

static void
__lambda24_ (FontManagerFontListFilterModel* self)
{
	gint n_items = 0;
	GPtrArray* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	_tmp0_ = self->priv->_items;
	_tmp1_ = vala_g_ptr_array_get_length (_tmp0_);
	_tmp2_ = _tmp1_;
	n_items = (gint) _tmp2_;
	g_list_model_items_changed ((GListModel*) self, (guint) 0, (guint) n_items, (guint) n_items);
}

static void
___lambda24__font_manager_cacheable_changed (FontManagerCacheable* _sender,
                                             gpointer self)
{
	__lambda24_ ((FontManagerFontListFilterModel*) self);
}

static void
font_manager_font_list_filter_model_real_add_item (FontManagerFontListFilterModel* self,
                                                   FontManagerFontListFilter* item)
{
	GPtrArray* _tmp0_;
	FontManagerFontListFilter* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->_items;
	_tmp1_ = _g_object_ref0 (item);
	g_ptr_array_add (_tmp0_, _tmp1_);
	font_manager_font_list_filter_set_index (item, ((gint) g_list_model_get_n_items ((GListModel*) self)) - 1);
	_tmp2_ = font_manager_font_list_filter_get_index (item);
	_tmp3_ = _tmp2_;
	g_list_model_items_changed ((GListModel*) self, (guint) _tmp3_, (guint) 0, (guint) 1);
	g_signal_connect_object ((FontManagerCacheable*) item, "changed", (GCallback) ___lambda24__font_manager_cacheable_changed, self, 0);
	return;
}

void
font_manager_font_list_filter_model_add_item (FontManagerFontListFilterModel* self,
                                              FontManagerFontListFilter* item)
{
	FontManagerFontListFilterModelClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_MODEL_GET_CLASS (self);
	if (_klass_->add_item) {
		_klass_->add_item (self, item);
	}
}

static void
font_manager_font_list_filter_model_real_remove_item (FontManagerFontListFilterModel* self,
                                                      FontManagerFontListFilter* item)
{
	g_return_if_fail (item != NULL);
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GPtrArray* _tmp2_;
				gint _tmp3_;
				gint _tmp4_;
				GPtrArray* _tmp5_;
				gconstpointer _tmp6_;
				if (!_tmp0_) {
					guint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->priv->_items;
				_tmp3_ = vala_g_ptr_array_get_length (_tmp2_);
				_tmp4_ = _tmp3_;
				if (!(i < ((guint) _tmp4_))) {
					break;
				}
				_tmp5_ = self->priv->_items;
				_tmp6_ = g_ptr_array_index (_tmp5_, i);
				if (((FontManagerFontListFilter*) _tmp6_) == item) {
					GPtrArray* _tmp7_;
					_tmp7_ = self->priv->_items;
					if (g_ptr_array_remove (_tmp7_, item)) {
						g_list_model_items_changed ((GListModel*) self, i, (guint) 1, (guint) 0);
					}
				}
			}
		}
	}
	return;
}

void
font_manager_font_list_filter_model_remove_item (FontManagerFontListFilterModel* self,
                                                 FontManagerFontListFilter* item)
{
	FontManagerFontListFilterModelClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FONT_LIST_FILTER_MODEL_GET_CLASS (self);
	if (_klass_->remove_item) {
		_klass_->remove_item (self, item);
	}
}

FontManagerFontListFilterModel*
font_manager_font_list_filter_model_construct (GType object_type)
{
	FontManagerFontListFilterModel * self = NULL;
	self = (FontManagerFontListFilterModel*) g_object_new (object_type, NULL);
	return self;
}

FontManagerFontListFilterModel*
font_manager_font_list_filter_model_new (void)
{
	return font_manager_font_list_filter_model_construct (FONT_MANAGER_TYPE_FONT_LIST_FILTER_MODEL);
}

GPtrArray*
font_manager_font_list_filter_model_get_items (FontManagerFontListFilterModel* 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;
}

void
font_manager_font_list_filter_model_set_items (FontManagerFontListFilterModel* self,
                                               GPtrArray* value)
{
	GPtrArray* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_font_list_filter_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_font_list_filter_model_properties[FONT_MANAGER_FONT_LIST_FILTER_MODEL_ITEMS_PROPERTY]);
	}
}

static GObject *
font_manager_font_list_filter_model_constructor (GType type,
                                                 guint n_construct_properties,
                                                 GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FontManagerFontListFilterModel * self;
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	parent_class = G_OBJECT_CLASS (font_manager_font_list_filter_model_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_FONT_LIST_FILTER_MODEL, FontManagerFontListFilterModel);
	_tmp0_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
	_tmp1_ = _tmp0_;
	font_manager_font_list_filter_model_set_items (self, _tmp1_);
	_g_ptr_array_unref0 (_tmp1_);
	return obj;
}

static void
font_manager_font_list_filter_model_class_init (FontManagerFontListFilterModelClass * klass,
                                                gpointer klass_data)
{
	font_manager_font_list_filter_model_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerFontListFilterModel_private_offset);
	((FontManagerFontListFilterModelClass *) klass)->add_item = (void (*) (FontManagerFontListFilterModel*, FontManagerFontListFilter*)) font_manager_font_list_filter_model_real_add_item;
	((FontManagerFontListFilterModelClass *) klass)->remove_item = (void (*) (FontManagerFontListFilterModel*, FontManagerFontListFilter*)) font_manager_font_list_filter_model_real_remove_item;
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_font_list_filter_model_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_font_list_filter_model_set_property;
	G_OBJECT_CLASS (klass)->constructor = font_manager_font_list_filter_model_constructor;
	G_OBJECT_CLASS (klass)->finalize = font_manager_font_list_filter_model_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FONT_LIST_FILTER_MODEL_ITEMS_PROPERTY, font_manager_font_list_filter_model_properties[FONT_MANAGER_FONT_LIST_FILTER_MODEL_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_font_list_filter_model_g_list_model_interface_init (GListModelInterface * iface,
                                                                 gpointer iface_data)
{
	font_manager_font_list_filter_model_g_list_model_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_item_type = (GType (*) (GListModel*)) font_manager_font_list_filter_model_real_get_item_type;
	iface->get_n_items = (guint (*) (GListModel*)) font_manager_font_list_filter_model_real_get_n_items;
	iface->get_item = (GObject* (*) (GListModel*, guint)) font_manager_font_list_filter_model_real_get_item;
}

static void
font_manager_font_list_filter_model_instance_init (FontManagerFontListFilterModel * self,
                                                   gpointer klass)
{
	self->priv = font_manager_font_list_filter_model_get_instance_private (self);
	self->priv->_items = NULL;
}

static void
font_manager_font_list_filter_model_finalize (GObject * obj)
{
	FontManagerFontListFilterModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_FONT_LIST_FILTER_MODEL, FontManagerFontListFilterModel);
	_g_ptr_array_unref0 (self->priv->_items);
	G_OBJECT_CLASS (font_manager_font_list_filter_model_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_font_list_filter_model_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerFontListFilterModelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_font_list_filter_model_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerFontListFilterModel), 0, (GInstanceInitFunc) font_manager_font_list_filter_model_instance_init, NULL };
	static const GInterfaceInfo g_list_model_info = { (GInterfaceInitFunc) font_manager_font_list_filter_model_g_list_model_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType font_manager_font_list_filter_model_type_id;
	font_manager_font_list_filter_model_type_id = g_type_register_static (G_TYPE_OBJECT, "FontManagerFontListFilterModel", &g_define_type_info, 0);
	g_type_add_interface_static (font_manager_font_list_filter_model_type_id, g_list_model_get_type (), &g_list_model_info);
	FontManagerFontListFilterModel_private_offset = g_type_add_instance_private (font_manager_font_list_filter_model_type_id, sizeof (FontManagerFontListFilterModelPrivate));
	return font_manager_font_list_filter_model_type_id;
}

GType
font_manager_font_list_filter_model_get_type (void)
{
	static volatile gsize font_manager_font_list_filter_model_type_id__once = 0;
	if (g_once_init_enter (&font_manager_font_list_filter_model_type_id__once)) {
		GType font_manager_font_list_filter_model_type_id;
		font_manager_font_list_filter_model_type_id = font_manager_font_list_filter_model_get_type_once ();
		g_once_init_leave (&font_manager_font_list_filter_model_type_id__once, font_manager_font_list_filter_model_type_id);
	}
	return font_manager_font_list_filter_model_type_id__once;
}

static void
_vala_font_manager_font_list_filter_model_get_property (GObject * object,
                                                        guint property_id,
                                                        GValue * value,
                                                        GParamSpec * pspec)
{
	FontManagerFontListFilterModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_FONT_LIST_FILTER_MODEL, FontManagerFontListFilterModel);
	switch (property_id) {
		case FONT_MANAGER_FONT_LIST_FILTER_MODEL_ITEMS_PROPERTY:
		g_value_set_boxed (value, font_manager_font_list_filter_model_get_items (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_font_list_filter_model_set_property (GObject * object,
                                                        guint property_id,
                                                        const GValue * value,
                                                        GParamSpec * pspec)
{
	FontManagerFontListFilterModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_FONT_LIST_FILTER_MODEL, FontManagerFontListFilterModel);
	switch (property_id) {
		case FONT_MANAGER_FONT_LIST_FILTER_MODEL_ITEMS_PROPERTY:
		font_manager_font_list_filter_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_filter_list_view_get_instance_private (FontManagerFilterListView* self)
{
	return G_STRUCT_MEMBER_P (self, FontManagerFilterListView_private_offset);
}

static void
font_manager_filter_list_view_real_on_show_context_menu (FontManagerFilterListView* self,
                                                         gint n_press,
                                                         gdouble x,
                                                         gdouble y)
{
}

void
font_manager_filter_list_view_on_show_context_menu (FontManagerFilterListView* self,
                                                    gint n_press,
                                                    gdouble x,
                                                    gdouble y)
{
	FontManagerFilterListViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FILTER_LIST_VIEW_GET_CLASS (self);
	if (_klass_->on_show_context_menu) {
		_klass_->on_show_context_menu (self, n_press, x, y);
	}
}

static void
font_manager_filter_list_view_real_setup_list_row (FontManagerFilterListView* self,
                                                   GtkSignalListItemFactory* factory,
                                                   GObject* item)
{
	g_return_if_fail (factory != NULL);
	g_return_if_fail (item != NULL);
}

void
font_manager_filter_list_view_setup_list_row (FontManagerFilterListView* self,
                                              GtkSignalListItemFactory* factory,
                                              GObject* item)
{
	FontManagerFilterListViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FILTER_LIST_VIEW_GET_CLASS (self);
	if (_klass_->setup_list_row) {
		_klass_->setup_list_row (self, factory, item);
	}
}

static void
font_manager_filter_list_view_real_bind_list_row (FontManagerFilterListView* self,
                                                  GtkSignalListItemFactory* factory,
                                                  GObject* item)
{
	g_return_if_fail (factory != NULL);
	g_return_if_fail (item != NULL);
}

void
font_manager_filter_list_view_bind_list_row (FontManagerFilterListView* self,
                                             GtkSignalListItemFactory* factory,
                                             GObject* item)
{
	FontManagerFilterListViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FILTER_LIST_VIEW_GET_CLASS (self);
	if (_klass_->bind_list_row) {
		_klass_->bind_list_row (self, factory, item);
	}
}

static void
_font_manager_filter_list_view_setup_list_row_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                  GObject* object,
                                                                                  gpointer self)
{
	font_manager_filter_list_view_setup_list_row ((FontManagerFilterListView*) self, _sender, object);
}

static void
_font_manager_filter_list_view_bind_list_row_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                GObject* object,
                                                                                gpointer self)
{
	font_manager_filter_list_view_bind_list_row ((FontManagerFilterListView*) self, _sender, object);
}

static GtkSignalListItemFactory*
font_manager_filter_list_view_get_factory (FontManagerFilterListView* self)
{
	GtkSignalListItemFactory* factory = NULL;
	GtkSignalListItemFactory* _tmp0_;
	GtkSignalListItemFactory* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkSignalListItemFactory*) gtk_signal_list_item_factory_new ();
	factory = _tmp0_;
	g_signal_connect_object (factory, "setup", (GCallback) _font_manager_filter_list_view_setup_list_row_gtk_signal_list_item_factory_setup, self, 0);
	g_signal_connect_object (factory, "bind", (GCallback) _font_manager_filter_list_view_bind_list_row_gtk_signal_list_item_factory_bind, self, 0);
	result = factory;
	return result;
}

static void
font_manager_filter_list_view_real_collapse_all (FontManagerFilterListView* self)
{
	GtkTreeListModel* _tmp0_;
	guint n_items = 0U;
	GtkTreeListModel* _tmp1_;
	_tmp0_ = self->priv->_treemodel;
	_vala_return_if_fail (_tmp0_ != NULL, "treemodel != null");
	_tmp1_ = self->priv->_treemodel;
	n_items = g_list_model_get_n_items ((GListModel*) _tmp1_);
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				GtkTreeListRow* list_row = NULL;
				GtkTreeListModel* _tmp4_;
				GObject* _tmp5_;
				gboolean _tmp6_ = FALSE;
				GtkTreeListRow* _tmp7_;
				if (!_tmp2_) {
					guint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				if (!(i < n_items)) {
					break;
				}
				_tmp4_ = self->priv->_treemodel;
				_tmp5_ = g_list_model_get_item ((GListModel*) _tmp4_, i);
				list_row = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_tree_list_row_get_type (), GtkTreeListRow);
				_tmp7_ = list_row;
				if (_tmp7_ != NULL) {
					GtkTreeListRow* _tmp8_;
					gboolean _tmp9_;
					gboolean _tmp10_;
					_tmp8_ = list_row;
					_tmp9_ = gtk_tree_list_row_get_expanded (_tmp8_);
					_tmp10_ = _tmp9_;
					_tmp6_ = _tmp10_;
				} else {
					_tmp6_ = FALSE;
				}
				if (_tmp6_) {
					GtkTreeListRow* _tmp11_;
					_tmp11_ = list_row;
					gtk_tree_list_row_set_expanded (_tmp11_, FALSE);
				}
				_g_object_unref0 (list_row);
			}
		}
	}
	return;
}

void
font_manager_filter_list_view_collapse_all (FontManagerFilterListView* self)
{
	GtkTreeListModel* _tmp0_;
	GtkTreeListModel* _tmp1_;
	FontManagerFilterListViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_tmp0_ = font_manager_filter_list_view_get_treemodel (self);
	_tmp1_ = _tmp0_;
	_vala_return_if_fail (_tmp1_ != NULL, "treemodel != null");
	_klass_ = FONT_MANAGER_FILTER_LIST_VIEW_GET_CLASS (self);
	if (_klass_->collapse_all) {
		_klass_->collapse_all (self);
	}
}

static void
font_manager_filter_list_view_real_on_row_selected (FontManagerFilterListView* self,
                                                    GtkTreeListRow* row)
{
	FontManagerFontListFilter* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (row != NULL);
	_tmp0_ = self->priv->_selected_item;
	_tmp1_ = font_manager_font_list_filter_get_depth (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ > 0) {
		return;
	}
	font_manager_filter_list_view_collapse_all (self);
	g_object_get (row, "expandable", &_tmp3_, NULL);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		gtk_tree_list_row_set_expanded (row, TRUE);
	}
	return;
}

void
font_manager_filter_list_view_on_row_selected (FontManagerFilterListView* self,
                                               GtkTreeListRow* row)
{
	FontManagerFilterListViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = FONT_MANAGER_FILTER_LIST_VIEW_GET_CLASS (self);
	if (_klass_->on_row_selected) {
		_klass_->on_row_selected (self, row);
	}
}

static void
font_manager_filter_list_view_real_on_selection_changed (FontManagerFilterListView* self,
                                                         guint position,
                                                         guint n_items)
{
	GtkSingleSelection* _tmp0_;
	GtkTreeListModel* _tmp1_;
	GtkBitset* selections = NULL;
	GtkSingleSelection* _tmp2_;
	GtkBitset* _tmp3_;
	GtkBitset* _tmp4_;
	guint i = 0U;
	GtkBitset* _tmp5_;
	GtkTreeListRow* list_row = NULL;
	GtkTreeListModel* _tmp6_;
	GObject* _tmp7_;
	GObject* item = NULL;
	GtkTreeListRow* _tmp8_;
	GObject* _tmp9_;
	GObject* _tmp10_;
	GObject* _tmp11_;
	GtkTreeListRow* _tmp12_;
	GtkListView* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	FontManagerFontListFilter* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	_tmp0_ = self->priv->_selection;
	_tmp1_ = self->priv->_treemodel;
	_vala_return_if_fail ((_tmp0_ != NULL) && (_tmp1_ != NULL), "selection != null && treemodel != null");
	font_manager_filter_list_view_set_selected_item (self, NULL);
	font_manager_filter_list_view_set_selected_position (self, GTK_INVALID_LIST_POSITION);
	_tmp2_ = self->priv->_selection;
	_tmp3_ = gtk_selection_model_get_selection ((GtkSelectionModel*) _tmp2_);
	selections = _tmp3_;
	_tmp4_ = selections;
	if (gtk_bitset_get_size (_tmp4_) == ((guint64) 0)) {
		_gtk_bitset_unref0 (selections);
		return;
	}
	_tmp5_ = selections;
	i = gtk_bitset_get_minimum (_tmp5_);
	_tmp6_ = self->priv->_treemodel;
	_tmp7_ = g_list_model_get_item ((GListModel*) _tmp6_, i);
	list_row = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_tree_list_row_get_type (), GtkTreeListRow);
	_tmp8_ = list_row;
	_tmp9_ = gtk_tree_list_row_get_item (_tmp8_);
	item = _tmp9_;
	_tmp10_ = item;
	font_manager_filter_list_view_set_selected_item (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, FONT_MANAGER_TYPE_FONT_LIST_FILTER, FontManagerFontListFilter));
	font_manager_filter_list_view_set_selected_position (self, i);
	_tmp11_ = item;
	g_signal_emit (self, font_manager_filter_list_view_signals[FONT_MANAGER_FILTER_LIST_VIEW_SELECTION_CHANGED_SIGNAL], 0, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, FONT_MANAGER_TYPE_FONT_LIST_FILTER, FontManagerFontListFilter));
	_tmp12_ = list_row;
	font_manager_filter_list_view_on_row_selected (self, _tmp12_);
	_tmp13_ = self->listview;
	_tmp14_ = gtk_widget_get_name ((GtkWidget*) _tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = self->priv->_selected_item;
	_tmp17_ = font_manager_font_list_filter_get_name (_tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = _tmp18_;
	g_debug ("FontListFilter.vala:183: %s::selection_changed : %s", _tmp15_, _tmp19_);
	_g_free0 (_tmp19_);
	_g_object_unref0 (item);
	_g_object_unref0 (list_row);
	_gtk_bitset_unref0 (selections);
	return;
}

void
font_manager_filter_list_view_on_selection_changed (FontManagerFilterListView* self,
                                                    guint position,
                                                    guint n_items)
{
	GtkSingleSelection* _tmp0_;
	GtkSingleSelection* _tmp1_;
	GtkTreeListModel* _tmp2_;
	GtkTreeListModel* _tmp3_;
	FontManagerFilterListViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_tmp0_ = font_manager_filter_list_view_get_selection (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = font_manager_filter_list_view_get_treemodel (self);
	_tmp3_ = _tmp2_;
	_vala_return_if_fail ((_tmp1_ != NULL) && (_tmp3_ != NULL), "selection != null && treemodel != null");
	_klass_ = FONT_MANAGER_FILTER_LIST_VIEW_GET_CLASS (self);
	if (_klass_->on_selection_changed) {
		_klass_->on_selection_changed (self, position, n_items);
	}
}

FontManagerFilterListView*
font_manager_filter_list_view_construct (GType object_type)
{
	FontManagerFilterListView * self = NULL;
	self = (FontManagerFilterListView*) g_object_new (object_type, NULL);
	return self;
}

FontManagerFilterListView*
font_manager_filter_list_view_new (void)
{
	return font_manager_filter_list_view_construct (FONT_MANAGER_TYPE_FILTER_LIST_VIEW);
}

guint
font_manager_filter_list_view_get_selected_position (FontManagerFilterListView* self)
{
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_selected_position;
	return result;
}

void
font_manager_filter_list_view_set_selected_position (FontManagerFilterListView* self,
                                                     guint value)
{
	guint old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_filter_list_view_get_selected_position (self);
	if (old_value != value) {
		self->priv->_selected_position = value;
		g_object_notify_by_pspec ((GObject *) self, font_manager_filter_list_view_properties[FONT_MANAGER_FILTER_LIST_VIEW_SELECTED_POSITION_PROPERTY]);
	}
}

FontManagerFontListFilter*
font_manager_filter_list_view_get_selected_item (FontManagerFilterListView* self)
{
	FontManagerFontListFilter* result;
	FontManagerFontListFilter* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selected_item;
	result = _tmp0_;
	return result;
}

void
font_manager_filter_list_view_set_selected_item (FontManagerFilterListView* self,
                                                 FontManagerFontListFilter* value)
{
	FontManagerFontListFilter* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_filter_list_view_get_selected_item (self);
	if (old_value != value) {
		FontManagerFontListFilter* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_selected_item);
		self->priv->_selected_item = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_filter_list_view_properties[FONT_MANAGER_FILTER_LIST_VIEW_SELECTED_ITEM_PROPERTY]);
	}
}

GtkTreeListModel*
font_manager_filter_list_view_get_treemodel (FontManagerFilterListView* self)
{
	GtkTreeListModel* result;
	GtkTreeListModel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_treemodel;
	result = _tmp0_;
	return result;
}

void
font_manager_filter_list_view_set_treemodel (FontManagerFilterListView* self,
                                             GtkTreeListModel* value)
{
	GtkTreeListModel* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_filter_list_view_get_treemodel (self);
	if (old_value != value) {
		GtkTreeListModel* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_treemodel);
		self->priv->_treemodel = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_filter_list_view_properties[FONT_MANAGER_FILTER_LIST_VIEW_TREEMODEL_PROPERTY]);
	}
}

GtkSingleSelection*
font_manager_filter_list_view_get_selection (FontManagerFilterListView* self)
{
	GtkSingleSelection* result;
	GtkSingleSelection* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selection;
	result = _tmp0_;
	return result;
}

void
font_manager_filter_list_view_set_selection (FontManagerFilterListView* self,
                                             GtkSingleSelection* value)
{
	GtkSingleSelection* old_value;
	g_return_if_fail (self != NULL);
	old_value = font_manager_filter_list_view_get_selection (self);
	if (old_value != value) {
		GtkSingleSelection* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_selection);
		self->priv->_selection = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, font_manager_filter_list_view_properties[FONT_MANAGER_FILTER_LIST_VIEW_SELECTION_PROPERTY]);
	}
}

FontManagerFontListFilterModel*
font_manager_filter_list_view_get_model (FontManagerFilterListView* self)
{
	FontManagerFontListFilterModel* result;
	FontManagerFontListFilterModel* _tmp0_ = NULL;
	GtkTreeListModel* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->_treemodel;
	if (_tmp1_ != NULL) {
		GtkTreeListModel* _tmp2_;
		GListModel* _tmp3_;
		GListModel* _tmp4_;
		_tmp2_ = self->priv->_treemodel;
		_tmp3_ = gtk_tree_list_model_get_model (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, FONT_MANAGER_TYPE_FONT_LIST_FILTER_MODEL, FontManagerFontListFilterModel);
	} else {
		_tmp0_ = NULL;
	}
	result = _tmp0_;
	return result;
}

static void
_font_manager_filter_list_view_on_show_context_menu_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                               gint n_press,
                                                                               gdouble x,
                                                                               gdouble y,
                                                                               gpointer self)
{
	font_manager_filter_list_view_on_show_context_menu ((FontManagerFilterListView*) self, n_press, x, y);
}

static void
_font_manager_filter_list_view_on_selection_changed_gtk_selection_model_selection_changed (GtkSelectionModel* _sender,
                                                                                           guint position,
                                                                                           guint n_items,
                                                                                           gpointer self)
{
	font_manager_filter_list_view_on_selection_changed ((FontManagerFilterListView*) self, position, n_items);
}

static void
_font_manager_filter_list_view___lambda25_ (FontManagerFilterListView* self,
                                            GParamSpec* pspec)
{
	GtkListView* _tmp0_;
	GtkSingleSelection* _tmp1_;
	GtkListView* _tmp2_;
	GtkSignalListItemFactory* _tmp3_;
	GtkSignalListItemFactory* _tmp4_;
	GtkSingleSelection* _tmp5_;
	GtkSingleSelection* _tmp6_;
	GtkSingleSelection* _tmp7_;
	GtkSingleSelection* _tmp8_;
	GBindingFlags flags = 0U;
	g_return_if_fail (pspec != NULL);
	_tmp0_ = self->listview;
	_tmp1_ = self->priv->_selection;
	gtk_list_view_set_model (_tmp0_, (GtkSelectionModel*) _tmp1_);
	_tmp2_ = self->listview;
	_tmp3_ = font_manager_filter_list_view_get_factory (self);
	_tmp4_ = _tmp3_;
	gtk_list_view_set_factory (_tmp2_, (GtkListItemFactory*) _tmp4_);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = self->priv->_selection;
	if (_tmp5_ == NULL) {
		return;
	}
	_tmp6_ = self->priv->_selection;
	gtk_single_selection_set_autoselect (_tmp6_, FALSE);
	_tmp7_ = self->priv->_selection;
	gtk_single_selection_set_can_unselect (_tmp7_, TRUE);
	_tmp8_ = self->priv->_selection;
	g_signal_connect_object ((GtkSelectionModel*) _tmp8_, "selection-changed", (GCallback) _font_manager_filter_list_view_on_selection_changed_gtk_selection_model_selection_changed, self, 0);
	flags = G_BINDING_SYNC_CREATE;
}

static void
__font_manager_filter_list_view___lambda25__g_object_notify (GObject* _sender,
                                                             GParamSpec* pspec,
                                                             gpointer self)
{
	_font_manager_filter_list_view___lambda25_ ((FontManagerFilterListView*) self, pspec);
}

static GObject *
font_manager_filter_list_view_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FontManagerFilterListView * self;
	GtkGesture* right_click = NULL;
	GtkGestureClick* _tmp0_ = NULL;
	GtkGesture* _tmp1_;
	GtkListView* _tmp2_;
	GtkGesture* _tmp3_;
	GtkEventController* _tmp4_;
	parent_class = G_OBJECT_CLASS (font_manager_filter_list_view_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_FILTER_LIST_VIEW, FontManagerFilterListView);
	_tmp0_ = (GtkGestureClick*) gtk_gesture_click_new ();
	gtk_gesture_single_set_button ((GtkGestureSingle*) _tmp0_, (guint) GDK_BUTTON_SECONDARY);
	right_click = (GtkGesture*) _tmp0_;
	_tmp1_ = right_click;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_gesture_click_get_type (), GtkGestureClick), "pressed", (GCallback) _font_manager_filter_list_view_on_show_context_menu_gtk_gesture_click_pressed, self, 0);
	_tmp2_ = self->listview;
	_tmp3_ = right_click;
	_tmp4_ = _g_object_ref0 ((GtkEventController*) _tmp3_);
	gtk_widget_add_controller ((GtkWidget*) _tmp2_, _tmp4_);
	g_signal_connect_object ((GObject*) self, "notify::selection", (GCallback) __font_manager_filter_list_view___lambda25__g_object_notify, self, G_CONNECT_AFTER);
	_g_object_unref0 (right_click);
	return obj;
}

static void
font_manager_filter_list_view_class_init (FontManagerFilterListViewClass * klass,
                                          gpointer klass_data)
{
	font_manager_filter_list_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FontManagerFilterListView_private_offset);
	((FontManagerFilterListViewClass *) klass)->on_show_context_menu = (void (*) (FontManagerFilterListView*, gint, gdouble, gdouble)) font_manager_filter_list_view_real_on_show_context_menu;
	((FontManagerFilterListViewClass *) klass)->setup_list_row = (void (*) (FontManagerFilterListView*, GtkSignalListItemFactory*, GObject*)) font_manager_filter_list_view_real_setup_list_row;
	((FontManagerFilterListViewClass *) klass)->bind_list_row = (void (*) (FontManagerFilterListView*, GtkSignalListItemFactory*, GObject*)) font_manager_filter_list_view_real_bind_list_row;
	((FontManagerFilterListViewClass *) klass)->collapse_all = (void (*) (FontManagerFilterListView*)) font_manager_filter_list_view_real_collapse_all;
	((FontManagerFilterListViewClass *) klass)->on_row_selected = (void (*) (FontManagerFilterListView*, GtkTreeListRow*)) font_manager_filter_list_view_real_on_row_selected;
	((FontManagerFilterListViewClass *) klass)->on_selection_changed = (void (*) (FontManagerFilterListView*, guint, guint)) font_manager_filter_list_view_real_on_selection_changed;
	G_OBJECT_CLASS (klass)->get_property = _vala_font_manager_filter_list_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_font_manager_filter_list_view_set_property;
	G_OBJECT_CLASS (klass)->constructor = font_manager_filter_list_view_constructor;
	G_OBJECT_CLASS (klass)->finalize = font_manager_filter_list_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FILTER_LIST_VIEW_SELECTED_POSITION_PROPERTY, font_manager_filter_list_view_properties[FONT_MANAGER_FILTER_LIST_VIEW_SELECTED_POSITION_PROPERTY] = g_param_spec_uint ("selected-position", "selected-position", "selected-position", 0, G_MAXUINT, (guint) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FILTER_LIST_VIEW_SELECTED_ITEM_PROPERTY, font_manager_filter_list_view_properties[FONT_MANAGER_FILTER_LIST_VIEW_SELECTED_ITEM_PROPERTY] = g_param_spec_object ("selected-item", "selected-item", "selected-item", FONT_MANAGER_TYPE_FONT_LIST_FILTER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FILTER_LIST_VIEW_TREEMODEL_PROPERTY, font_manager_filter_list_view_properties[FONT_MANAGER_FILTER_LIST_VIEW_TREEMODEL_PROPERTY] = g_param_spec_object ("treemodel", "treemodel", "treemodel", gtk_tree_list_model_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FILTER_LIST_VIEW_SELECTION_PROPERTY, font_manager_filter_list_view_properties[FONT_MANAGER_FILTER_LIST_VIEW_SELECTION_PROPERTY] = g_param_spec_object ("selection", "selection", "selection", gtk_single_selection_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FONT_MANAGER_FILTER_LIST_VIEW_MODEL_PROPERTY, font_manager_filter_list_view_properties[FONT_MANAGER_FILTER_LIST_VIEW_MODEL_PROPERTY] = g_param_spec_object ("model", "model", "model", FONT_MANAGER_TYPE_FONT_LIST_FILTER_MODEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/github/FontManager/FontManager/ui/font-manager-filter-list-view.ui");
	font_manager_filter_list_view_signals[FONT_MANAGER_FILTER_LIST_VIEW_SELECTION_CHANGED_SIGNAL] = g_signal_new ("selection-changed", FONT_MANAGER_TYPE_FILTER_LIST_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, FONT_MANAGER_TYPE_FONT_LIST_FILTER);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "listview", FALSE, G_STRUCT_OFFSET (FontManagerFilterListView, listview));
}

static void
font_manager_filter_list_view_instance_init (FontManagerFilterListView * self,
                                             gpointer klass)
{
	self->priv = font_manager_filter_list_view_get_instance_private (self);
	self->priv->_selected_position = (guint) 0;
	self->priv->_selected_item = NULL;
	self->priv->_treemodel = NULL;
	self->priv->_selection = NULL;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
font_manager_filter_list_view_finalize (GObject * obj)
{
	FontManagerFilterListView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FONT_MANAGER_TYPE_FILTER_LIST_VIEW, FontManagerFilterListView);
	_g_object_unref0 (self->priv->_selected_item);
	_g_object_unref0 (self->priv->_treemodel);
	_g_object_unref0 (self->priv->_selection);
	G_OBJECT_CLASS (font_manager_filter_list_view_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
font_manager_filter_list_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FontManagerFilterListViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) font_manager_filter_list_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FontManagerFilterListView), 0, (GInstanceInitFunc) font_manager_filter_list_view_instance_init, NULL };
	GType font_manager_filter_list_view_type_id;
	font_manager_filter_list_view_type_id = g_type_register_static (gtk_box_get_type (), "FontManagerFilterListView", &g_define_type_info, 0);
	FontManagerFilterListView_private_offset = g_type_add_instance_private (font_manager_filter_list_view_type_id, sizeof (FontManagerFilterListViewPrivate));
	return font_manager_filter_list_view_type_id;
}

GType
font_manager_filter_list_view_get_type (void)
{
	static volatile gsize font_manager_filter_list_view_type_id__once = 0;
	if (g_once_init_enter (&font_manager_filter_list_view_type_id__once)) {
		GType font_manager_filter_list_view_type_id;
		font_manager_filter_list_view_type_id = font_manager_filter_list_view_get_type_once ();
		g_once_init_leave (&font_manager_filter_list_view_type_id__once, font_manager_filter_list_view_type_id);
	}
	return font_manager_filter_list_view_type_id__once;
}

static void
_vala_font_manager_filter_list_view_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	FontManagerFilterListView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_FILTER_LIST_VIEW, FontManagerFilterListView);
	switch (property_id) {
		case FONT_MANAGER_FILTER_LIST_VIEW_SELECTED_POSITION_PROPERTY:
		g_value_set_uint (value, font_manager_filter_list_view_get_selected_position (self));
		break;
		case FONT_MANAGER_FILTER_LIST_VIEW_SELECTED_ITEM_PROPERTY:
		g_value_set_object (value, font_manager_filter_list_view_get_selected_item (self));
		break;
		case FONT_MANAGER_FILTER_LIST_VIEW_TREEMODEL_PROPERTY:
		g_value_set_object (value, font_manager_filter_list_view_get_treemodel (self));
		break;
		case FONT_MANAGER_FILTER_LIST_VIEW_SELECTION_PROPERTY:
		g_value_set_object (value, font_manager_filter_list_view_get_selection (self));
		break;
		case FONT_MANAGER_FILTER_LIST_VIEW_MODEL_PROPERTY:
		g_value_set_object (value, font_manager_filter_list_view_get_model (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_font_manager_filter_list_view_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	FontManagerFilterListView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FONT_MANAGER_TYPE_FILTER_LIST_VIEW, FontManagerFilterListView);
	switch (property_id) {
		case FONT_MANAGER_FILTER_LIST_VIEW_SELECTED_POSITION_PROPERTY:
		font_manager_filter_list_view_set_selected_position (self, g_value_get_uint (value));
		break;
		case FONT_MANAGER_FILTER_LIST_VIEW_SELECTED_ITEM_PROPERTY:
		font_manager_filter_list_view_set_selected_item (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_FILTER_LIST_VIEW_TREEMODEL_PROPERTY:
		font_manager_filter_list_view_set_treemodel (self, g_value_get_object (value));
		break;
		case FONT_MANAGER_FILTER_LIST_VIEW_SELECTION_PROPERTY:
		font_manager_filter_list_view_set_selection (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;
}

