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

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */

#include <glib-object.h>
#include <gee.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
#include <gdk/gdk.h>

#define RESOURCES_ICON_ONE_FACE "avatar-default-symbolic"
#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 SIDEBAR_TYPE_BRANCH (sidebar_branch_get_type ())
#define SIDEBAR_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_BRANCH, SidebarBranch))
#define SIDEBAR_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_BRANCH, SidebarBranchClass))
#define SIDEBAR_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_BRANCH))
#define SIDEBAR_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_BRANCH))
#define SIDEBAR_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_BRANCH, SidebarBranchClass))

typedef struct _SidebarBranch SidebarBranch;
typedef struct _SidebarBranchClass SidebarBranchClass;
typedef struct _SidebarBranchPrivate SidebarBranchPrivate;

#define FACES_TYPE_BRANCH (faces_branch_get_type ())
#define FACES_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FACES_TYPE_BRANCH, FacesBranch))
#define FACES_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FACES_TYPE_BRANCH, FacesBranchClass))
#define FACES_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FACES_TYPE_BRANCH))
#define FACES_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FACES_TYPE_BRANCH))
#define FACES_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FACES_TYPE_BRANCH, FacesBranchClass))

typedef struct _FacesBranch FacesBranch;
typedef struct _FacesBranchClass FacesBranchClass;
typedef struct _FacesBranchPrivate FacesBranchPrivate;

#define TYPE_DATA_OBJECT (data_object_get_type ())
#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject))
#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass))
#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT))
#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT))
#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass))

typedef struct _DataObject DataObject;
typedef struct _DataObjectClass DataObjectClass;

#define TYPE_DATA_SOURCE (data_source_get_type ())
#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource))
#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass))
#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE))
#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE))
#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass))

typedef struct _DataSource DataSource;
typedef struct _DataSourceClass DataSourceClass;

#define TYPE_FACE (face_get_type ())
#define FACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FACE, Face))
#define FACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FACE, FaceClass))
#define IS_FACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FACE))
#define IS_FACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FACE))
#define FACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FACE, FaceClass))

typedef struct _Face Face;
typedef struct _FaceClass FaceClass;

#define SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY (sidebar_simple_page_entry_get_type ())
#define SIDEBAR_SIMPLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry))
#define SIDEBAR_SIMPLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntryClass))
#define SIDEBAR_IS_SIMPLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY))
#define SIDEBAR_IS_SIMPLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY))
#define SIDEBAR_SIMPLE_PAGE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntryClass))

typedef struct _SidebarSimplePageEntry SidebarSimplePageEntry;
typedef struct _SidebarSimplePageEntryClass SidebarSimplePageEntryClass;

#define FACES_TYPE_SIDEBAR_ENTRY (faces_sidebar_entry_get_type ())
#define FACES_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FACES_TYPE_SIDEBAR_ENTRY, FacesSidebarEntry))
#define FACES_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FACES_TYPE_SIDEBAR_ENTRY, FacesSidebarEntryClass))
#define FACES_IS_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FACES_TYPE_SIDEBAR_ENTRY))
#define FACES_IS_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FACES_TYPE_SIDEBAR_ENTRY))
#define FACES_SIDEBAR_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FACES_TYPE_SIDEBAR_ENTRY, FacesSidebarEntryClass))

typedef struct _FacesSidebarEntry FacesSidebarEntry;
typedef struct _FacesSidebarEntryClass FacesSidebarEntryClass;
enum  {
	FACES_BRANCH_0_PROPERTY,
	FACES_BRANCH_NUM_PROPERTIES
};
static GParamSpec* faces_branch_properties[FACES_BRANCH_NUM_PROPERTIES];

#define TYPE_DATA_COLLECTION (data_collection_get_type ())
#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection))
#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass))
#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION))
#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION))
#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass))

typedef struct _DataCollection DataCollection;
typedef struct _DataCollectionClass DataCollectionClass;

#define TYPE_SOURCE_COLLECTION (source_collection_get_type ())
#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection))
#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass))
#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION))
#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION))
#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass))

typedef struct _SourceCollection SourceCollection;
typedef struct _SourceCollectionClass SourceCollectionClass;

#define TYPE_DATABASE_SOURCE_COLLECTION (database_source_collection_get_type ())
#define DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection))
#define DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass))
#define IS_DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_COLLECTION))
#define IS_DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_COLLECTION))
#define DATABASE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass))

typedef struct _DatabaseSourceCollection DatabaseSourceCollection;
typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass;

#define TYPE_CONTAINER_SOURCE_COLLECTION (container_source_collection_get_type ())
#define CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection))
#define CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass))
#define IS_CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTAINER_SOURCE_COLLECTION))
#define IS_CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONTAINER_SOURCE_COLLECTION))
#define CONTAINER_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass))

typedef struct _ContainerSourceCollection ContainerSourceCollection;
typedef struct _ContainerSourceCollectionClass ContainerSourceCollectionClass;

#define TYPE_FACE_SOURCE_COLLECTION (face_source_collection_get_type ())
#define FACE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FACE_SOURCE_COLLECTION, FaceSourceCollection))
#define FACE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FACE_SOURCE_COLLECTION, FaceSourceCollectionClass))
#define IS_FACE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FACE_SOURCE_COLLECTION))
#define IS_FACE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FACE_SOURCE_COLLECTION))
#define FACE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FACE_SOURCE_COLLECTION, FaceSourceCollectionClass))

typedef struct _FaceSourceCollection FaceSourceCollection;
typedef struct _FaceSourceCollectionClass FaceSourceCollectionClass;

#define TYPE_ALTERATION (alteration_get_type ())
#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration))
#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass))
#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION))
#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION))
#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass))

typedef struct _Alteration Alteration;
typedef struct _AlterationClass AlterationClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define SIDEBAR_TYPE_GROUPING (sidebar_grouping_get_type ())
#define SIDEBAR_GROUPING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_GROUPING, SidebarGrouping))
#define SIDEBAR_GROUPING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_GROUPING, SidebarGroupingClass))
#define SIDEBAR_IS_GROUPING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_GROUPING))
#define SIDEBAR_IS_GROUPING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_GROUPING))
#define SIDEBAR_GROUPING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_GROUPING, SidebarGroupingClass))

typedef struct _SidebarGrouping SidebarGrouping;
typedef struct _SidebarGroupingClass SidebarGroupingClass;

#define SIDEBAR_TYPE_HEADER (sidebar_header_get_type ())
#define SIDEBAR_HEADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_HEADER, SidebarHeader))
#define SIDEBAR_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_HEADER, SidebarHeaderClass))
#define SIDEBAR_IS_HEADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_HEADER))
#define SIDEBAR_IS_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_HEADER))
#define SIDEBAR_HEADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_HEADER, SidebarHeaderClass))

typedef struct _SidebarHeader SidebarHeader;
typedef struct _SidebarHeaderClass SidebarHeaderClass;

#define FACES_TYPE_GROUPING (faces_grouping_get_type ())
#define FACES_GROUPING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FACES_TYPE_GROUPING, FacesGrouping))
#define FACES_GROUPING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FACES_TYPE_GROUPING, FacesGroupingClass))
#define FACES_IS_GROUPING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FACES_TYPE_GROUPING))
#define FACES_IS_GROUPING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FACES_TYPE_GROUPING))
#define FACES_GROUPING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FACES_TYPE_GROUPING, FacesGroupingClass))

typedef struct _FacesGrouping FacesGrouping;
typedef struct _FacesGroupingClass FacesGroupingClass;

#define SIDEBAR_TYPE_ENTRY (sidebar_entry_get_type ())
#define SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_ENTRY, SidebarEntry))
#define SIDEBAR_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_ENTRY))
#define SIDEBAR_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_ENTRY, SidebarEntryIface))

typedef struct _SidebarEntry SidebarEntry;
typedef struct _SidebarEntryIface SidebarEntryIface;

#define SIDEBAR_TYPE_TREE (sidebar_tree_get_type ())
#define SIDEBAR_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_TREE, SidebarTree))
#define SIDEBAR_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_TREE, SidebarTreeClass))
#define SIDEBAR_IS_TREE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_TREE))
#define SIDEBAR_IS_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_TREE))
#define SIDEBAR_TREE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_TREE, SidebarTreeClass))

typedef struct _SidebarTree SidebarTree;
typedef struct _SidebarTreeClass SidebarTreeClass;
typedef enum  {
	SIDEBAR_BRANCH_OPTIONS_NONE = 0,
	SIDEBAR_BRANCH_OPTIONS_HIDE_IF_EMPTY = 1 << 0,
	SIDEBAR_BRANCH_OPTIONS_AUTO_OPEN_ON_NEW_CHILD = 1 << 1,
	SIDEBAR_BRANCH_OPTIONS_STARTUP_EXPAND_TO_FIRST_CHILD = 1 << 2,
	SIDEBAR_BRANCH_OPTIONS_STARTUP_OPEN_GROUPING = 1 << 3
} SidebarBranchOptions;

#define SIDEBAR_BRANCH_TYPE_OPTIONS (sidebar_branch_options_get_type ())
#define _alteration_unref0(var) ((var == NULL) ? NULL : (var = (alteration_unref (var), NULL)))

#define SIDEBAR_TYPE_RENAMEABLE_ENTRY (sidebar_renameable_entry_get_type ())
#define SIDEBAR_RENAMEABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY, SidebarRenameableEntry))
#define SIDEBAR_IS_RENAMEABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY))
#define SIDEBAR_RENAMEABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY, SidebarRenameableEntryIface))

typedef struct _SidebarRenameableEntry SidebarRenameableEntry;
typedef struct _SidebarRenameableEntryIface SidebarRenameableEntryIface;
#define _g_free0(var) (var = (g_free (var), NULL))

#define SIDEBAR_TYPE_EXPANDABLE_ENTRY (sidebar_expandable_entry_get_type ())
#define SIDEBAR_EXPANDABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY, SidebarExpandableEntry))
#define SIDEBAR_IS_EXPANDABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY))
#define SIDEBAR_EXPANDABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY, SidebarExpandableEntryIface))

typedef struct _SidebarExpandableEntry SidebarExpandableEntry;
typedef struct _SidebarExpandableEntryIface SidebarExpandableEntryIface;
typedef struct _SidebarGroupingPrivate SidebarGroupingPrivate;

#define SIDEBAR_TYPE_EMPHASIZABLE_ENTRY (sidebar_emphasizable_entry_get_type ())
#define SIDEBAR_EMPHASIZABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY, SidebarEmphasizableEntry))
#define SIDEBAR_IS_EMPHASIZABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY))
#define SIDEBAR_EMPHASIZABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY, SidebarEmphasizableEntryIface))

typedef struct _SidebarEmphasizableEntry SidebarEmphasizableEntry;
typedef struct _SidebarEmphasizableEntryIface SidebarEmphasizableEntryIface;
typedef struct _SidebarHeaderPrivate SidebarHeaderPrivate;
typedef struct _FacesGroupingPrivate FacesGroupingPrivate;
enum  {
	FACES_GROUPING_0_PROPERTY,
	FACES_GROUPING_NUM_PROPERTIES
};
static GParamSpec* faces_grouping_properties[FACES_GROUPING_NUM_PROPERTIES];

#define SIDEBAR_TYPE_SELECTABLE_ENTRY (sidebar_selectable_entry_get_type ())
#define SIDEBAR_SELECTABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY, SidebarSelectableEntry))
#define SIDEBAR_IS_SELECTABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY))
#define SIDEBAR_SELECTABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY, SidebarSelectableEntryIface))

typedef struct _SidebarSelectableEntry SidebarSelectableEntry;
typedef struct _SidebarSelectableEntryIface SidebarSelectableEntryIface;

#define SIDEBAR_TYPE_PAGE_REPRESENTATIVE (sidebar_page_representative_get_type ())
#define SIDEBAR_PAGE_REPRESENTATIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE, SidebarPageRepresentative))
#define SIDEBAR_IS_PAGE_REPRESENTATIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE))
#define SIDEBAR_PAGE_REPRESENTATIVE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE, SidebarPageRepresentativeIface))

typedef struct _SidebarPageRepresentative SidebarPageRepresentative;
typedef struct _SidebarPageRepresentativeIface SidebarPageRepresentativeIface;

#define TYPE_PAGE (page_get_type ())
#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page))
#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass))
#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE))
#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE))
#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass))

typedef struct _Page Page;
typedef struct _PageClass PageClass;

#define SIDEBAR_TYPE_CONTEXTABLE (sidebar_contextable_get_type ())
#define SIDEBAR_CONTEXTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_CONTEXTABLE, SidebarContextable))
#define SIDEBAR_IS_CONTEXTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_CONTEXTABLE))
#define SIDEBAR_CONTEXTABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_CONTEXTABLE, SidebarContextableIface))

typedef struct _SidebarContextable SidebarContextable;
typedef struct _SidebarContextableIface SidebarContextableIface;
typedef struct _SidebarSimplePageEntryPrivate SidebarSimplePageEntryPrivate;

#define SIDEBAR_TYPE_DESTROYABLE_ENTRY (sidebar_destroyable_entry_get_type ())
#define SIDEBAR_DESTROYABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_DESTROYABLE_ENTRY, SidebarDestroyableEntry))
#define SIDEBAR_IS_DESTROYABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_DESTROYABLE_ENTRY))
#define SIDEBAR_DESTROYABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_DESTROYABLE_ENTRY, SidebarDestroyableEntryIface))

typedef struct _SidebarDestroyableEntry SidebarDestroyableEntry;
typedef struct _SidebarDestroyableEntryIface SidebarDestroyableEntryIface;
typedef struct _FacesSidebarEntryPrivate FacesSidebarEntryPrivate;
enum  {
	FACES_SIDEBAR_ENTRY_0_PROPERTY,
	FACES_SIDEBAR_ENTRY_NUM_PROPERTIES
};
static GParamSpec* faces_sidebar_entry_properties[FACES_SIDEBAR_ENTRY_NUM_PROPERTIES];

#define TYPE_CHECKERBOARD_PAGE (checkerboard_page_get_type ())
#define CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPage))
#define CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass))
#define IS_CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_PAGE))
#define IS_CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_PAGE))
#define CHECKERBOARD_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass))

typedef struct _CheckerboardPage CheckerboardPage;
typedef struct _CheckerboardPageClass CheckerboardPageClass;

#define TYPE_MEDIA_PAGE (media_page_get_type ())
#define MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_PAGE, MediaPage))
#define MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_PAGE, MediaPageClass))
#define IS_MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_PAGE))
#define IS_MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_PAGE))
#define MEDIA_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_PAGE, MediaPageClass))

typedef struct _MediaPage MediaPage;
typedef struct _MediaPageClass MediaPageClass;

#define TYPE_COLLECTION_PAGE (collection_page_get_type ())
#define COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_PAGE, CollectionPage))
#define COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_PAGE, CollectionPageClass))
#define IS_COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_PAGE))
#define IS_COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_PAGE))
#define COLLECTION_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_PAGE, CollectionPageClass))

typedef struct _CollectionPage CollectionPage;
typedef struct _CollectionPageClass CollectionPageClass;

#define TYPE_FACE_PAGE (face_page_get_type ())
#define FACE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FACE_PAGE, FacePage))
#define FACE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FACE_PAGE, FacePageClass))
#define IS_FACE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FACE_PAGE))
#define IS_FACE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FACE_PAGE))
#define FACE_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FACE_PAGE, FacePageClass))

typedef struct _FacePage FacePage;
typedef struct _FacePageClass FacePageClass;

#define TYPE_COMMAND_MANAGER (command_manager_get_type ())
#define COMMAND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND_MANAGER, CommandManager))
#define COMMAND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMMAND_MANAGER, CommandManagerClass))
#define IS_COMMAND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND_MANAGER))
#define IS_COMMAND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMMAND_MANAGER))
#define COMMAND_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMMAND_MANAGER, CommandManagerClass))

typedef struct _CommandManager CommandManager;
typedef struct _CommandManagerClass CommandManagerClass;

#define TYPE_COMMAND (command_get_type ())
#define COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND, Command))
#define COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMMAND, CommandClass))
#define IS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND))
#define IS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMMAND))
#define COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMMAND, CommandClass))

typedef struct _Command Command;
typedef struct _CommandClass CommandClass;

#define TYPE_PAGE_COMMAND (page_command_get_type ())
#define PAGE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_COMMAND, PageCommand))
#define PAGE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_COMMAND, PageCommandClass))
#define IS_PAGE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_COMMAND))
#define IS_PAGE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_COMMAND))
#define PAGE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_COMMAND, PageCommandClass))

typedef struct _PageCommand PageCommand;
typedef struct _PageCommandClass PageCommandClass;

#define TYPE_SIMPLE_PROXYABLE_COMMAND (simple_proxyable_command_get_type ())
#define SIMPLE_PROXYABLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommand))
#define SIMPLE_PROXYABLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommandClass))
#define IS_SIMPLE_PROXYABLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND))
#define IS_SIMPLE_PROXYABLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SIMPLE_PROXYABLE_COMMAND))
#define SIMPLE_PROXYABLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommandClass))

typedef struct _SimpleProxyableCommand SimpleProxyableCommand;
typedef struct _SimpleProxyableCommandClass SimpleProxyableCommandClass;

#define TYPE_RENAME_FACE_COMMAND (rename_face_command_get_type ())
#define RENAME_FACE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RENAME_FACE_COMMAND, RenameFaceCommand))
#define RENAME_FACE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RENAME_FACE_COMMAND, RenameFaceCommandClass))
#define IS_RENAME_FACE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RENAME_FACE_COMMAND))
#define IS_RENAME_FACE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RENAME_FACE_COMMAND))
#define RENAME_FACE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RENAME_FACE_COMMAND, RenameFaceCommandClass))

typedef struct _RenameFaceCommand RenameFaceCommand;
typedef struct _RenameFaceCommandClass RenameFaceCommandClass;
#define _command_manager_unref0(var) ((var == NULL) ? NULL : (var = (command_manager_unref (var), NULL)))

#define TYPE_DELETE_FACE_COMMAND (delete_face_command_get_type ())
#define DELETE_FACE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DELETE_FACE_COMMAND, DeleteFaceCommand))
#define DELETE_FACE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DELETE_FACE_COMMAND, DeleteFaceCommandClass))
#define IS_DELETE_FACE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DELETE_FACE_COMMAND))
#define IS_DELETE_FACE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DELETE_FACE_COMMAND))
#define DELETE_FACE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DELETE_FACE_COMMAND, DeleteFaceCommandClass))

typedef struct _DeleteFaceCommand DeleteFaceCommand;
typedef struct _DeleteFaceCommandClass DeleteFaceCommandClass;
#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 _SidebarBranch {
	GObject parent_instance;
	SidebarBranchPrivate * priv;
};

struct _SidebarBranchClass {
	GObjectClass parent_class;
};

struct _FacesBranch {
	SidebarBranch parent_instance;
	FacesBranchPrivate * priv;
};

struct _FacesBranchClass {
	SidebarBranchClass parent_class;
};

struct _FacesBranchPrivate {
	GeeHashMap* entry_map;
};

struct _SidebarEntryIface {
	GTypeInterface parent_iface;
	gchar* (*get_sidebar_name) (SidebarEntry* self);
	gchar* (*get_sidebar_tooltip) (SidebarEntry* self);
	gchar* (*get_sidebar_icon) (SidebarEntry* self);
	gchar* (*to_string) (SidebarEntry* self);
	void (*grafted) (SidebarEntry* self, SidebarTree* tree);
	void (*pruned) (SidebarEntry* self, SidebarTree* tree);
};

struct _SidebarRenameableEntryIface {
	GTypeInterface parent_iface;
	void (*rename) (SidebarRenameableEntry* self, const gchar* new_name);
	gboolean (*is_user_renameable) (SidebarRenameableEntry* self);
};

struct _SidebarExpandableEntryIface {
	GTypeInterface parent_iface;
	gboolean (*expand_on_select) (SidebarExpandableEntry* self);
};

struct _SidebarGrouping {
	GObject parent_instance;
	SidebarGroupingPrivate * priv;
};

struct _SidebarGroupingClass {
	GObjectClass parent_class;
};

struct _SidebarEmphasizableEntryIface {
	GTypeInterface parent_iface;
	gboolean (*is_emphasized) (SidebarEmphasizableEntry* self);
};

struct _SidebarHeader {
	SidebarGrouping parent_instance;
	SidebarHeaderPrivate * priv;
};

struct _SidebarHeaderClass {
	SidebarGroupingClass parent_class;
};

struct _FacesGrouping {
	SidebarHeader parent_instance;
	FacesGroupingPrivate * priv;
};

struct _FacesGroupingClass {
	SidebarHeaderClass parent_class;
};

struct _SidebarSelectableEntryIface {
	GTypeInterface parent_iface;
};

struct _SidebarPageRepresentativeIface {
	GTypeInterface parent_iface;
	gboolean (*has_page) (SidebarPageRepresentative* self);
	Page* (*get_page) (SidebarPageRepresentative* self);
};

struct _SidebarContextableIface {
	GTypeInterface parent_iface;
	GtkMenu* (*get_sidebar_context_menu) (SidebarContextable* self, GdkEventButton* event);
};

struct _SidebarSimplePageEntry {
	GObject parent_instance;
	SidebarSimplePageEntryPrivate * priv;
};

struct _SidebarSimplePageEntryClass {
	GObjectClass parent_class;
	gchar* (*get_sidebar_name) (SidebarSimplePageEntry* self);
	gchar* (*get_sidebar_tooltip) (SidebarSimplePageEntry* self);
	gchar* (*get_sidebar_icon) (SidebarSimplePageEntry* self);
	gchar* (*to_string) (SidebarSimplePageEntry* self);
	Page* (*create_page) (SidebarSimplePageEntry* self);
};

struct _SidebarDestroyableEntryIface {
	GTypeInterface parent_iface;
	void (*destroy_source) (SidebarDestroyableEntry* self);
};

struct _FacesSidebarEntry {
	SidebarSimplePageEntry parent_instance;
	FacesSidebarEntryPrivate * priv;
};

struct _FacesSidebarEntryClass {
	SidebarSimplePageEntryClass parent_class;
};

struct _FacesSidebarEntryPrivate {
	Face* face;
};

static gint FacesBranch_private_offset;
static gpointer faces_branch_parent_class = NULL;
VALA_EXTERN FaceSourceCollection* face_global;
static gpointer faces_grouping_parent_class = NULL;
static gint FacesSidebarEntry_private_offset;
static gpointer faces_sidebar_entry_parent_class = NULL;
static gchar* faces_sidebar_entry_single_face_icon;
static gchar* faces_sidebar_entry_single_face_icon = NULL;
static SidebarRenameableEntryIface * faces_sidebar_entry_sidebar_renameable_entry_parent_iface = NULL;
static SidebarDestroyableEntryIface * faces_sidebar_entry_sidebar_destroyable_entry_parent_iface = NULL;

VALA_EXTERN GType sidebar_branch_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SidebarBranch, g_object_unref)
VALA_EXTERN GType faces_branch_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FacesBranch, g_object_unref)
VALA_EXTERN GType data_object_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataObject, g_object_unref)
VALA_EXTERN GType data_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataSource, g_object_unref)
VALA_EXTERN GType face_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Face, g_object_unref)
VALA_EXTERN GType sidebar_simple_page_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SidebarSimplePageEntry, g_object_unref)
VALA_EXTERN GType faces_sidebar_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FacesSidebarEntry, g_object_unref)
VALA_EXTERN gpointer data_collection_ref (gpointer instance);
VALA_EXTERN void data_collection_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_data_collection (const gchar* name,
                                        const gchar* nick,
                                        const gchar* blurb,
                                        GType object_type,
                                        GParamFlags flags);
VALA_EXTERN void value_set_data_collection (GValue* value,
                                gpointer v_object);
VALA_EXTERN void value_take_data_collection (GValue* value,
                                 gpointer v_object);
VALA_EXTERN gpointer value_get_data_collection (const GValue* value);
VALA_EXTERN GType data_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataCollection, data_collection_unref)
VALA_EXTERN GType source_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SourceCollection, data_collection_unref)
VALA_EXTERN GType database_source_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DatabaseSourceCollection, data_collection_unref)
VALA_EXTERN GType container_source_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ContainerSourceCollection, data_collection_unref)
VALA_EXTERN GType face_source_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FaceSourceCollection, data_collection_unref)
static void faces_branch_on_faces_added_removed (FacesBranch* self,
                                          GeeIterable* added,
                                          GeeIterable* removed);
static void _faces_branch_on_faces_added_removed_data_collection_contents_altered (DataCollection* _sender,
                                                                            GeeIterable* added,
                                                                            GeeIterable* removed,
                                                                            gpointer self);
VALA_EXTERN gpointer alteration_ref (gpointer instance);
VALA_EXTERN void alteration_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_alteration (const gchar* name,
                                   const gchar* nick,
                                   const gchar* blurb,
                                   GType object_type,
                                   GParamFlags flags);
VALA_EXTERN void value_set_alteration (GValue* value,
                           gpointer v_object);
VALA_EXTERN void value_take_alteration (GValue* value,
                            gpointer v_object);
VALA_EXTERN gpointer value_get_alteration (const GValue* value);
VALA_EXTERN GType alteration_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Alteration, alteration_unref)
static void faces_branch_on_faces_altered (FacesBranch* self,
                                    GeeMap* altered);
static void _faces_branch_on_faces_altered_data_collection_items_altered (DataCollection* _sender,
                                                                   GeeMap* items,
                                                                   gpointer self);
VALA_EXTERN FacesBranch* faces_branch_new (void);
VALA_EXTERN FacesBranch* faces_branch_construct (GType object_type);
VALA_EXTERN FacesGrouping* faces_grouping_new (void);
VALA_EXTERN FacesGrouping* faces_grouping_construct (GType object_type);
VALA_EXTERN GType sidebar_grouping_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SidebarGrouping, g_object_unref)
VALA_EXTERN GType sidebar_header_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SidebarHeader, g_object_unref)
VALA_EXTERN GType faces_grouping_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FacesGrouping, g_object_unref)
VALA_EXTERN GType sidebar_tree_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SidebarTree, g_object_unref)
VALA_EXTERN GType sidebar_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SidebarEntry, g_object_unref)
VALA_EXTERN GType sidebar_branch_options_get_type (void) G_GNUC_CONST ;
static gint faces_branch_comparator (SidebarEntry* a,
                              SidebarEntry* b);
static gint _faces_branch_comparator_gcompare_func (gconstpointer a,
                                             gconstpointer b);
VALA_EXTERN SidebarBranch* sidebar_branch_new (SidebarEntry* root,
                                   SidebarBranchOptions options,
                                   GCompareFunc default_comparator,
                                   GCompareFunc root_comparator);
VALA_EXTERN SidebarBranch* sidebar_branch_construct (GType object_type,
                                         SidebarEntry* root,
                                         SidebarBranchOptions options,
                                         GCompareFunc default_comparator,
                                         GCompareFunc root_comparator);
VALA_EXTERN GeeCollection* data_collection_get_all (DataCollection* self);
VALA_EXTERN FacesSidebarEntry* faces_branch_get_entry_for_face (FacesBranch* self,
                                                    Face* face);
VALA_EXTERN gint face_compare_names (void* a,
                         void* b);
VALA_EXTERN Face* faces_sidebar_entry_for_face (FacesSidebarEntry* self);
VALA_EXTERN FacesSidebarEntry* faces_sidebar_entry_new (Face* face);
VALA_EXTERN FacesSidebarEntry* faces_sidebar_entry_construct (GType object_type,
                                                  Face* face);
VALA_EXTERN void sidebar_branch_graft (SidebarBranch* self,
                           SidebarEntry* parent,
                           SidebarEntry* entry,
                           GCompareFunc comparator);
VALA_EXTERN SidebarEntry* sidebar_branch_get_root (SidebarBranch* self);
VALA_EXTERN void sidebar_branch_prune (SidebarBranch* self,
                           SidebarEntry* entry);
VALA_EXTERN gboolean alteration_has_detail (Alteration* self,
                                const gchar* subject,
                                const gchar* detail);
VALA_EXTERN GType sidebar_renameable_entry_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gchar* data_object_get_name (DataObject* self);
VALA_EXTERN void sidebar_branch_reorder (SidebarBranch* self,
                             SidebarEntry* entry);
static void faces_branch_finalize (GObject * obj);
static GType faces_branch_get_type_once (void);
VALA_EXTERN GType sidebar_expandable_entry_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType sidebar_emphasizable_entry_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SidebarHeader* sidebar_header_new (const gchar* name,
                                   const gchar* tooltip,
                                   gboolean emphasized);
VALA_EXTERN SidebarHeader* sidebar_header_construct (GType object_type,
                                         const gchar* name,
                                         const gchar* tooltip,
                                         gboolean emphasized);
static GType faces_grouping_get_type_once (void);
VALA_EXTERN GType sidebar_selectable_entry_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Page, g_object_unref)
VALA_EXTERN GType sidebar_page_representative_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType sidebar_contextable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SidebarContextable, g_object_unref)
VALA_EXTERN GType sidebar_destroyable_entry_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gchar* sidebar_simple_page_entry_get_sidebar_name (SidebarSimplePageEntry* self);
VALA_EXTERN gchar* sidebar_simple_page_entry_get_sidebar_icon (SidebarSimplePageEntry* self);
VALA_EXTERN Page* sidebar_simple_page_entry_create_page (SidebarSimplePageEntry* self);
VALA_EXTERN SidebarSimplePageEntry* sidebar_simple_page_entry_construct (GType object_type);
VALA_EXTERN void faces_sidebar_entry_init (void);
VALA_EXTERN void faces_sidebar_entry_terminate (void);
static gboolean faces_sidebar_entry_real_is_user_renameable (SidebarRenameableEntry* base);
static gchar* faces_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base);
static gchar* faces_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base);
static Page* faces_sidebar_entry_real_create_page (SidebarSimplePageEntry* base);
VALA_EXTERN FacePage* face_page_new (Face* face);
VALA_EXTERN FacePage* face_page_construct (GType object_type,
                               Face* face);
VALA_EXTERN GType checkerboard_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CheckerboardPage, g_object_unref)
VALA_EXTERN GType media_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MediaPage, g_object_unref)
VALA_EXTERN GType collection_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CollectionPage, g_object_unref)
VALA_EXTERN GType face_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FacePage, g_object_unref)
static void faces_sidebar_entry_real_rename (SidebarRenameableEntry* base,
                                      const gchar* new_name);
VALA_EXTERN gchar* face_prep_face_name (const gchar* name);
VALA_EXTERN gboolean face_source_collection_exists (FaceSourceCollection* self,
                                        const gchar* name);
VALA_EXTERN gpointer command_manager_ref (gpointer instance);
VALA_EXTERN void command_manager_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_command_manager (const gchar* name,
                                        const gchar* nick,
                                        const gchar* blurb,
                                        GType object_type,
                                        GParamFlags flags);
VALA_EXTERN void value_set_command_manager (GValue* value,
                                gpointer v_object);
VALA_EXTERN void value_take_command_manager (GValue* value,
                                 gpointer v_object);
VALA_EXTERN gpointer value_get_command_manager (const GValue* value);
VALA_EXTERN GType command_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CommandManager, command_manager_unref)
VALA_EXTERN CommandManager* app_window_get_command_manager (void);
VALA_EXTERN GType command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Command, g_object_unref)
VALA_EXTERN void command_manager_execute (CommandManager* self,
                              Command* command);
VALA_EXTERN RenameFaceCommand* rename_face_command_new (Face* face,
                                            const gchar* new_name);
VALA_EXTERN RenameFaceCommand* rename_face_command_construct (GType object_type,
                                                  Face* face,
                                                  const gchar* new_name);
VALA_EXTERN GType page_command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PageCommand, g_object_unref)
VALA_EXTERN GType simple_proxyable_command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SimpleProxyableCommand, g_object_unref)
VALA_EXTERN GType rename_face_command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RenameFaceCommand, g_object_unref)
VALA_EXTERN void app_window_error_message (const gchar* message,
                               GtkWindow* parent);
VALA_EXTERN gchar* resources_rename_face_exists_message (const gchar* name);
static void faces_sidebar_entry_real_destroy_source (SidebarDestroyableEntry* base);
VALA_EXTERN gboolean dialogs_confirm_delete_face (Face* face);
VALA_EXTERN DeleteFaceCommand* delete_face_command_new (Face* face);
VALA_EXTERN DeleteFaceCommand* delete_face_command_construct (GType object_type,
                                                  Face* face);
VALA_EXTERN GType delete_face_command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DeleteFaceCommand, g_object_unref)
VALA_EXTERN gboolean sidebar_renameable_entry_is_user_renameable (SidebarRenameableEntry* self);
VALA_EXTERN void sidebar_renameable_entry_rename (SidebarRenameableEntry* self,
                                      const gchar* new_name);
VALA_EXTERN void sidebar_destroyable_entry_destroy_source (SidebarDestroyableEntry* self);
static void faces_sidebar_entry_finalize (GObject * obj);
static GType faces_sidebar_entry_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
faces_branch_get_instance_private (FacesBranch* self)
{
	return G_STRUCT_MEMBER_P (self, FacesBranch_private_offset);
}

static void
_faces_branch_on_faces_added_removed_data_collection_contents_altered (DataCollection* _sender,
                                                                       GeeIterable* added,
                                                                       GeeIterable* removed,
                                                                       gpointer self)
{
	faces_branch_on_faces_added_removed ((FacesBranch*) self, added, removed);
}

static void
_faces_branch_on_faces_altered_data_collection_items_altered (DataCollection* _sender,
                                                              GeeMap* items,
                                                              gpointer self)
{
	faces_branch_on_faces_altered ((FacesBranch*) self, items);
}

static gint
_faces_branch_comparator_gcompare_func (gconstpointer a,
                                        gconstpointer b)
{
	gint result;
	result = faces_branch_comparator ((SidebarEntry*) a, (SidebarEntry*) b);
	return result;
}

FacesBranch*
faces_branch_construct (GType object_type)
{
	FacesBranch * self = NULL;
	FacesGrouping* _tmp0_;
	FacesGrouping* _tmp1_;
	FaceSourceCollection* _tmp2_;
	GeeCollection* _tmp3_;
	GeeCollection* _tmp4_;
	FaceSourceCollection* _tmp5_;
	FaceSourceCollection* _tmp6_;
	_tmp0_ = faces_grouping_new ();
	_tmp1_ = _tmp0_;
	self = (FacesBranch*) sidebar_branch_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SIDEBAR_TYPE_ENTRY, SidebarEntry), (SIDEBAR_BRANCH_OPTIONS_HIDE_IF_EMPTY | SIDEBAR_BRANCH_OPTIONS_AUTO_OPEN_ON_NEW_CHILD) | SIDEBAR_BRANCH_OPTIONS_STARTUP_EXPAND_TO_FIRST_CHILD, _faces_branch_comparator_gcompare_func, NULL);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = face_global;
	_tmp3_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection));
	_tmp4_ = _tmp3_;
	faces_branch_on_faces_added_removed (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ITERABLE, GeeIterable), NULL);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = face_global;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_COLLECTION, DataCollection), "contents-altered", (GCallback) _faces_branch_on_faces_added_removed_data_collection_contents_altered, self, 0);
	_tmp6_ = face_global;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _faces_branch_on_faces_altered_data_collection_items_altered, self, 0);
	return self;
}

FacesBranch*
faces_branch_new (void)
{
	return faces_branch_construct (FACES_TYPE_BRANCH);
}

FacesSidebarEntry*
faces_branch_get_entry_for_face (FacesBranch* self,
                                 Face* face)
{
	GeeHashMap* _tmp0_;
	gpointer _tmp1_;
	FacesSidebarEntry* result;
	g_return_val_if_fail (FACES_IS_BRANCH (self), NULL);
	g_return_val_if_fail (IS_FACE (face), NULL);
	_tmp0_ = self->priv->entry_map;
	_tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), face);
	result = (FacesSidebarEntry*) _tmp1_;
	return result;
}

static gint
faces_branch_comparator (SidebarEntry* a,
                         SidebarEntry* b)
{
	Face* _tmp0_;
	Face* _tmp1_;
	gint result;
	g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), -1);
	g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), -1);
	if (a == b) {
		result = 0;
		return result;
	}
	_tmp0_ = faces_sidebar_entry_for_face (G_TYPE_CHECK_INSTANCE_CAST (a, FACES_TYPE_SIDEBAR_ENTRY, FacesSidebarEntry));
	_tmp1_ = faces_sidebar_entry_for_face (G_TYPE_CHECK_INSTANCE_CAST (b, FACES_TYPE_SIDEBAR_ENTRY, FacesSidebarEntry));
	result = face_compare_names (_tmp0_, _tmp1_);
	return result;
}

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

static void
faces_branch_on_faces_added_removed (FacesBranch* self,
                                     GeeIterable* added,
                                     GeeIterable* removed)
{
	g_return_if_fail (FACES_IS_BRANCH (self));
	g_return_if_fail ((added == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (added, GEE_TYPE_ITERABLE));
	g_return_if_fail ((removed == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (removed, GEE_TYPE_ITERABLE));
	if (added != NULL) {
		{
			GeeIterator* _object_it = NULL;
			GeeIterator* _tmp0_;
			_tmp0_ = gee_iterable_iterator (added);
			_object_it = _tmp0_;
			while (TRUE) {
				GeeIterator* _tmp1_;
				DataObject* object = NULL;
				GeeIterator* _tmp2_;
				gpointer _tmp3_;
				Face* face = NULL;
				DataObject* _tmp4_;
				Face* _tmp5_;
				FacesSidebarEntry* entry = NULL;
				Face* _tmp6_;
				FacesSidebarEntry* _tmp7_;
				GeeHashMap* _tmp8_;
				Face* _tmp9_;
				FacesSidebarEntry* _tmp10_;
				SidebarEntry* _tmp11_;
				SidebarEntry* _tmp12_;
				FacesSidebarEntry* _tmp13_;
				_tmp1_ = _object_it;
				if (!gee_iterator_next (_tmp1_)) {
					break;
				}
				_tmp2_ = _object_it;
				_tmp3_ = gee_iterator_get (_tmp2_);
				object = (DataObject*) _tmp3_;
				_tmp4_ = object;
				_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_FACE, Face));
				face = _tmp5_;
				_tmp6_ = face;
				_tmp7_ = faces_sidebar_entry_new (_tmp6_);
				entry = _tmp7_;
				_tmp8_ = self->priv->entry_map;
				_tmp9_ = face;
				_tmp10_ = entry;
				gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp9_, _tmp10_);
				_tmp11_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch));
				_tmp12_ = _tmp11_;
				_tmp13_ = entry;
				sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp12_, G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL);
				_g_object_unref0 (_tmp12_);
				_g_object_unref0 (entry);
				_g_object_unref0 (face);
				_g_object_unref0 (object);
			}
			_g_object_unref0 (_object_it);
		}
	}
	if (removed != NULL) {
		{
			GeeIterator* _object_it = NULL;
			GeeIterator* _tmp14_;
			_tmp14_ = gee_iterable_iterator (removed);
			_object_it = _tmp14_;
			while (TRUE) {
				GeeIterator* _tmp15_;
				DataObject* object = NULL;
				GeeIterator* _tmp16_;
				gpointer _tmp17_;
				Face* face = NULL;
				DataObject* _tmp18_;
				Face* _tmp19_;
				FacesSidebarEntry* entry = NULL;
				GeeHashMap* _tmp20_;
				Face* _tmp21_;
				gpointer _tmp22_;
				FacesSidebarEntry* _tmp23_;
				gboolean is_removed = FALSE;
				GeeHashMap* _tmp24_;
				Face* _tmp25_;
				FacesSidebarEntry* _tmp26_;
				_tmp15_ = _object_it;
				if (!gee_iterator_next (_tmp15_)) {
					break;
				}
				_tmp16_ = _object_it;
				_tmp17_ = gee_iterator_get (_tmp16_);
				object = (DataObject*) _tmp17_;
				_tmp18_ = object;
				_tmp19_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_FACE, Face));
				face = _tmp19_;
				_tmp20_ = self->priv->entry_map;
				_tmp21_ = face;
				_tmp22_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp21_);
				entry = (FacesSidebarEntry*) _tmp22_;
				_tmp23_ = entry;
				_vala_assert (_tmp23_ != NULL, "entry != null");
				_tmp24_ = self->priv->entry_map;
				_tmp25_ = face;
				is_removed = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp25_, NULL);
				_vala_assert (is_removed, "is_removed");
				_tmp26_ = entry;
				sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, SIDEBAR_TYPE_ENTRY, SidebarEntry));
				_g_object_unref0 (entry);
				_g_object_unref0 (face);
				_g_object_unref0 (object);
			}
			_g_object_unref0 (_object_it);
		}
	}
}

static void
faces_branch_on_faces_altered (FacesBranch* self,
                               GeeMap* altered)
{
	g_return_if_fail (FACES_IS_BRANCH (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (altered, GEE_TYPE_MAP));
	{
		GeeIterator* _object_it = NULL;
		GeeSet* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeIterator* _tmp3_;
		GeeIterator* _tmp4_;
		_tmp0_ = gee_map_get_keys (altered);
		_tmp1_ = _tmp0_;
		_tmp2_ = _tmp1_;
		_tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ITERABLE, GeeIterable));
		_tmp4_ = _tmp3_;
		_g_object_unref0 (_tmp2_);
		_object_it = _tmp4_;
		while (TRUE) {
			GeeIterator* _tmp5_;
			DataObject* object = NULL;
			GeeIterator* _tmp6_;
			gpointer _tmp7_;
			DataObject* _tmp8_;
			gpointer _tmp9_;
			Alteration* _tmp10_;
			gboolean _tmp11_;
			Face* face = NULL;
			DataObject* _tmp12_;
			Face* _tmp13_;
			FacesSidebarEntry* entry = NULL;
			GeeHashMap* _tmp14_;
			Face* _tmp15_;
			gpointer _tmp16_;
			FacesSidebarEntry* _tmp17_;
			FacesSidebarEntry* _tmp18_;
			Face* _tmp19_;
			gchar* _tmp20_;
			gchar* _tmp21_;
			FacesSidebarEntry* _tmp22_;
			Face* _tmp23_;
			gchar* _tmp24_;
			gchar* _tmp25_;
			FacesSidebarEntry* _tmp26_;
			_tmp5_ = _object_it;
			if (!gee_iterator_next (_tmp5_)) {
				break;
			}
			_tmp6_ = _object_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			object = (DataObject*) _tmp7_;
			_tmp8_ = object;
			_tmp9_ = gee_map_get (altered, _tmp8_);
			_tmp10_ = (Alteration*) _tmp9_;
			_tmp11_ = !alteration_has_detail (_tmp10_, "metadata", "name");
			_alteration_unref0 (_tmp10_);
			if (_tmp11_) {
				_g_object_unref0 (object);
				continue;
			}
			_tmp12_ = object;
			_tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_FACE, Face));
			face = _tmp13_;
			_tmp14_ = self->priv->entry_map;
			_tmp15_ = face;
			_tmp16_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp15_);
			entry = (FacesSidebarEntry*) _tmp16_;
			_tmp17_ = entry;
			_vala_assert (_tmp17_ != NULL, "entry != null");
			_tmp18_ = entry;
			_tmp19_ = face;
			_tmp20_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_DATA_OBJECT, DataObject));
			_tmp21_ = _tmp20_;
			g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, SIDEBAR_TYPE_RENAMEABLE_ENTRY, SidebarRenameableEntry), "sidebar-name-changed", _tmp21_);
			_g_free0 (_tmp21_);
			_tmp22_ = entry;
			_tmp23_ = face;
			_tmp24_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_DATA_OBJECT, DataObject));
			_tmp25_ = _tmp24_;
			g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, SIDEBAR_TYPE_ENTRY, SidebarEntry), "sidebar-tooltip-changed", _tmp25_);
			_g_free0 (_tmp25_);
			_tmp26_ = entry;
			sidebar_branch_reorder (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, SIDEBAR_TYPE_ENTRY, SidebarEntry));
			_g_object_unref0 (entry);
			_g_object_unref0 (face);
			_g_object_unref0 (object);
		}
		_g_object_unref0 (_object_it);
	}
}

static void
faces_branch_class_init (FacesBranchClass * klass,
                         gpointer klass_data)
{
	faces_branch_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FacesBranch_private_offset);
	G_OBJECT_CLASS (klass)->finalize = faces_branch_finalize;
}

static void
faces_branch_instance_init (FacesBranch * self,
                            gpointer klass)
{
	GeeHashMap* _tmp0_;
	self->priv = faces_branch_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (TYPE_FACE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, FACES_TYPE_SIDEBAR_ENTRY, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->entry_map = _tmp0_;
}

static void
faces_branch_finalize (GObject * obj)
{
	FacesBranch * self;
	FaceSourceCollection* _tmp0_;
	guint _tmp1_;
	FaceSourceCollection* _tmp2_;
	guint _tmp3_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FACES_TYPE_BRANCH, FacesBranch);
	_tmp0_ = face_global;
	g_signal_parse_name ("contents-altered", TYPE_DATA_COLLECTION, &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _faces_branch_on_faces_added_removed_data_collection_contents_altered, self);
	_tmp2_ = face_global;
	g_signal_parse_name ("items-altered", TYPE_DATA_COLLECTION, &_tmp3_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _faces_branch_on_faces_altered_data_collection_items_altered, self);
	_g_object_unref0 (self->priv->entry_map);
	G_OBJECT_CLASS (faces_branch_parent_class)->finalize (obj);
}

static GType
faces_branch_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FacesBranchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) faces_branch_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FacesBranch), 0, (GInstanceInitFunc) faces_branch_instance_init, NULL };
	GType faces_branch_type_id;
	faces_branch_type_id = g_type_register_static (SIDEBAR_TYPE_BRANCH, "FacesBranch", &g_define_type_info, 0);
	FacesBranch_private_offset = g_type_add_instance_private (faces_branch_type_id, sizeof (FacesBranchPrivate));
	return faces_branch_type_id;
}

GType
faces_branch_get_type (void)
{
	static volatile gsize faces_branch_type_id__once = 0;
	if (g_once_init_enter (&faces_branch_type_id__once)) {
		GType faces_branch_type_id;
		faces_branch_type_id = faces_branch_get_type_once ();
		g_once_init_leave (&faces_branch_type_id__once, faces_branch_type_id);
	}
	return faces_branch_type_id__once;
}

FacesGrouping*
faces_grouping_construct (GType object_type)
{
	FacesGrouping * self = NULL;
	self = (FacesGrouping*) sidebar_header_construct (object_type, _ ("Faces"), NULL, TRUE);
	return self;
}

FacesGrouping*
faces_grouping_new (void)
{
	return faces_grouping_construct (FACES_TYPE_GROUPING);
}

static void
faces_grouping_class_init (FacesGroupingClass * klass,
                           gpointer klass_data)
{
	faces_grouping_parent_class = g_type_class_peek_parent (klass);
}

static void
faces_grouping_instance_init (FacesGrouping * self,
                              gpointer klass)
{
}

static GType
faces_grouping_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FacesGroupingClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) faces_grouping_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FacesGrouping), 0, (GInstanceInitFunc) faces_grouping_instance_init, NULL };
	GType faces_grouping_type_id;
	faces_grouping_type_id = g_type_register_static (SIDEBAR_TYPE_HEADER, "FacesGrouping", &g_define_type_info, 0);
	return faces_grouping_type_id;
}

GType
faces_grouping_get_type (void)
{
	static volatile gsize faces_grouping_type_id__once = 0;
	if (g_once_init_enter (&faces_grouping_type_id__once)) {
		GType faces_grouping_type_id;
		faces_grouping_type_id = faces_grouping_get_type_once ();
		g_once_init_leave (&faces_grouping_type_id__once, faces_grouping_type_id);
	}
	return faces_grouping_type_id__once;
}

static inline gpointer
faces_sidebar_entry_get_instance_private (FacesSidebarEntry* self)
{
	return G_STRUCT_MEMBER_P (self, FacesSidebarEntry_private_offset);
}

FacesSidebarEntry*
faces_sidebar_entry_construct (GType object_type,
                               Face* face)
{
	FacesSidebarEntry * self = NULL;
	Face* _tmp0_;
	g_return_val_if_fail (IS_FACE (face), NULL);
	self = (FacesSidebarEntry*) sidebar_simple_page_entry_construct (object_type);
	_tmp0_ = _g_object_ref0 (face);
	_g_object_unref0 (self->priv->face);
	self->priv->face = _tmp0_;
	return self;
}

FacesSidebarEntry*
faces_sidebar_entry_new (Face* face)
{
	return faces_sidebar_entry_construct (FACES_TYPE_SIDEBAR_ENTRY, face);
}

void
faces_sidebar_entry_init (void)
{
}

void
faces_sidebar_entry_terminate (void)
{
}

Face*
faces_sidebar_entry_for_face (FacesSidebarEntry* self)
{
	Face* _tmp0_;
	Face* _tmp1_;
	Face* result;
	g_return_val_if_fail (FACES_IS_SIDEBAR_ENTRY (self), NULL);
	_tmp0_ = self->priv->face;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static gboolean
faces_sidebar_entry_real_is_user_renameable (SidebarRenameableEntry* base)
{
	FacesSidebarEntry * self;
	gboolean result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, FACES_TYPE_SIDEBAR_ENTRY, FacesSidebarEntry);
	result = TRUE;
	return result;
}

static gchar*
faces_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base)
{
	FacesSidebarEntry * self;
	Face* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, FACES_TYPE_SIDEBAR_ENTRY, FacesSidebarEntry);
	_tmp0_ = self->priv->face;
	_tmp1_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_OBJECT, DataObject));
	result = _tmp1_;
	return result;
}

static gchar*
faces_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base)
{
	FacesSidebarEntry * self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, FACES_TYPE_SIDEBAR_ENTRY, FacesSidebarEntry);
	_tmp0_ = faces_sidebar_entry_single_face_icon;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

static Page*
faces_sidebar_entry_real_create_page (SidebarSimplePageEntry* base)
{
	FacesSidebarEntry * self;
	Face* _tmp0_;
	FacePage* _tmp1_;
	Page* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, FACES_TYPE_SIDEBAR_ENTRY, FacesSidebarEntry);
	_tmp0_ = self->priv->face;
	_tmp1_ = face_page_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page);
	return result;
}

static void
faces_sidebar_entry_real_rename (SidebarRenameableEntry* base,
                                 const gchar* new_name)
{
	FacesSidebarEntry * self;
	gchar* prepped = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	FaceSourceCollection* _tmp2_;
	const gchar* _tmp3_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, FACES_TYPE_SIDEBAR_ENTRY, FacesSidebarEntry);
	g_return_if_fail (new_name != NULL);
	_tmp0_ = face_prep_face_name (new_name);
	prepped = _tmp0_;
	_tmp1_ = prepped;
	if (_tmp1_ == NULL) {
		_g_free0 (prepped);
		return;
	}
	_tmp2_ = face_global;
	_tmp3_ = prepped;
	if (!face_source_collection_exists (_tmp2_, _tmp3_)) {
		CommandManager* _tmp4_;
		CommandManager* _tmp5_;
		Face* _tmp6_;
		const gchar* _tmp7_;
		RenameFaceCommand* _tmp8_;
		RenameFaceCommand* _tmp9_;
		_tmp4_ = app_window_get_command_manager ();
		_tmp5_ = _tmp4_;
		_tmp6_ = self->priv->face;
		_tmp7_ = prepped;
		_tmp8_ = rename_face_command_new (_tmp6_, _tmp7_);
		_tmp9_ = _tmp8_;
		command_manager_execute (_tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_COMMAND, Command));
		_g_object_unref0 (_tmp9_);
		_command_manager_unref0 (_tmp5_);
	} else {
		const gchar* _tmp10_;
		Face* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		gboolean _tmp14_;
		_tmp10_ = prepped;
		_tmp11_ = self->priv->face;
		_tmp12_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_DATA_OBJECT, DataObject));
		_tmp13_ = _tmp12_;
		_tmp14_ = g_strcmp0 (_tmp10_, _tmp13_) != 0;
		_g_free0 (_tmp13_);
		if (_tmp14_) {
			const gchar* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			_tmp15_ = prepped;
			_tmp16_ = resources_rename_face_exists_message (_tmp15_);
			_tmp17_ = _tmp16_;
			app_window_error_message (_tmp17_, NULL);
			_g_free0 (_tmp17_);
		}
	}
	_g_free0 (prepped);
}

static void
faces_sidebar_entry_real_destroy_source (SidebarDestroyableEntry* base)
{
	FacesSidebarEntry * self;
	Face* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, FACES_TYPE_SIDEBAR_ENTRY, FacesSidebarEntry);
	_tmp0_ = self->priv->face;
	if (dialogs_confirm_delete_face (_tmp0_)) {
		CommandManager* _tmp1_;
		CommandManager* _tmp2_;
		Face* _tmp3_;
		DeleteFaceCommand* _tmp4_;
		DeleteFaceCommand* _tmp5_;
		_tmp1_ = app_window_get_command_manager ();
		_tmp2_ = _tmp1_;
		_tmp3_ = self->priv->face;
		_tmp4_ = delete_face_command_new (_tmp3_);
		_tmp5_ = _tmp4_;
		command_manager_execute (_tmp2_, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_COMMAND, Command));
		_g_object_unref0 (_tmp5_);
		_command_manager_unref0 (_tmp2_);
	}
}

static void
faces_sidebar_entry_class_init (FacesSidebarEntryClass * klass,
                                gpointer klass_data)
{
	gchar* _tmp0_;
	faces_sidebar_entry_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FacesSidebarEntry_private_offset);
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry*)) faces_sidebar_entry_real_get_sidebar_name;
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*) (SidebarSimplePageEntry*)) faces_sidebar_entry_real_get_sidebar_icon;
	((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry*)) faces_sidebar_entry_real_create_page;
	G_OBJECT_CLASS (klass)->finalize = faces_sidebar_entry_finalize;
	_tmp0_ = g_strdup (RESOURCES_ICON_ONE_FACE);
	faces_sidebar_entry_single_face_icon = _tmp0_;
}

static void
faces_sidebar_entry_sidebar_renameable_entry_interface_init (SidebarRenameableEntryIface * iface,
                                                             gpointer iface_data)
{
	faces_sidebar_entry_sidebar_renameable_entry_parent_iface = g_type_interface_peek_parent (iface);
	iface->is_user_renameable = (gboolean (*) (SidebarRenameableEntry*)) faces_sidebar_entry_real_is_user_renameable;
	iface->rename = (void (*) (SidebarRenameableEntry*, const gchar*)) faces_sidebar_entry_real_rename;
}

static void
faces_sidebar_entry_sidebar_destroyable_entry_interface_init (SidebarDestroyableEntryIface * iface,
                                                              gpointer iface_data)
{
	faces_sidebar_entry_sidebar_destroyable_entry_parent_iface = g_type_interface_peek_parent (iface);
	iface->destroy_source = (void (*) (SidebarDestroyableEntry*)) faces_sidebar_entry_real_destroy_source;
}

static void
faces_sidebar_entry_instance_init (FacesSidebarEntry * self,
                                   gpointer klass)
{
	self->priv = faces_sidebar_entry_get_instance_private (self);
}

static void
faces_sidebar_entry_finalize (GObject * obj)
{
	FacesSidebarEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FACES_TYPE_SIDEBAR_ENTRY, FacesSidebarEntry);
	_g_object_unref0 (self->priv->face);
	G_OBJECT_CLASS (faces_sidebar_entry_parent_class)->finalize (obj);
}

static GType
faces_sidebar_entry_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FacesSidebarEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) faces_sidebar_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FacesSidebarEntry), 0, (GInstanceInitFunc) faces_sidebar_entry_instance_init, NULL };
	static const GInterfaceInfo sidebar_renameable_entry_info = { (GInterfaceInitFunc) faces_sidebar_entry_sidebar_renameable_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo sidebar_destroyable_entry_info = { (GInterfaceInitFunc) faces_sidebar_entry_sidebar_destroyable_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType faces_sidebar_entry_type_id;
	faces_sidebar_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "FacesSidebarEntry", &g_define_type_info, 0);
	g_type_add_interface_static (faces_sidebar_entry_type_id, SIDEBAR_TYPE_RENAMEABLE_ENTRY, &sidebar_renameable_entry_info);
	g_type_add_interface_static (faces_sidebar_entry_type_id, SIDEBAR_TYPE_DESTROYABLE_ENTRY, &sidebar_destroyable_entry_info);
	FacesSidebarEntry_private_offset = g_type_add_instance_private (faces_sidebar_entry_type_id, sizeof (FacesSidebarEntryPrivate));
	return faces_sidebar_entry_type_id;
}

GType
faces_sidebar_entry_get_type (void)
{
	static volatile gsize faces_sidebar_entry_type_id__once = 0;
	if (g_once_init_enter (&faces_sidebar_entry_type_id__once)) {
		GType faces_sidebar_entry_type_id;
		faces_sidebar_entry_type_id = faces_sidebar_entry_get_type_once ();
		g_once_init_leave (&faces_sidebar_entry_type_id__once, faces_sidebar_entry_type_id);
	}
	return faces_sidebar_entry_type_id__once;
}

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

