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

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

#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 IMPORT_ROLL_TYPE_BRANCH (import_roll_branch_get_type ())
#define IMPORT_ROLL_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IMPORT_ROLL_TYPE_BRANCH, ImportRollBranch))
#define IMPORT_ROLL_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IMPORT_ROLL_TYPE_BRANCH, ImportRollBranchClass))
#define IMPORT_ROLL_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IMPORT_ROLL_TYPE_BRANCH))
#define IMPORT_ROLL_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IMPORT_ROLL_TYPE_BRANCH))
#define IMPORT_ROLL_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IMPORT_ROLL_TYPE_BRANCH, ImportRollBranchClass))

typedef struct _ImportRollBranch ImportRollBranch;
typedef struct _ImportRollBranchClass ImportRollBranchClass;
typedef struct _ImportRollBranchPrivate ImportRollBranchPrivate;

#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 LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY (library_hideable_page_entry_get_type ())
#define LIBRARY_HIDEABLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY, LibraryHideablePageEntry))
#define LIBRARY_HIDEABLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY, LibraryHideablePageEntryClass))
#define LIBRARY_IS_HIDEABLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY))
#define LIBRARY_IS_HIDEABLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY))
#define LIBRARY_HIDEABLE_PAGE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY, LibraryHideablePageEntryClass))

typedef struct _LibraryHideablePageEntry LibraryHideablePageEntry;
typedef struct _LibraryHideablePageEntryClass LibraryHideablePageEntryClass;

#define IMPORT_ROLL_TYPE_SIDEBAR_ENTRY (import_roll_sidebar_entry_get_type ())
#define IMPORT_ROLL_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IMPORT_ROLL_TYPE_SIDEBAR_ENTRY, ImportRollSidebarEntry))
#define IMPORT_ROLL_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IMPORT_ROLL_TYPE_SIDEBAR_ENTRY, ImportRollSidebarEntryClass))
#define IMPORT_ROLL_IS_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IMPORT_ROLL_TYPE_SIDEBAR_ENTRY))
#define IMPORT_ROLL_IS_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IMPORT_ROLL_TYPE_SIDEBAR_ENTRY))
#define IMPORT_ROLL_SIDEBAR_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IMPORT_ROLL_TYPE_SIDEBAR_ENTRY, ImportRollSidebarEntryClass))

typedef struct _ImportRollSidebarEntry ImportRollSidebarEntry;
typedef struct _ImportRollSidebarEntryClass ImportRollSidebarEntryClass;
enum  {
	IMPORT_ROLL_BRANCH_0_PROPERTY,
	IMPORT_ROLL_BRANCH_NUM_PROPERTIES
};
static GParamSpec* import_roll_branch_properties[IMPORT_ROLL_BRANCH_NUM_PROPERTIES];
#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 IMPORT_ROLL_TYPE_ROOT (import_roll_root_get_type ())
#define IMPORT_ROLL_ROOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IMPORT_ROLL_TYPE_ROOT, ImportRollRoot))
#define IMPORT_ROLL_ROOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IMPORT_ROLL_TYPE_ROOT, ImportRollRootClass))
#define IMPORT_ROLL_IS_ROOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IMPORT_ROLL_TYPE_ROOT))
#define IMPORT_ROLL_IS_ROOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IMPORT_ROLL_TYPE_ROOT))
#define IMPORT_ROLL_ROOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IMPORT_ROLL_TYPE_ROOT, ImportRollRootClass))

typedef struct _ImportRollRoot ImportRollRoot;
typedef struct _ImportRollRootClass ImportRollRootClass;

#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 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_MEDIA_SOURCE_COLLECTION (media_source_collection_get_type ())
#define MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection))
#define MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass))
#define IS_MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_COLLECTION))
#define IS_MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_COLLECTION))
#define MEDIA_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass))

typedef struct _MediaSourceCollection MediaSourceCollection;
typedef struct _MediaSourceCollectionClass MediaSourceCollectionClass;

#define TYPE_MEDIA_COLLECTION_REGISTRY (media_collection_registry_get_type ())
#define MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistry))
#define MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass))
#define IS_MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_COLLECTION_REGISTRY))
#define IS_MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_COLLECTION_REGISTRY))
#define MEDIA_COLLECTION_REGISTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass))

typedef struct _MediaCollectionRegistry MediaCollectionRegistry;
typedef struct _MediaCollectionRegistryClass MediaCollectionRegistryClass;
#define _media_collection_registry_unref0(var) ((var == NULL) ? NULL : (var = (media_collection_registry_unref (var), NULL)))
#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL)))

#define TYPE_IMPORT_ID (import_id_get_type ())
typedef struct _ImportID ImportID;
#define _import_id_free0(var) ((var == NULL) ? NULL : (var = (import_id_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;

#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;
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 _ImportRollRootPrivate ImportRollRootPrivate;
enum  {
	IMPORT_ROLL_ROOT_0_PROPERTY,
	IMPORT_ROLL_ROOT_NUM_PROPERTIES
};
static GParamSpec* import_roll_root_properties[IMPORT_ROLL_ROOT_NUM_PROPERTIES];

struct _SidebarBranch {
	GObject parent_instance;
	SidebarBranchPrivate * priv;
};

struct _SidebarBranchClass {
	GObjectClass parent_class;
};

struct _ImportRollBranch {
	SidebarBranch parent_instance;
	ImportRollBranchPrivate * priv;
};

struct _ImportRollBranchClass {
	SidebarBranchClass parent_class;
};

struct _ImportRollBranchPrivate {
	GeeHashMap* entries;
};

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 _ImportID {
	gint64 id;
};

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

struct _SidebarRenameableEntryIface {
	GTypeInterface parent_iface;
	void (*rename) (SidebarRenameableEntry* self, const gchar* new_name);
	gboolean (*is_user_renameable) (SidebarRenameableEntry* 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 _ImportRollRoot {
	SidebarHeader parent_instance;
	ImportRollRootPrivate * priv;
};

struct _ImportRollRootClass {
	SidebarHeaderClass parent_class;
};

static gint ImportRollBranch_private_offset;
static gpointer import_roll_branch_parent_class = NULL;
static gpointer import_roll_root_parent_class = NULL;

VALA_EXTERN GType sidebar_branch_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SidebarBranch, g_object_unref)
VALA_EXTERN GType import_roll_branch_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ImportRollBranch, 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 library_hideable_page_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LibraryHideablePageEntry, g_object_unref)
VALA_EXTERN GType import_roll_sidebar_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ImportRollSidebarEntry, g_object_unref)
VALA_EXTERN ImportRollBranch* import_roll_branch_new (void);
VALA_EXTERN ImportRollBranch* import_roll_branch_construct (GType object_type);
VALA_EXTERN ImportRollRoot* import_roll_root_new (void);
VALA_EXTERN ImportRollRoot* import_roll_root_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 import_roll_root_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ImportRollRoot, 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 import_roll_branch_comparator (SidebarEntry* a,
                                    SidebarEntry* b);
static gint _import_roll_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 guint int64_hash (gint64* n);
static guint _int64_hash_gee_hash_data_func (gconstpointer v,
                                      gpointer self);
VALA_EXTERN gboolean int64_equal (gint64* a,
                      gint64* b);
static gboolean _int64_equal_gee_equal_data_func (gconstpointer a,
                                           gconstpointer b,
                                           gpointer self);
static gint64* _int64_dup (gint64* self);
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 media_source_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MediaSourceCollection, data_collection_unref)
VALA_EXTERN gpointer media_collection_registry_ref (gpointer instance);
VALA_EXTERN void media_collection_registry_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_media_collection_registry (const gchar* name,
                                                  const gchar* nick,
                                                  const gchar* blurb,
                                                  GType object_type,
                                                  GParamFlags flags);
VALA_EXTERN void value_set_media_collection_registry (GValue* value,
                                          gpointer v_object);
VALA_EXTERN void value_take_media_collection_registry (GValue* value,
                                           gpointer v_object);
VALA_EXTERN gpointer value_get_media_collection_registry (const GValue* value);
VALA_EXTERN GType media_collection_registry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MediaCollectionRegistry, media_collection_registry_unref)
VALA_EXTERN MediaCollectionRegistry* media_collection_registry_get_instance (void);
VALA_EXTERN GeeCollection* media_collection_registry_get_all (MediaCollectionRegistry* self);
static void import_roll_branch_on_import_rolls_altered (ImportRollBranch* self,
                                                 MediaSourceCollection* source);
static void _import_roll_branch_on_import_rolls_altered_media_source_collection_import_roll_altered (MediaSourceCollection* _sender,
                                                                                              gpointer self);
VALA_EXTERN GType import_id_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ImportID* import_id_dup (const ImportID* self);
VALA_EXTERN void import_id_free (ImportID* self);
VALA_EXTERN gint import_id_compare_func (ImportID* a,
                             ImportID* b);
VALA_EXTERN void import_roll_sidebar_entry_get_id (ImportRollSidebarEntry* self,
                                       ImportID* result);
VALA_EXTERN GeeSortedSet* media_source_collection_get_import_roll_ids (MediaSourceCollection* self);
VALA_EXTERN ImportRollSidebarEntry* import_roll_sidebar_entry_new (ImportID* id);
VALA_EXTERN ImportRollSidebarEntry* import_roll_sidebar_entry_construct (GType object_type,
                                                             ImportID* id);
VALA_EXTERN void sidebar_branch_graft (SidebarBranch* self,
                           SidebarEntry* parent,
                           SidebarEntry* entry,
                           GCompareFunc comparator);
VALA_EXTERN SidebarEntry* sidebar_branch_get_root (SidebarBranch* self);
static void import_roll_branch_finalize (GObject * obj);
static GType import_roll_branch_get_type_once (void);
VALA_EXTERN GType sidebar_expandable_entry_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType sidebar_renameable_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 import_roll_root_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
import_roll_branch_get_instance_private (ImportRollBranch* self)
{
	return G_STRUCT_MEMBER_P (self, ImportRollBranch_private_offset);
}

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

static guint
_int64_hash_gee_hash_data_func (gconstpointer v,
                                gpointer self)
{
	guint result;
	result = int64_hash ((gint64*) v);
	return result;
}

static gboolean
_int64_equal_gee_equal_data_func (gconstpointer a,
                                  gconstpointer b,
                                  gpointer self)
{
	gboolean result;
	result = int64_equal ((gint64*) a, (gint64*) b);
	return result;
}

static gint64*
_int64_dup (gint64* self)
{
	gint64* dup;
	dup = g_new0 (gint64, 1);
	memcpy (dup, self, sizeof (gint64));
	return dup;
}

static void
_import_roll_branch_on_import_rolls_altered_media_source_collection_import_roll_altered (MediaSourceCollection* _sender,
                                                                                         gpointer self)
{
	import_roll_branch_on_import_rolls_altered ((ImportRollBranch*) self, _sender);
}

ImportRollBranch*
import_roll_branch_construct (GType object_type)
{
	ImportRollBranch * self = NULL;
	ImportRollRoot* _tmp0_;
	ImportRollRoot* _tmp1_;
	GeeHashMap* _tmp2_;
	_tmp0_ = import_roll_root_new ();
	_tmp1_ = _tmp0_;
	self = (ImportRollBranch*) sidebar_branch_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SIDEBAR_TYPE_ENTRY, SidebarEntry), SIDEBAR_BRANCH_OPTIONS_HIDE_IF_EMPTY, _import_roll_branch_comparator_gcompare_func, NULL);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = gee_hash_map_new (G_TYPE_INT64, (GBoxedCopyFunc) _int64_dup, (GDestroyNotify) g_free, IMPORT_ROLL_TYPE_SIDEBAR_ENTRY, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _int64_hash_gee_hash_data_func, NULL, NULL, _int64_equal_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->entries);
	self->priv->entries = _tmp2_;
	{
		GeeIterator* _source_it = NULL;
		MediaCollectionRegistry* _tmp3_;
		MediaCollectionRegistry* _tmp4_;
		GeeCollection* _tmp5_;
		GeeCollection* _tmp6_;
		GeeIterator* _tmp7_;
		GeeIterator* _tmp8_;
		_tmp3_ = media_collection_registry_get_instance ();
		_tmp4_ = _tmp3_;
		_tmp5_ = media_collection_registry_get_all (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable));
		_tmp8_ = _tmp7_;
		_g_object_unref0 (_tmp6_);
		_media_collection_registry_unref0 (_tmp4_);
		_source_it = _tmp8_;
		while (TRUE) {
			GeeIterator* _tmp9_;
			MediaSourceCollection* source = NULL;
			GeeIterator* _tmp10_;
			gpointer _tmp11_;
			MediaSourceCollection* _tmp12_;
			MediaSourceCollection* _tmp13_;
			_tmp9_ = _source_it;
			if (!gee_iterator_next (_tmp9_)) {
				break;
			}
			_tmp10_ = _source_it;
			_tmp11_ = gee_iterator_get (_tmp10_);
			source = (MediaSourceCollection*) _tmp11_;
			_tmp12_ = source;
			import_roll_branch_on_import_rolls_altered (self, _tmp12_);
			_tmp13_ = source;
			g_signal_connect_object (_tmp13_, "import-roll-altered", (GCallback) _import_roll_branch_on_import_rolls_altered_media_source_collection_import_roll_altered, self, 0);
			_data_collection_unref0 (source);
		}
		_g_object_unref0 (_source_it);
	}
	return self;
}

ImportRollBranch*
import_roll_branch_new (void)
{
	return import_roll_branch_construct (IMPORT_ROLL_TYPE_BRANCH);
}

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

static gint
import_roll_branch_comparator (SidebarEntry* a,
                               SidebarEntry* b)
{
	ImportRollSidebarEntry* entry_a = NULL;
	ImportRollSidebarEntry* _tmp0_;
	ImportRollSidebarEntry* entry_b = NULL;
	ImportRollSidebarEntry* _tmp1_;
	ImportRollSidebarEntry* _tmp2_;
	ImportID _tmp3_ = {0};
	ImportRollSidebarEntry* _tmp4_;
	ImportID _tmp5_ = {0};
	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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (a, IMPORT_ROLL_TYPE_SIDEBAR_ENTRY, ImportRollSidebarEntry));
	entry_a = _tmp0_;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (b, IMPORT_ROLL_TYPE_SIDEBAR_ENTRY, ImportRollSidebarEntry));
	entry_b = _tmp1_;
	_tmp2_ = entry_a;
	import_roll_sidebar_entry_get_id (_tmp2_, &_tmp3_);
	_tmp4_ = entry_b;
	import_roll_sidebar_entry_get_id (_tmp4_, &_tmp5_);
	result = -import_id_compare_func (&_tmp3_, &_tmp5_);
	_g_object_unref0 (entry_b);
	_g_object_unref0 (entry_a);
	return result;
}

static void
import_roll_branch_on_import_rolls_altered (ImportRollBranch* self,
                                            MediaSourceCollection* source)
{
	GeeSortedSet* ids = NULL;
	GeeSortedSet* _tmp0_;
	g_return_if_fail (IMPORT_ROLL_IS_BRANCH (self));
	g_return_if_fail (IS_MEDIA_SOURCE_COLLECTION (source));
	_tmp0_ = media_source_collection_get_import_roll_ids (source);
	ids = _tmp0_;
	{
		GeeIterator* _id_it = NULL;
		GeeSortedSet* _tmp1_;
		GeeIterator* _tmp2_;
		_tmp1_ = ids;
		_tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable));
		_id_it = _tmp2_;
		while (TRUE) {
			GeeIterator* _tmp3_;
			ImportID* id = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			GeeHashMap* _tmp6_;
			ImportID* _tmp7_;
			_tmp3_ = _id_it;
			if (!gee_iterator_next (_tmp3_)) {
				break;
			}
			_tmp4_ = _id_it;
			_tmp5_ = gee_iterator_get (_tmp4_);
			id = (ImportID*) _tmp5_;
			_tmp6_ = self->priv->entries;
			_tmp7_ = id;
			if (!gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), &(*_tmp7_).id)) {
				ImportRollSidebarEntry* entry = NULL;
				ImportID* _tmp8_;
				ImportID _tmp9_;
				ImportRollSidebarEntry* _tmp10_;
				GeeHashMap* _tmp11_;
				ImportID* _tmp12_;
				ImportRollSidebarEntry* _tmp13_;
				SidebarEntry* _tmp14_;
				SidebarEntry* _tmp15_;
				ImportRollSidebarEntry* _tmp16_;
				_tmp8_ = id;
				_tmp9_ = *_tmp8_;
				_tmp10_ = import_roll_sidebar_entry_new (&_tmp9_);
				entry = _tmp10_;
				_tmp11_ = self->priv->entries;
				_tmp12_ = id;
				_tmp13_ = entry;
				gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), &(*_tmp12_).id, _tmp13_);
				_tmp14_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch));
				_tmp15_ = _tmp14_;
				_tmp16_ = entry;
				sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp15_, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL);
				_g_object_unref0 (_tmp15_);
				_g_object_unref0 (entry);
			}
			_import_id_free0 (id);
		}
		_g_object_unref0 (_id_it);
	}
	_g_object_unref0 (ids);
}

static void
import_roll_branch_class_init (ImportRollBranchClass * klass,
                               gpointer klass_data)
{
	import_roll_branch_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ImportRollBranch_private_offset);
	G_OBJECT_CLASS (klass)->finalize = import_roll_branch_finalize;
}

static void
import_roll_branch_instance_init (ImportRollBranch * self,
                                  gpointer klass)
{
	self->priv = import_roll_branch_get_instance_private (self);
}

static void
import_roll_branch_finalize (GObject * obj)
{
	ImportRollBranch * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, IMPORT_ROLL_TYPE_BRANCH, ImportRollBranch);
	_g_object_unref0 (self->priv->entries);
	G_OBJECT_CLASS (import_roll_branch_parent_class)->finalize (obj);
}

static GType
import_roll_branch_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ImportRollBranchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) import_roll_branch_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ImportRollBranch), 0, (GInstanceInitFunc) import_roll_branch_instance_init, NULL };
	GType import_roll_branch_type_id;
	import_roll_branch_type_id = g_type_register_static (SIDEBAR_TYPE_BRANCH, "ImportRollBranch", &g_define_type_info, 0);
	ImportRollBranch_private_offset = g_type_add_instance_private (import_roll_branch_type_id, sizeof (ImportRollBranchPrivate));
	return import_roll_branch_type_id;
}

GType
import_roll_branch_get_type (void)
{
	static volatile gsize import_roll_branch_type_id__once = 0;
	if (g_once_init_enter (&import_roll_branch_type_id__once)) {
		GType import_roll_branch_type_id;
		import_roll_branch_type_id = import_roll_branch_get_type_once ();
		g_once_init_leave (&import_roll_branch_type_id__once, import_roll_branch_type_id);
	}
	return import_roll_branch_type_id__once;
}

ImportRollRoot*
import_roll_root_construct (GType object_type)
{
	ImportRollRoot * self = NULL;
	self = (ImportRollRoot*) sidebar_header_construct (object_type, _ ("Imports"), _ ("Browse the library’s import history"), TRUE);
	return self;
}

ImportRollRoot*
import_roll_root_new (void)
{
	return import_roll_root_construct (IMPORT_ROLL_TYPE_ROOT);
}

static void
import_roll_root_class_init (ImportRollRootClass * klass,
                             gpointer klass_data)
{
	import_roll_root_parent_class = g_type_class_peek_parent (klass);
}

static void
import_roll_root_instance_init (ImportRollRoot * self,
                                gpointer klass)
{
}

static GType
import_roll_root_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ImportRollRootClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) import_roll_root_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ImportRollRoot), 0, (GInstanceInitFunc) import_roll_root_instance_init, NULL };
	GType import_roll_root_type_id;
	import_roll_root_type_id = g_type_register_static (SIDEBAR_TYPE_HEADER, "ImportRollRoot", &g_define_type_info, 0);
	return import_roll_root_type_id;
}

GType
import_roll_root_get_type (void)
{
	static volatile gsize import_roll_root_type_id__once = 0;
	if (g_once_init_enter (&import_roll_root_type_id__once)) {
		GType import_roll_root_type_id;
		import_roll_root_type_id = import_roll_root_get_type_once ();
		g_once_init_leave (&import_roll_root_type_id__once, import_roll_root_type_id);
	}
	return import_roll_root_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;
}

