/* DirectView.c generated by valac 0.56.19, the Vala compiler
 * generated from DirectView.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 <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>
#include <gee.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 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;
typedef struct _DataObjectPrivate DataObjectPrivate;

#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 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_DATA_VIEW (data_view_get_type ())
#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView))
#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass))
#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW))
#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW))
#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass))

typedef struct _DataView DataView;
typedef struct _DataViewClass DataViewClass;
typedef struct _DataViewPrivate DataViewPrivate;

#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_DIRECT_VIEW (direct_view_get_type ())
#define DIRECT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_VIEW, DirectView))
#define DIRECT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_VIEW, DirectViewClass))
#define IS_DIRECT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_VIEW))
#define IS_DIRECT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_VIEW))
#define DIRECT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_VIEW, DirectViewClass))

typedef struct _DirectView DirectView;
typedef struct _DirectViewClass DirectViewClass;
typedef struct _DirectViewPrivate DirectViewPrivate;
enum  {
	DIRECT_VIEW_0_PROPERTY,
	DIRECT_VIEW_NUM_PROPERTIES
};
static GParamSpec* direct_view_properties[DIRECT_VIEW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ())
#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource))
#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))
#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE))
#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE))
#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))

typedef struct _ThumbnailSource ThumbnailSource;
typedef struct _ThumbnailSourceClass ThumbnailSourceClass;

#define TYPE_MEDIA_SOURCE (media_source_get_type ())
#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource))
#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass))
#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE))
#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE))
#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass))

typedef struct _MediaSource MediaSource;
typedef struct _MediaSourceClass MediaSourceClass;

#define TYPE_PHOTO_SOURCE (photo_source_get_type ())
#define PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_SOURCE, PhotoSource))
#define PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_SOURCE, PhotoSourceClass))
#define IS_PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_SOURCE))
#define IS_PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_SOURCE))
#define PHOTO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_SOURCE, PhotoSourceClass))

typedef struct _PhotoSource PhotoSource;
typedef struct _PhotoSourceClass PhotoSourceClass;

#define TYPE_PHOTO (photo_get_type ())
#define PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO, Photo))
#define PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO, PhotoClass))
#define IS_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO))
#define IS_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO))
#define PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO, PhotoClass))

typedef struct _Photo Photo;
typedef struct _PhotoClass PhotoClass;

#define TYPE_DIRECT_PHOTO (direct_photo_get_type ())
#define DIRECT_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_PHOTO, DirectPhoto))
#define DIRECT_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_PHOTO, DirectPhotoClass))
#define IS_DIRECT_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_PHOTO))
#define IS_DIRECT_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_PHOTO))
#define DIRECT_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_PHOTO, DirectPhotoClass))

typedef struct _DirectPhoto DirectPhoto;
typedef struct _DirectPhotoClass DirectPhotoClass;
typedef struct _DataCollectionPrivate DataCollectionPrivate;
typedef gint64 (*Comparator) (void* a, void* b, gpointer user_data);
typedef gboolean (*ComparatorPredicate) (DataObject* object, Alteration* alteration, gpointer user_data);
typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, gpointer user_data);

#define TYPE_MARKER (marker_get_type ())
#define MARKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKER, Marker))
#define IS_MARKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKER))
#define MARKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MARKER, MarkerIface))

typedef struct _Marker Marker;
typedef struct _MarkerIface MarkerIface;

#define TYPE_VIEW_COLLECTION (view_collection_get_type ())
#define VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_COLLECTION, ViewCollection))
#define VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_COLLECTION, ViewCollectionClass))
#define IS_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_COLLECTION))
#define IS_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_COLLECTION))
#define VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_COLLECTION, ViewCollectionClass))

typedef struct _ViewCollection ViewCollection;
typedef struct _ViewCollectionClass ViewCollectionClass;
typedef struct _ViewCollectionPrivate ViewCollectionPrivate;

#define TYPE_VIEW_FILTER (view_filter_get_type ())
#define VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_FILTER, ViewFilter))
#define VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_FILTER, ViewFilterClass))
#define IS_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_FILTER))
#define IS_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_FILTER))
#define VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_FILTER, ViewFilterClass))

typedef struct _ViewFilter ViewFilter;
typedef struct _ViewFilterClass ViewFilterClass;

#define TYPE_DIRECT_VIEW_COLLECTION (direct_view_collection_get_type ())
#define DIRECT_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_VIEW_COLLECTION, DirectViewCollection))
#define DIRECT_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_VIEW_COLLECTION, DirectViewCollectionClass))
#define IS_DIRECT_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_VIEW_COLLECTION))
#define IS_DIRECT_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_VIEW_COLLECTION))
#define DIRECT_VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_VIEW_COLLECTION, DirectViewCollectionClass))

typedef struct _DirectViewCollection DirectViewCollection;
typedef struct _DirectViewCollectionClass DirectViewCollectionClass;
typedef struct _DirectViewCollectionPrivate DirectViewCollectionPrivate;

#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_VIEW_MANAGER (view_manager_get_type ())
#define VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_MANAGER, ViewManager))
#define VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_MANAGER, ViewManagerClass))
#define IS_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_MANAGER))
#define IS_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_MANAGER))
#define VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_MANAGER, ViewManagerClass))

typedef struct _ViewManager ViewManager;
typedef struct _ViewManagerClass ViewManagerClass;

#define VIEW_COLLECTION_TYPE_MONITOR (view_collection_monitor_get_type ())
#define VIEW_COLLECTION_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitor))
#define VIEW_COLLECTION_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitorClass))
#define VIEW_COLLECTION_IS_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIEW_COLLECTION_TYPE_MONITOR))
#define VIEW_COLLECTION_IS_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIEW_COLLECTION_TYPE_MONITOR))
#define VIEW_COLLECTION_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitorClass))

typedef struct _ViewCollectionMonitor ViewCollectionMonitor;
typedef struct _ViewCollectionMonitorClass ViewCollectionMonitorClass;

#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_DIRECT_PHOTO_SOURCE_COLLECTION (direct_photo_source_collection_get_type ())
#define DIRECT_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollection))
#define DIRECT_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollectionClass))
#define IS_DIRECT_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION))
#define IS_DIRECT_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION))
#define DIRECT_PHOTO_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollectionClass))

typedef struct _DirectPhotoSourceCollection DirectPhotoSourceCollection;
typedef struct _DirectPhotoSourceCollectionClass DirectPhotoSourceCollectionClass;

#define DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER (direct_view_collection_direct_view_manager_get_type ())
#define DIRECT_VIEW_COLLECTION_DIRECT_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER, DirectViewCollectionDirectViewManager))
#define DIRECT_VIEW_COLLECTION_DIRECT_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER, DirectViewCollectionDirectViewManagerClass))
#define DIRECT_VIEW_COLLECTION_IS_DIRECT_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER))
#define DIRECT_VIEW_COLLECTION_IS_DIRECT_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER))
#define DIRECT_VIEW_COLLECTION_DIRECT_VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER, DirectViewCollectionDirectViewManagerClass))

typedef struct _DirectViewCollectionDirectViewManager DirectViewCollectionDirectViewManager;
typedef struct _DirectViewCollectionDirectViewManagerClass DirectViewCollectionDirectViewManagerClass;
#define _view_collection_monitor_unref0(var) ((var == NULL) ? NULL : (var = (view_collection_monitor_unref (var), NULL)))
#define _view_manager_unref0(var) ((var == NULL) ? NULL : (var = (view_manager_unref (var), NULL)))
typedef struct _ViewManagerPrivate ViewManagerPrivate;
typedef struct _DirectViewCollectionDirectViewManagerPrivate DirectViewCollectionDirectViewManagerPrivate;

struct _DataObject {
	GObject parent_instance;
	DataObjectPrivate * priv;
};

struct _DataObjectClass {
	GObjectClass parent_class;
	void (*notify_altered) (DataObject* self, Alteration* alteration);
	void (*notify_membership_changed) (DataObject* self, DataCollection* collection);
	void (*notify_collection_property_set) (DataObject* self, const gchar* name, GValue* old, GValue* val);
	void (*notify_collection_property_cleared) (DataObject* self, const gchar* name);
	gchar* (*get_name) (DataObject* self);
	gchar* (*to_string) (DataObject* self);
};

struct _DataView {
	DataObject parent_instance;
	DataViewPrivate * priv;
};

struct _DataViewClass {
	DataObjectClass parent_class;
	void (*notify_view_altered) (DataView* self);
	void (*notify_geometry_altered) (DataView* self);
	void (*notify_unsubscribed) (DataView* self, DataSource* source);
	void (*state_changed) (DataView* self, gboolean selected);
	void (*visibility_changed) (DataView* self, gboolean visible);
	void (*view_altered) (DataView* self);
	void (*geometry_altered) (DataView* self);
	void (*unsubscribed) (DataView* self, DataSource* source);
};

struct _DirectView {
	DataView parent_instance;
	DirectViewPrivate * priv;
};

struct _DirectViewClass {
	DataViewClass parent_class;
};

struct _DirectViewPrivate {
	GFile* file;
	gchar* collate_key;
};

struct _MarkerIface {
	GTypeInterface parent_iface;
	void (*mark) (Marker* self, DataObject* object);
	void (*unmark) (Marker* self, DataObject* object);
	gboolean (*toggle) (Marker* self, DataObject* object);
	void (*mark_many) (Marker* self, GeeCollection* list);
	void (*unmark_many) (Marker* self, GeeCollection* list);
	void (*mark_all) (Marker* self);
	gint (*get_count) (Marker* self);
	GeeCollection* (*get_all) (Marker* self);
};

struct _DataCollection {
	GTypeInstance parent_instance;
	volatile int ref_count;
	DataCollectionPrivate * priv;
};

struct _DataCollectionClass {
	GTypeClass parent_class;
	void (*finalize) (DataCollection *self);
	gchar* (*to_string) (DataCollection* self);
	void (*notify_items_added) (DataCollection* self, GeeIterable* added);
	void (*notify_items_removed) (DataCollection* self, GeeIterable* removed);
	void (*notify_contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed);
	void (*notify_items_altered) (DataCollection* self, GeeMap* items);
	void (*notify_ordering_changed) (DataCollection* self);
	void (*notify_property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val);
	void (*notify_property_cleared) (DataCollection* self, const gchar* name);
	gboolean (*valid_type) (DataCollection* self, DataObject* object);
	void (*set_comparator) (DataCollection* self, Comparator comparator, gpointer comparator_target, ComparatorPredicate predicate, gpointer predicate_target);
	void (*reset_comparator) (DataCollection* self);
	GeeCollection* (*get_all) (DataCollection* self);
	gint (*get_count) (DataCollection* self);
	DataObject* (*get_at) (DataCollection* self, gint index);
	gint (*index_of) (DataCollection* self, DataObject* object);
	gboolean (*contains) (DataCollection* self, DataObject* object);
	gboolean (*add) (DataCollection* self, DataObject* object);
	GeeCollection* (*add_many) (DataCollection* self, GeeCollection* objects, ProgressMonitor monitor, gpointer monitor_target);
	void (*remove_marked) (DataCollection* self, Marker* m);
	void (*clear) (DataCollection* self);
	void (*close) (DataCollection* self);
	void (*notify_frozen) (DataCollection* self);
	void (*notify_thawed) (DataCollection* self);
	void (*items_added) (DataCollection* self, GeeIterable* added);
	void (*items_removed) (DataCollection* self, GeeIterable* removed);
	void (*contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed);
	void (*items_altered) (DataCollection* self, GeeMap* items);
	void (*ordering_changed) (DataCollection* self);
	void (*property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val);
	void (*property_cleared) (DataCollection* self, const gchar* name);
	void (*frozen) (DataCollection* self);
	void (*thawed) (DataCollection* self);
};

struct _ViewCollection {
	DataCollection parent_instance;
	ViewCollectionPrivate * priv;
};

struct _ViewCollectionClass {
	DataCollectionClass parent_class;
	void (*notify_items_selected_unselected) (ViewCollection* self, GeeCollection* selected, GeeCollection* unselected);
	void (*notify_selection_group_altered) (ViewCollection* self);
	void (*notify_item_view_altered) (ViewCollection* self, DataView* view);
	void (*notify_views_altered) (ViewCollection* self, GeeCollection* views);
	void (*notify_item_geometry_altered) (ViewCollection* self, DataView* view);
	void (*notify_geometries_altered) (ViewCollection* self, GeeCollection* views);
	void (*notify_items_shown) (ViewCollection* self, GeeCollection* shown);
	void (*notify_items_hidden) (ViewCollection* self, GeeCollection* hidden);
	void (*notify_items_visibility_changed) (ViewCollection* self, GeeCollection* changed);
	void (*notify_view_filter_installed) (ViewCollection* self, ViewFilter* filter);
	void (*notify_view_filter_removed) (ViewCollection* self, ViewFilter* filter);
	DataView* (*get_first) (ViewCollection* self);
	DataView* (*get_first_unrejected) (ViewCollection* self);
	DataView* (*get_first_photo) (ViewCollection* self);
	DataView* (*get_last) (ViewCollection* self);
	DataView* (*get_next) (ViewCollection* self, DataView* view, gboolean** wrapped);
	DataView* (*get_previous) (ViewCollection* self, DataView* view);
	void (*items_selected) (ViewCollection* self, GeeIterable* selected);
	void (*items_unselected) (ViewCollection* self, GeeIterable* unselected);
	void (*items_state_changed) (ViewCollection* self, GeeIterable* changed);
	void (*selection_group_altered) (ViewCollection* self);
	void (*items_shown) (ViewCollection* self, GeeCollection* visible);
	void (*items_hidden) (ViewCollection* self, GeeCollection* hidden);
	void (*items_visibility_changed) (ViewCollection* self, GeeCollection* changed);
	void (*item_view_altered) (ViewCollection* self, DataView* view);
	void (*item_geometry_altered) (ViewCollection* self, DataView* view);
	void (*views_altered) (ViewCollection* self, GeeCollection* views);
	void (*geometries_altered) (ViewCollection* self, GeeCollection* views);
	void (*view_filter_installed) (ViewCollection* self, ViewFilter* filer);
	void (*view_filter_removed) (ViewCollection* self, ViewFilter* filer);
};

struct _DirectViewCollection {
	ViewCollection parent_instance;
	DirectViewCollectionPrivate * priv;
};

struct _DirectViewCollectionClass {
	ViewCollectionClass parent_class;
};

struct _ViewManager {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ViewManagerPrivate * priv;
};

struct _ViewManagerClass {
	GTypeClass parent_class;
	void (*finalize) (ViewManager *self);
	gboolean (*include_in_view) (ViewManager* self, DataSource* source);
	DataView* (*create_view) (ViewManager* self, DataSource* source);
};

struct _DirectViewCollectionDirectViewManager {
	ViewManager parent_instance;
	DirectViewCollectionDirectViewManagerPrivate * priv;
};

struct _DirectViewCollectionDirectViewManagerClass {
	ViewManagerClass parent_class;
};

static gint DirectView_private_offset;
static gpointer direct_view_parent_class = NULL;
static gpointer direct_view_collection_parent_class = NULL;
VALA_EXTERN DirectPhotoSourceCollection* direct_photo_global;
static gpointer direct_view_collection_direct_view_manager_parent_class = NULL;

VALA_EXTERN GType data_object_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataObject, g_object_unref)
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)
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 data_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataView, 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 direct_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DirectView, g_object_unref)
VALA_EXTERN GType thumbnail_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ThumbnailSource, g_object_unref)
VALA_EXTERN GType media_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MediaSource, g_object_unref)
VALA_EXTERN GType photo_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PhotoSource, g_object_unref)
VALA_EXTERN GType photo_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Photo, g_object_unref)
VALA_EXTERN GType direct_photo_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DirectPhoto, g_object_unref)
VALA_EXTERN DirectView* direct_view_new (DirectPhoto* source);
VALA_EXTERN DirectView* direct_view_construct (GType object_type,
                                   DirectPhoto* source);
VALA_EXTERN DataView* data_view_new (DataSource* source);
VALA_EXTERN DataView* data_view_construct (GType object_type,
                               DataSource* source);
VALA_EXTERN GFile* media_source_get_file (MediaSource* self);
VALA_EXTERN GFile* direct_view_get_file (DirectView* self);
VALA_EXTERN gchar* direct_view_get_collate_key (DirectView* self);
static void direct_view_finalize (GObject * obj);
static GType direct_view_get_type_once (void);
VALA_EXTERN GType marker_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Marker, g_object_unref)
VALA_EXTERN GType view_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ViewCollection, data_collection_unref)
VALA_EXTERN gpointer view_filter_ref (gpointer instance);
VALA_EXTERN void view_filter_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_view_filter (const gchar* name,
                                    const gchar* nick,
                                    const gchar* blurb,
                                    GType object_type,
                                    GParamFlags flags);
VALA_EXTERN void value_set_view_filter (GValue* value,
                            gpointer v_object);
VALA_EXTERN void value_take_view_filter (GValue* value,
                             gpointer v_object);
VALA_EXTERN gpointer value_get_view_filter (const GValue* value);
VALA_EXTERN GType view_filter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ViewFilter, view_filter_unref)
VALA_EXTERN GType direct_view_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DirectViewCollection, data_collection_unref)
VALA_EXTERN DirectViewCollection* direct_view_collection_new (void);
VALA_EXTERN DirectViewCollection* direct_view_collection_construct (GType object_type);
VALA_EXTERN ViewCollection* view_collection_new (const gchar* name);
VALA_EXTERN ViewCollection* view_collection_construct (GType object_type,
                                           const gchar* name);
VALA_EXTERN void data_collection_set_comparator (DataCollection* self,
                                     Comparator comparator,
                                     gpointer comparator_target,
                                     ComparatorPredicate predicate,
                                     gpointer predicate_target);
static gint64 direct_view_collection_filename_comparator (void* a,
                                                   void* b);
static gint64 _direct_view_collection_filename_comparator_comparator (void* a,
                                                               void* b,
                                                               gpointer self);
VALA_EXTERN GType source_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SourceCollection, data_collection_unref)
VALA_EXTERN gpointer view_manager_ref (gpointer instance);
VALA_EXTERN void view_manager_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_view_manager (const gchar* name,
                                     const gchar* nick,
                                     const gchar* blurb,
                                     GType object_type,
                                     GParamFlags flags);
VALA_EXTERN void value_set_view_manager (GValue* value,
                             gpointer v_object);
VALA_EXTERN void value_take_view_manager (GValue* value,
                              gpointer v_object);
VALA_EXTERN gpointer value_get_view_manager (const GValue* value);
VALA_EXTERN GType view_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ViewManager, view_manager_unref)
VALA_EXTERN gpointer view_collection_monitor_ref (gpointer instance);
VALA_EXTERN void view_collection_monitor_unref (gpointer instance);
VALA_EXTERN GParamSpec* view_collection_param_spec_monitor (const gchar* name,
                                                const gchar* nick,
                                                const gchar* blurb,
                                                GType object_type,
                                                GParamFlags flags);
VALA_EXTERN void view_collection_value_set_monitor (GValue* value,
                                        gpointer v_object);
VALA_EXTERN void view_collection_value_take_monitor (GValue* value,
                                         gpointer v_object);
VALA_EXTERN gpointer view_collection_value_get_monitor (const GValue* value);
VALA_EXTERN GType view_collection_monitor_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ViewCollectionMonitor, view_collection_monitor_unref)
VALA_EXTERN ViewCollectionMonitor* view_collection_monitor_source_collection (ViewCollection* self,
                                                                  SourceCollection* sources,
                                                                  ViewManager* manager,
                                                                  Alteration* prereq,
                                                                  GeeCollection* initial,
                                                                  ProgressMonitor progress_monitor,
                                                                  gpointer progress_monitor_target);
VALA_EXTERN GType database_source_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DatabaseSourceCollection, data_collection_unref)
VALA_EXTERN GType direct_photo_source_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DirectPhotoSourceCollection, data_collection_unref)
static DirectViewCollectionDirectViewManager* direct_view_collection_direct_view_manager_new (void);
static DirectViewCollectionDirectViewManager* direct_view_collection_direct_view_manager_construct (GType object_type);
static GType direct_view_collection_direct_view_manager_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DirectViewCollectionDirectViewManager, view_manager_unref)
VALA_EXTERN DataView* view_manager_create_view (ViewManager* self,
                                    DataSource* source);
static DataView* direct_view_collection_direct_view_manager_real_create_view (ViewManager* base,
                                                                       DataSource* source);
VALA_EXTERN ViewManager* view_manager_construct (GType object_type);
static GType direct_view_collection_direct_view_manager_get_type_once (void);
static GType direct_view_collection_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
direct_view_get_instance_private (DirectView* self)
{
	return G_STRUCT_MEMBER_P (self, DirectView_private_offset);
}

DirectView*
direct_view_construct (GType object_type,
                       DirectPhoto* source)
{
	DirectView * self = NULL;
	GFile* _tmp0_;
	g_return_val_if_fail (IS_DIRECT_PHOTO (source), NULL);
	self = (DirectView*) data_view_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource));
	_tmp0_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_PHOTO, Photo), TYPE_MEDIA_SOURCE, MediaSource));
	_g_object_unref0 (self->priv->file);
	self->priv->file = _tmp0_;
	return self;
}

DirectView*
direct_view_new (DirectPhoto* source)
{
	return direct_view_construct (TYPE_DIRECT_VIEW, source);
}

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

GFile*
direct_view_get_file (DirectView* self)
{
	GFile* _tmp0_;
	GFile* _tmp1_;
	GFile* result;
	g_return_val_if_fail (IS_DIRECT_VIEW (self), NULL);
	_tmp0_ = self->priv->file;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

gchar*
direct_view_get_collate_key (DirectView* self)
{
	const gchar* _tmp0_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* result;
	g_return_val_if_fail (IS_DIRECT_VIEW (self), NULL);
	_tmp0_ = self->priv->collate_key;
	if (_tmp0_ == NULL) {
		GFile* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		_tmp1_ = self->priv->file;
		_tmp2_ = g_file_get_basename (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = g_utf8_collate_key_for_filename (_tmp3_, (gssize) -1);
		_g_free0 (self->priv->collate_key);
		self->priv->collate_key = _tmp4_;
		_g_free0 (_tmp3_);
	}
	_tmp5_ = self->priv->collate_key;
	_tmp6_ = g_strdup (_tmp5_);
	result = _tmp6_;
	return result;
}

static void
direct_view_class_init (DirectViewClass * klass,
                        gpointer klass_data)
{
	direct_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DirectView_private_offset);
	G_OBJECT_CLASS (klass)->finalize = direct_view_finalize;
}

static void
direct_view_instance_init (DirectView * self,
                           gpointer klass)
{
	self->priv = direct_view_get_instance_private (self);
	self->priv->collate_key = NULL;
}

static void
direct_view_finalize (GObject * obj)
{
	DirectView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DIRECT_VIEW, DirectView);
	_g_object_unref0 (self->priv->file);
	_g_free0 (self->priv->collate_key);
	G_OBJECT_CLASS (direct_view_parent_class)->finalize (obj);
}

static GType
direct_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DirectViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) direct_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DirectView), 0, (GInstanceInitFunc) direct_view_instance_init, NULL };
	GType direct_view_type_id;
	direct_view_type_id = g_type_register_static (TYPE_DATA_VIEW, "DirectView", &g_define_type_info, 0);
	DirectView_private_offset = g_type_add_instance_private (direct_view_type_id, sizeof (DirectViewPrivate));
	return direct_view_type_id;
}

GType
direct_view_get_type (void)
{
	static volatile gsize direct_view_type_id__once = 0;
	if (g_once_init_enter (&direct_view_type_id__once)) {
		GType direct_view_type_id;
		direct_view_type_id = direct_view_get_type_once ();
		g_once_init_leave (&direct_view_type_id__once, direct_view_type_id);
	}
	return direct_view_type_id__once;
}

static gint64
_direct_view_collection_filename_comparator_comparator (void* a,
                                                        void* b,
                                                        gpointer self)
{
	gint64 result;
	result = direct_view_collection_filename_comparator (a, b);
	return result;
}

DirectViewCollection*
direct_view_collection_construct (GType object_type)
{
	DirectViewCollection* self = NULL;
	DirectPhotoSourceCollection* _tmp0_;
	DirectViewCollectionDirectViewManager* _tmp1_;
	DirectViewCollectionDirectViewManager* _tmp2_;
	ViewCollectionMonitor* _tmp3_;
	ViewCollectionMonitor* _tmp4_;
	self = (DirectViewCollection*) view_collection_construct (object_type, "DirectViewCollection");
	data_collection_set_comparator (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), _direct_view_collection_filename_comparator_comparator, NULL, NULL, NULL);
	_tmp0_ = direct_photo_global;
	_tmp1_ = direct_view_collection_direct_view_manager_new ();
	_tmp2_ = _tmp1_;
	_tmp3_ = view_collection_monitor_source_collection (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_VIEW_COLLECTION, ViewCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_VIEW_MANAGER, ViewManager), NULL, NULL, NULL, NULL);
	_tmp4_ = _tmp3_;
	_view_collection_monitor_unref0 (_tmp4_);
	_view_manager_unref0 (_tmp2_);
	return self;
}

DirectViewCollection*
direct_view_collection_new (void)
{
	return direct_view_collection_construct (TYPE_DIRECT_VIEW_COLLECTION);
}

static gint64
direct_view_collection_filename_comparator (void* a,
                                            void* b)
{
	DirectView* aview = NULL;
	DirectView* bview = NULL;
	GCompareFunc _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gint64 _tmp5_;
	gint64 result;
	aview = (DirectView*) a;
	bview = (DirectView*) b;
	_tmp0_ = ((GCompareFunc) g_strcmp0);
	_tmp1_ = direct_view_get_collate_key (G_TYPE_CHECK_INSTANCE_CAST (aview, TYPE_DIRECT_VIEW, DirectView));
	_tmp2_ = _tmp1_;
	_tmp3_ = direct_view_get_collate_key (G_TYPE_CHECK_INSTANCE_CAST (bview, TYPE_DIRECT_VIEW, DirectView));
	_tmp4_ = _tmp3_;
	_tmp5_ = (gint64) _tmp0_ (_tmp2_, _tmp4_);
	_g_free0 (_tmp4_);
	_g_free0 (_tmp2_);
	result = _tmp5_;
	return result;
}

static DataView*
direct_view_collection_direct_view_manager_real_create_view (ViewManager* base,
                                                             DataSource* source)
{
	DirectViewCollectionDirectViewManager * self;
	DirectView* _tmp0_;
	DataView* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER, DirectViewCollectionDirectViewManager);
	g_return_val_if_fail (IS_DATA_SOURCE (source), NULL);
	_tmp0_ = direct_view_new (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DIRECT_PHOTO, DirectPhoto));
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_VIEW, DataView);
	return result;
}

static DirectViewCollectionDirectViewManager*
direct_view_collection_direct_view_manager_construct (GType object_type)
{
	DirectViewCollectionDirectViewManager* self = NULL;
	self = (DirectViewCollectionDirectViewManager*) view_manager_construct (object_type);
	return self;
}

static DirectViewCollectionDirectViewManager*
direct_view_collection_direct_view_manager_new (void)
{
	return direct_view_collection_direct_view_manager_construct (DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER);
}

static void
direct_view_collection_direct_view_manager_class_init (DirectViewCollectionDirectViewManagerClass * klass,
                                                       gpointer klass_data)
{
	direct_view_collection_direct_view_manager_parent_class = g_type_class_peek_parent (klass);
	((ViewManagerClass *) klass)->create_view = (DataView* (*) (ViewManager*, DataSource*)) direct_view_collection_direct_view_manager_real_create_view;
}

static void
direct_view_collection_direct_view_manager_instance_init (DirectViewCollectionDirectViewManager * self,
                                                          gpointer klass)
{
}

static GType
direct_view_collection_direct_view_manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DirectViewCollectionDirectViewManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) direct_view_collection_direct_view_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DirectViewCollectionDirectViewManager), 0, (GInstanceInitFunc) direct_view_collection_direct_view_manager_instance_init, NULL };
	GType direct_view_collection_direct_view_manager_type_id;
	direct_view_collection_direct_view_manager_type_id = g_type_register_static (TYPE_VIEW_MANAGER, "DirectViewCollectionDirectViewManager", &g_define_type_info, 0);
	return direct_view_collection_direct_view_manager_type_id;
}

static GType
direct_view_collection_direct_view_manager_get_type (void)
{
	static volatile gsize direct_view_collection_direct_view_manager_type_id__once = 0;
	if (g_once_init_enter (&direct_view_collection_direct_view_manager_type_id__once)) {
		GType direct_view_collection_direct_view_manager_type_id;
		direct_view_collection_direct_view_manager_type_id = direct_view_collection_direct_view_manager_get_type_once ();
		g_once_init_leave (&direct_view_collection_direct_view_manager_type_id__once, direct_view_collection_direct_view_manager_type_id);
	}
	return direct_view_collection_direct_view_manager_type_id__once;
}

static void
direct_view_collection_class_init (DirectViewCollectionClass * klass,
                                   gpointer klass_data)
{
	direct_view_collection_parent_class = g_type_class_peek_parent (klass);
}

static void
direct_view_collection_instance_init (DirectViewCollection * self,
                                      gpointer klass)
{
}

static GType
direct_view_collection_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DirectViewCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) direct_view_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DirectViewCollection), 0, (GInstanceInitFunc) direct_view_collection_instance_init, NULL };
	GType direct_view_collection_type_id;
	direct_view_collection_type_id = g_type_register_static (TYPE_VIEW_COLLECTION, "DirectViewCollection", &g_define_type_info, 0);
	return direct_view_collection_type_id;
}

GType
direct_view_collection_get_type (void)
{
	static volatile gsize direct_view_collection_type_id__once = 0;
	if (g_once_init_enter (&direct_view_collection_type_id__once)) {
		GType direct_view_collection_type_id;
		direct_view_collection_type_id = direct_view_collection_get_type_once ();
		g_once_init_leave (&direct_view_collection_type_id__once, direct_view_collection_type_id);
	}
	return direct_view_collection_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;
}

