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

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

#include <glib-object.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <gee.h>
#include <gdk/gdk.h>
#include <float.h>
#include <math.h>
#include <glib/gi18n-lib.h>
#include "shotwell-graphics-processor.h"

#define COLLECTION_PAGE_DESKTOP_SLIDESHOW_TRANSITION_SEC 2.0
#define RESOURCES_SET_BACKGROUND_MENU _ ("Set as _Desktop Background")
#define RESOURCES_SET_BACKGROUND_SLIDESHOW_MENU _ ("Set as _Desktop Slideshow…")
#define RESOURCES_ROTATE_CW_FULL_LABEL _ ("Rotate Right")
#define RESOURCES_ROTATE_CW_TOOLTIP _ ("Rotate the photos right (press Ctrl to rotate left)")
#define RESOURCES_ROTATE_CCW_FULL_LABEL _ ("Rotate Left")
#define RESOURCES_ROTATE_CCW_TOOLTIP _ ("Rotate the photos left")
#define RESOURCES_HFLIP_LABEL _ ("Flip Horizontally")
#define RESOURCES_VFLIP_LABEL _ ("Flip Vertically")
#define RESOURCES_PASTE_ADJUSTMENTS_LABEL _ ("Paste Color Adjustments")
#define RESOURCES_PASTE_ADJUSTMENTS_TOOLTIP _ ("Apply copied color adjustments to the selected photos")
#define RESOURCES_COUNTERCLOCKWISE "object-rotate-left-symbolic"
#define RESOURCES_CLOCKWISE "object-rotate-right-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 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;
typedef struct _ViewManagerPrivate ViewManagerPrivate;

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

#define TYPE_COLLECTION_VIEW_MANAGER (collection_view_manager_get_type ())
#define COLLECTION_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_VIEW_MANAGER, CollectionViewManager))
#define COLLECTION_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_VIEW_MANAGER, CollectionViewManagerClass))
#define IS_COLLECTION_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_VIEW_MANAGER))
#define IS_COLLECTION_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_VIEW_MANAGER))
#define COLLECTION_VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_VIEW_MANAGER, CollectionViewManagerClass))

typedef struct _CollectionViewManager CollectionViewManager;
typedef struct _CollectionViewManagerClass CollectionViewManagerClass;
typedef struct _CollectionViewManagerPrivate CollectionViewManagerPrivate;

#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 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 _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _PagePrivate PagePrivate;

#define TYPE_PAGE_WINDOW (page_window_get_type ())
#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow))
#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass))
#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW))
#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW))
#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass))

typedef struct _PageWindow PageWindow;
typedef struct _PageWindowClass PageWindowClass;

#define TYPE_FULLSCREEN_WINDOW (fullscreen_window_get_type ())
#define FULLSCREEN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FULLSCREEN_WINDOW, FullscreenWindow))
#define FULLSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FULLSCREEN_WINDOW, FullscreenWindowClass))
#define IS_FULLSCREEN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FULLSCREEN_WINDOW))
#define IS_FULLSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FULLSCREEN_WINDOW))
#define FULLSCREEN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FULLSCREEN_WINDOW, FullscreenWindowClass))

typedef struct _FullscreenWindow FullscreenWindow;
typedef struct _FullscreenWindowClass FullscreenWindowClass;

#define TYPE_INJECTION_GROUP (injection_group_get_type ())
#define INJECTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INJECTION_GROUP, InjectionGroup))
#define INJECTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_INJECTION_GROUP, InjectionGroupClass))
#define IS_INJECTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INJECTION_GROUP))
#define IS_INJECTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_INJECTION_GROUP))
#define INJECTION_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_INJECTION_GROUP, InjectionGroupClass))

typedef struct _InjectionGroup InjectionGroup;
typedef struct _InjectionGroupClass InjectionGroupClass;
typedef struct _CheckerboardPagePrivate CheckerboardPagePrivate;

#define TYPE_THUMBNAIL_VIEW (thumbnail_view_get_type ())
#define THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailView))
#define THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass))
#define IS_THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_VIEW))
#define IS_THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_VIEW))
#define THUMBNAIL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass))

typedef struct _ThumbnailView ThumbnailView;
typedef struct _ThumbnailViewClass ThumbnailViewClass;

#define TYPE_CHECKERBOARD_ITEM (checkerboard_item_get_type ())
#define CHECKERBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_ITEM, CheckerboardItem))
#define CHECKERBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_ITEM, CheckerboardItemClass))
#define IS_CHECKERBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_ITEM))
#define IS_CHECKERBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_ITEM))
#define CHECKERBOARD_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_ITEM, CheckerboardItemClass))

typedef struct _CheckerboardItem CheckerboardItem;
typedef struct _CheckerboardItemClass CheckerboardItemClass;
typedef enum  {
	CHECKERBOARD_PAGE_ACTIVATOR_KEYBOARD,
	CHECKERBOARD_PAGE_ACTIVATOR_MOUSE
} CheckerboardPageActivator;

#define CHECKERBOARD_PAGE_TYPE_ACTIVATOR (checkerboard_page_activator_get_type ())

#define CHECKERBOARD_PAGE_TYPE_KEYBOARD_MODIFIERS (checkerboard_page_keyboard_modifiers_get_type ())
typedef struct _CheckerboardPageKeyboardModifiers CheckerboardPageKeyboardModifiers;

#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_SEARCH_VIEW_FILTER (search_view_filter_get_type ())
#define SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEARCH_VIEW_FILTER, SearchViewFilter))
#define SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEARCH_VIEW_FILTER, SearchViewFilterClass))
#define IS_SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEARCH_VIEW_FILTER))
#define IS_SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEARCH_VIEW_FILTER))
#define SEARCH_VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEARCH_VIEW_FILTER, SearchViewFilterClass))

typedef struct _SearchViewFilter SearchViewFilter;
typedef struct _SearchViewFilterClass SearchViewFilterClass;

#define CORE_TYPE_TRACKER (core_tracker_get_type ())
#define CORE_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CORE_TYPE_TRACKER, CoreTracker))
#define CORE_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CORE_TYPE_TRACKER, CoreTrackerClass))
#define CORE_IS_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CORE_TYPE_TRACKER))
#define CORE_IS_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CORE_TYPE_TRACKER))
#define CORE_TRACKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CORE_TYPE_TRACKER, CoreTrackerClass))

typedef struct _CoreTracker CoreTracker;
typedef struct _CoreTrackerClass CoreTrackerClass;

#define CORE_TYPE_VIEW_TRACKER (core_view_tracker_get_type ())
#define CORE_VIEW_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CORE_TYPE_VIEW_TRACKER, CoreViewTracker))
#define CORE_VIEW_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CORE_TYPE_VIEW_TRACKER, CoreViewTrackerClass))
#define CORE_IS_VIEW_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CORE_TYPE_VIEW_TRACKER))
#define CORE_IS_VIEW_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CORE_TYPE_VIEW_TRACKER))
#define CORE_VIEW_TRACKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CORE_TYPE_VIEW_TRACKER, CoreViewTrackerClass))

typedef struct _CoreViewTracker CoreViewTracker;
typedef struct _CoreViewTrackerClass CoreViewTrackerClass;
typedef struct _MediaPagePrivate MediaPagePrivate;
typedef enum  {
	RATING_REJECTED = -1,
	RATING_UNRATED = 0,
	RATING_ONE = 1,
	RATING_TWO = 2,
	RATING_THREE = 3,
	RATING_FOUR = 4,
	RATING_FIVE = 5
} Rating;

#define TYPE_RATING (rating_get_type ())
typedef enum  {
	RAW_DEVELOPER_SHOTWELL = 0,
	RAW_DEVELOPER_CAMERA,
	RAW_DEVELOPER_EMBEDDED
} RawDeveloper;

#define TYPE_RAW_DEVELOPER (raw_developer_get_type ())
typedef struct _CollectionPagePrivate CollectionPagePrivate;

#define TYPE_EXPORTER_UI (exporter_ui_get_type ())
#define EXPORTER_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPORTER_UI, ExporterUI))
#define EXPORTER_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPORTER_UI, ExporterUIClass))
#define IS_EXPORTER_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPORTER_UI))
#define IS_EXPORTER_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPORTER_UI))
#define EXPORTER_UI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPORTER_UI, ExporterUIClass))

typedef struct _ExporterUI ExporterUI;
typedef struct _ExporterUIClass ExporterUIClass;

#define TYPE_DEFAULT_SEARCH_VIEW_FILTER (default_search_view_filter_get_type ())
#define DEFAULT_SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DEFAULT_SEARCH_VIEW_FILTER, DefaultSearchViewFilter))
#define DEFAULT_SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DEFAULT_SEARCH_VIEW_FILTER, DefaultSearchViewFilterClass))
#define IS_DEFAULT_SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DEFAULT_SEARCH_VIEW_FILTER))
#define IS_DEFAULT_SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DEFAULT_SEARCH_VIEW_FILTER))
#define DEFAULT_SEARCH_VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DEFAULT_SEARCH_VIEW_FILTER, DefaultSearchViewFilterClass))

typedef struct _DefaultSearchViewFilter DefaultSearchViewFilter;
typedef struct _DefaultSearchViewFilterClass DefaultSearchViewFilterClass;

#define COLLECTION_PAGE_TYPE_COLLECTION_SEARCH_VIEW_FILTER (collection_page_collection_search_view_filter_get_type ())
#define COLLECTION_PAGE_COLLECTION_SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), COLLECTION_PAGE_TYPE_COLLECTION_SEARCH_VIEW_FILTER, CollectionPageCollectionSearchViewFilter))
#define COLLECTION_PAGE_COLLECTION_SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), COLLECTION_PAGE_TYPE_COLLECTION_SEARCH_VIEW_FILTER, CollectionPageCollectionSearchViewFilterClass))
#define COLLECTION_PAGE_IS_COLLECTION_SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), COLLECTION_PAGE_TYPE_COLLECTION_SEARCH_VIEW_FILTER))
#define COLLECTION_PAGE_IS_COLLECTION_SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), COLLECTION_PAGE_TYPE_COLLECTION_SEARCH_VIEW_FILTER))
#define COLLECTION_PAGE_COLLECTION_SEARCH_VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), COLLECTION_PAGE_TYPE_COLLECTION_SEARCH_VIEW_FILTER, CollectionPageCollectionSearchViewFilterClass))

typedef struct _CollectionPageCollectionSearchViewFilter CollectionPageCollectionSearchViewFilter;
typedef struct _CollectionPageCollectionSearchViewFilterClass CollectionPageCollectionSearchViewFilterClass;
enum  {
	COLLECTION_PAGE_0_PROPERTY,
	COLLECTION_PAGE_NUM_PROPERTIES
};
static GParamSpec* collection_page_properties[COLLECTION_PAGE_NUM_PROPERTIES];
typedef void (*GSimpleActionActivateCallback) (GSimpleAction* action, GVariant* parameter, gpointer user_data);
#define _exporter_ui_unref0(var) ((var == NULL) ? NULL : (var = (exporter_ui_unref (var), NULL)))
#define _view_filter_unref0(var) ((var == NULL) ? NULL : (var = (view_filter_unref (var), NULL)))

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

#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 _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL)))

#define TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ())
#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade))
#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))
#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE))
#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE))
#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))

typedef struct _ConfigurationFacade ConfigurationFacade;
typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass;

#define CONFIG_TYPE_FACADE (config_facade_get_type ())
#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade))
#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass))
#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE))
#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE))
#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass))

typedef struct _ConfigFacade ConfigFacade;
typedef struct _ConfigFacadeClass ConfigFacadeClass;

#define MEDIA_PAGE_TYPE_ZOOM_SLIDER_ASSEMBLY (media_page_zoom_slider_assembly_get_type ())
#define MEDIA_PAGE_ZOOM_SLIDER_ASSEMBLY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MEDIA_PAGE_TYPE_ZOOM_SLIDER_ASSEMBLY, MediaPageZoomSliderAssembly))
#define MEDIA_PAGE_ZOOM_SLIDER_ASSEMBLY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MEDIA_PAGE_TYPE_ZOOM_SLIDER_ASSEMBLY, MediaPageZoomSliderAssemblyClass))
#define MEDIA_PAGE_IS_ZOOM_SLIDER_ASSEMBLY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MEDIA_PAGE_TYPE_ZOOM_SLIDER_ASSEMBLY))
#define MEDIA_PAGE_IS_ZOOM_SLIDER_ASSEMBLY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MEDIA_PAGE_TYPE_ZOOM_SLIDER_ASSEMBLY))
#define MEDIA_PAGE_ZOOM_SLIDER_ASSEMBLY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MEDIA_PAGE_TYPE_ZOOM_SLIDER_ASSEMBLY, MediaPageZoomSliderAssemblyClass))

typedef struct _MediaPageZoomSliderAssembly MediaPageZoomSliderAssembly;
typedef struct _MediaPageZoomSliderAssemblyClass MediaPageZoomSliderAssemblyClass;

#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_APP_WINDOW (app_window_get_type ())
#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow))
#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass))
#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW))
#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW))
#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass))

typedef struct _AppWindow AppWindow;
typedef struct _AppWindowClass AppWindowClass;

#define TYPE_VIDEO_SOURCE (video_source_get_type ())
#define VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_SOURCE, VideoSource))
#define VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_SOURCE, VideoSourceClass))
#define IS_VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_SOURCE))
#define IS_VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_SOURCE))
#define VIDEO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_SOURCE, VideoSourceClass))

typedef struct _VideoSource VideoSource;
typedef struct _VideoSourceClass VideoSourceClass;

#define TYPE_VIDEO (video_get_type ())
#define VIDEO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO, Video))
#define VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO, VideoClass))
#define IS_VIDEO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO))
#define IS_VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO))
#define VIDEO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO, VideoClass))

typedef struct _Video Video;
typedef struct _VideoClass VideoClass;
#define _g_free0(var) (var = (g_free (var), NULL))

#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;
typedef enum  {
	PHOTO_FILE_FORMAT_JFIF,
	PHOTO_FILE_FORMAT_RAW,
	PHOTO_FILE_FORMAT_PNG,
	PHOTO_FILE_FORMAT_TIFF,
	PHOTO_FILE_FORMAT_BMP,
	PHOTO_FILE_FORMAT_GIF,
	PHOTO_FILE_FORMAT_WEBP,
	PHOTO_FILE_FORMAT_AVIF,
	PHOTO_FILE_FORMAT_HEIF,
	PHOTO_FILE_FORMAT_JPEGXL,
	PHOTO_FILE_FORMAT_UNKNOWN
} PhotoFileFormat;

#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())
#define _alteration_unref0(var) ((var == NULL) ? NULL : (var = (alteration_unref (var), NULL)))

#define TYPE_LIBRARY_PHOTO (library_photo_get_type ())
#define LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO, LibraryPhoto))
#define LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))
#define IS_LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO))
#define IS_LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO))
#define LIBRARY_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))

typedef struct _LibraryPhoto LibraryPhoto;
typedef struct _LibraryPhotoClass LibraryPhotoClass;

#define TYPE_PRINT_MANAGER (print_manager_get_type ())
#define PRINT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PRINT_MANAGER, PrintManager))
#define PRINT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PRINT_MANAGER, PrintManagerClass))
#define IS_PRINT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PRINT_MANAGER))
#define IS_PRINT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PRINT_MANAGER))
#define PRINT_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PRINT_MANAGER, PrintManagerClass))

typedef struct _PrintManager PrintManager;
typedef struct _PrintManagerClass PrintManagerClass;
#define _print_manager_unref0(var) ((var == NULL) ? NULL : (var = (print_manager_unref (var), NULL)))

#define TYPE_MEDIA_SOURCE_ITEM (media_source_item_get_type ())
#define MEDIA_SOURCE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_ITEM, MediaSourceItem))
#define MEDIA_SOURCE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_ITEM, MediaSourceItemClass))
#define IS_MEDIA_SOURCE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_ITEM))
#define IS_MEDIA_SOURCE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_ITEM))
#define MEDIA_SOURCE_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_ITEM, MediaSourceItemClass))

typedef struct _MediaSourceItem MediaSourceItem;
typedef struct _MediaSourceItemClass MediaSourceItemClass;

#define TYPE_THUMBNAIL (thumbnail_get_type ())
#define THUMBNAIL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL, Thumbnail))
#define THUMBNAIL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL, ThumbnailClass))
#define IS_THUMBNAIL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL))
#define IS_THUMBNAIL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL))
#define THUMBNAIL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL, ThumbnailClass))

typedef struct _Thumbnail Thumbnail;
typedef struct _ThumbnailClass ThumbnailClass;

#define TYPE_LIBRARY_WINDOW (library_window_get_type ())
#define LIBRARY_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_WINDOW, LibraryWindow))
#define LIBRARY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_WINDOW, LibraryWindowClass))
#define IS_LIBRARY_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_WINDOW))
#define IS_LIBRARY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_WINDOW))
#define LIBRARY_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_WINDOW, LibraryWindowClass))

typedef struct _LibraryWindow LibraryWindow;
typedef struct _LibraryWindowClass LibraryWindowClass;

#define TYPE_EXPORTER (exporter_get_type ())
#define EXPORTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPORTER, Exporter))
#define EXPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPORTER, ExporterClass))
#define IS_EXPORTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPORTER))
#define IS_EXPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPORTER))
#define EXPORTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPORTER, ExporterClass))

typedef struct _Exporter Exporter;
typedef struct _ExporterClass ExporterClass;
typedef void (*ExporterCompletionCallback) (Exporter* exporter, gboolean is_cancelled, gpointer user_data);

#define TYPE_EXPORT_DIALOG (export_dialog_get_type ())
#define EXPORT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPORT_DIALOG, ExportDialog))
#define EXPORT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPORT_DIALOG, ExportDialogClass))
#define IS_EXPORT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPORT_DIALOG))
#define IS_EXPORT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPORT_DIALOG))
#define EXPORT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPORT_DIALOG, ExportDialogClass))

typedef struct _ExportDialog ExportDialog;
typedef struct _ExportDialogClass ExportDialogClass;

#define TYPE_EXPORT_FORMAT_PARAMETERS (export_format_parameters_get_type ())
typedef struct _ExportFormatParameters ExportFormatParameters;
typedef enum  {
	EXPORT_FORMAT_MODE_UNMODIFIED,
	EXPORT_FORMAT_MODE_CURRENT,
	EXPORT_FORMAT_MODE_SPECIFIED,
	EXPORT_FORMAT_MODE_LAST
} ExportFormatMode;

#define TYPE_EXPORT_FORMAT_MODE (export_format_mode_get_type ())
typedef enum  {
	JPEG_QUALITY_LOW = 50,
	JPEG_QUALITY_MEDIUM = 75,
	JPEG_QUALITY_HIGH = 90,
	JPEG_QUALITY_MAXIMUM = 100
} JpegQuality;

#define JPEG_TYPE_QUALITY (jpeg_quality_get_type ())
typedef enum  {
	SCALE_CONSTRAINT_ORIGINAL,
	SCALE_CONSTRAINT_DIMENSIONS,
	SCALE_CONSTRAINT_WIDTH,
	SCALE_CONSTRAINT_HEIGHT,
	SCALE_CONSTRAINT_FILL_VIEWPORT
} ScaleConstraint;

#define TYPE_SCALE_CONSTRAINT (scale_constraint_get_type ())

#define TYPE_SCALING (scaling_get_type ())
typedef struct _Scaling Scaling;

#define TYPE_DIMENSIONS (dimensions_get_type ())
typedef struct _Dimensions Dimensions;

#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_MULTIPLE_DATA_SOURCE_COMMAND (multiple_data_source_command_get_type ())
#define MULTIPLE_DATA_SOURCE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand))
#define MULTIPLE_DATA_SOURCE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommandClass))
#define IS_MULTIPLE_DATA_SOURCE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MULTIPLE_DATA_SOURCE_COMMAND))
#define IS_MULTIPLE_DATA_SOURCE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MULTIPLE_DATA_SOURCE_COMMAND))
#define MULTIPLE_DATA_SOURCE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommandClass))

typedef struct _MultipleDataSourceCommand MultipleDataSourceCommand;
typedef struct _MultipleDataSourceCommandClass MultipleDataSourceCommandClass;

#define TYPE_ROTATE_MULTIPLE_COMMAND (rotate_multiple_command_get_type ())
#define ROTATE_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ROTATE_MULTIPLE_COMMAND, RotateMultipleCommand))
#define ROTATE_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ROTATE_MULTIPLE_COMMAND, RotateMultipleCommandClass))
#define IS_ROTATE_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ROTATE_MULTIPLE_COMMAND))
#define IS_ROTATE_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ROTATE_MULTIPLE_COMMAND))
#define ROTATE_MULTIPLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ROTATE_MULTIPLE_COMMAND, RotateMultipleCommandClass))

typedef struct _RotateMultipleCommand RotateMultipleCommand;
typedef struct _RotateMultipleCommandClass RotateMultipleCommandClass;
typedef enum  {
	ROTATION_CLOCKWISE,
	ROTATION_COUNTERCLOCKWISE,
	ROTATION_MIRROR,
	ROTATION_UPSIDE_DOWN
} Rotation;

#define TYPE_ROTATION (rotation_get_type ())

#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 _command_manager_unref0(var) ((var == NULL) ? NULL : (var = (command_manager_unref (var), NULL)))

#define TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND (multiple_photo_transformation_command_get_type ())
#define MULTIPLE_PHOTO_TRANSFORMATION_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND, MultiplePhotoTransformationCommand))
#define MULTIPLE_PHOTO_TRANSFORMATION_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND, MultiplePhotoTransformationCommandClass))
#define IS_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND))
#define IS_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND))
#define MULTIPLE_PHOTO_TRANSFORMATION_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND, MultiplePhotoTransformationCommandClass))

typedef struct _MultiplePhotoTransformationCommand MultiplePhotoTransformationCommand;
typedef struct _MultiplePhotoTransformationCommandClass MultiplePhotoTransformationCommandClass;

#define TYPE_REVERT_MULTIPLE_COMMAND (revert_multiple_command_get_type ())
#define REVERT_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_REVERT_MULTIPLE_COMMAND, RevertMultipleCommand))
#define REVERT_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_REVERT_MULTIPLE_COMMAND, RevertMultipleCommandClass))
#define IS_REVERT_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_REVERT_MULTIPLE_COMMAND))
#define IS_REVERT_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_REVERT_MULTIPLE_COMMAND))
#define REVERT_MULTIPLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_REVERT_MULTIPLE_COMMAND, RevertMultipleCommandClass))

typedef struct _RevertMultipleCommand RevertMultipleCommand;
typedef struct _RevertMultipleCommandClass RevertMultipleCommandClass;
#define _pixel_transformation_bundle_unref0(var) ((var == NULL) ? NULL : (var = (pixel_transformation_bundle_unref (var), NULL)))

#define TYPE_ADJUST_COLORS_MULTIPLE_COMMAND (adjust_colors_multiple_command_get_type ())
#define ADJUST_COLORS_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADJUST_COLORS_MULTIPLE_COMMAND, AdjustColorsMultipleCommand))
#define ADJUST_COLORS_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADJUST_COLORS_MULTIPLE_COMMAND, AdjustColorsMultipleCommandClass))
#define IS_ADJUST_COLORS_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADJUST_COLORS_MULTIPLE_COMMAND))
#define IS_ADJUST_COLORS_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADJUST_COLORS_MULTIPLE_COMMAND))
#define ADJUST_COLORS_MULTIPLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADJUST_COLORS_MULTIPLE_COMMAND, AdjustColorsMultipleCommandClass))

typedef struct _AdjustColorsMultipleCommand AdjustColorsMultipleCommand;
typedef struct _AdjustColorsMultipleCommandClass AdjustColorsMultipleCommandClass;

#define TYPE_ENHANCE_MULTIPLE_COMMAND (enhance_multiple_command_get_type ())
#define ENHANCE_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ENHANCE_MULTIPLE_COMMAND, EnhanceMultipleCommand))
#define ENHANCE_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ENHANCE_MULTIPLE_COMMAND, EnhanceMultipleCommandClass))
#define IS_ENHANCE_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ENHANCE_MULTIPLE_COMMAND))
#define IS_ENHANCE_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ENHANCE_MULTIPLE_COMMAND))
#define ENHANCE_MULTIPLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ENHANCE_MULTIPLE_COMMAND, EnhanceMultipleCommandClass))

typedef struct _EnhanceMultipleCommand EnhanceMultipleCommand;
typedef struct _EnhanceMultipleCommandClass EnhanceMultipleCommandClass;

#define TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND (duplicate_multiple_photos_command_get_type ())
#define DUPLICATE_MULTIPLE_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommand))
#define DUPLICATE_MULTIPLE_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommandClass))
#define IS_DUPLICATE_MULTIPLE_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND))
#define IS_DUPLICATE_MULTIPLE_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND))
#define DUPLICATE_MULTIPLE_PHOTOS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommandClass))

typedef struct _DuplicateMultiplePhotosCommand DuplicateMultiplePhotosCommand;
typedef struct _DuplicateMultiplePhotosCommandClass DuplicateMultiplePhotosCommandClass;

#define TYPE_DATEABLE (dateable_get_type ())
#define DATEABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATEABLE, Dateable))
#define IS_DATEABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATEABLE))
#define DATEABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_DATEABLE, DateableIface))

typedef struct _Dateable Dateable;
typedef struct _DateableIface DateableIface;

#define TYPE_ADJUST_DATE_TIME_DIALOG (adjust_date_time_dialog_get_type ())
#define ADJUST_DATE_TIME_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADJUST_DATE_TIME_DIALOG, AdjustDateTimeDialog))
#define ADJUST_DATE_TIME_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADJUST_DATE_TIME_DIALOG, AdjustDateTimeDialogClass))
#define IS_ADJUST_DATE_TIME_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADJUST_DATE_TIME_DIALOG))
#define IS_ADJUST_DATE_TIME_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADJUST_DATE_TIME_DIALOG))
#define ADJUST_DATE_TIME_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADJUST_DATE_TIME_DIALOG, AdjustDateTimeDialogClass))

typedef struct _AdjustDateTimeDialog AdjustDateTimeDialog;
typedef struct _AdjustDateTimeDialogClass AdjustDateTimeDialogClass;

#define TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND (adjust_date_time_photos_command_get_type ())
#define ADJUST_DATE_TIME_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, AdjustDateTimePhotosCommand))
#define ADJUST_DATE_TIME_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, AdjustDateTimePhotosCommandClass))
#define IS_ADJUST_DATE_TIME_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND))
#define IS_ADJUST_DATE_TIME_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND))
#define ADJUST_DATE_TIME_PHOTOS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, AdjustDateTimePhotosCommandClass))

typedef struct _AdjustDateTimePhotosCommand AdjustDateTimePhotosCommand;
typedef struct _AdjustDateTimePhotosCommandClass AdjustDateTimePhotosCommandClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define TYPE_SET_BACKGROUND_PHOTO_DIALOG (set_background_photo_dialog_get_type ())
#define SET_BACKGROUND_PHOTO_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_BACKGROUND_PHOTO_DIALOG, SetBackgroundPhotoDialog))
#define SET_BACKGROUND_PHOTO_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_BACKGROUND_PHOTO_DIALOG, SetBackgroundPhotoDialogClass))
#define IS_SET_BACKGROUND_PHOTO_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_BACKGROUND_PHOTO_DIALOG))
#define IS_SET_BACKGROUND_PHOTO_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_BACKGROUND_PHOTO_DIALOG))
#define SET_BACKGROUND_PHOTO_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_BACKGROUND_PHOTO_DIALOG, SetBackgroundPhotoDialogClass))

typedef struct _SetBackgroundPhotoDialog SetBackgroundPhotoDialog;
typedef struct _SetBackgroundPhotoDialogClass SetBackgroundPhotoDialogClass;

#define TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG (set_background_slideshow_dialog_get_type ())
#define SET_BACKGROUND_SLIDESHOW_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG, SetBackgroundSlideshowDialog))
#define SET_BACKGROUND_SLIDESHOW_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG, SetBackgroundSlideshowDialogClass))
#define IS_SET_BACKGROUND_SLIDESHOW_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG))
#define IS_SET_BACKGROUND_SLIDESHOW_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG))
#define SET_BACKGROUND_SLIDESHOW_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG, SetBackgroundSlideshowDialogClass))

typedef struct _SetBackgroundSlideshowDialog SetBackgroundSlideshowDialog;
typedef struct _SetBackgroundSlideshowDialogClass SetBackgroundSlideshowDialogClass;

#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_LIBRARY_PHOTO_SOURCE_COLLECTION (library_photo_source_collection_get_type ())
#define LIBRARY_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollection))
#define LIBRARY_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollectionClass))
#define IS_LIBRARY_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION))
#define IS_LIBRARY_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION))
#define LIBRARY_PHOTO_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollectionClass))

typedef struct _LibraryPhotoSourceCollection LibraryPhotoSourceCollection;
typedef struct _LibraryPhotoSourceCollectionClass LibraryPhotoSourceCollectionClass;

#define TYPE_SINGLE_PHOTO_PAGE (single_photo_page_get_type ())
#define SINGLE_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage))
#define SINGLE_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPageClass))
#define IS_SINGLE_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLE_PHOTO_PAGE))
#define IS_SINGLE_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLE_PHOTO_PAGE))
#define SINGLE_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPageClass))

typedef struct _SinglePhotoPage SinglePhotoPage;
typedef struct _SinglePhotoPageClass SinglePhotoPageClass;

#define TYPE_SLIDESHOW_PAGE (slideshow_page_get_type ())
#define SLIDESHOW_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SLIDESHOW_PAGE, SlideshowPage))
#define SLIDESHOW_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SLIDESHOW_PAGE, SlideshowPageClass))
#define IS_SLIDESHOW_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SLIDESHOW_PAGE))
#define IS_SLIDESHOW_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SLIDESHOW_PAGE))
#define SLIDESHOW_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SLIDESHOW_PAGE, SlideshowPageClass))

typedef struct _SlideshowPage SlideshowPage;
typedef struct _SlideshowPageClass SlideshowPageClass;
typedef struct _ViewFilterPrivate ViewFilterPrivate;
typedef struct _SearchViewFilterPrivate SearchViewFilterPrivate;
typedef struct _DefaultSearchViewFilterPrivate DefaultSearchViewFilterPrivate;
typedef struct _CollectionPageCollectionSearchViewFilterPrivate CollectionPageCollectionSearchViewFilterPrivate;
typedef enum  {
	SEARCH_FILTER_CRITERIA_NONE = 0,
	SEARCH_FILTER_CRITERIA_RECURSIVE = 1 << 0,
	SEARCH_FILTER_CRITERIA_TEXT = 1 << 1,
	SEARCH_FILTER_CRITERIA_FLAG = 1 << 2,
	SEARCH_FILTER_CRITERIA_MEDIA = 1 << 3,
	SEARCH_FILTER_CRITERIA_RATING = 1 << 4,
	SEARCH_FILTER_CRITERIA_SAVEDSEARCH = 1 << 5,
	SEARCH_FILTER_CRITERIA_ALL = 0xFFFFFFFFLL
} SearchFilterCriteria;

#define TYPE_SEARCH_FILTER_CRITERIA (search_filter_criteria_get_type ())
#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 _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 _CollectionViewManager {
	ViewManager parent_instance;
	CollectionViewManagerPrivate * priv;
};

struct _CollectionViewManagerClass {
	ViewManagerClass parent_class;
};

struct _CollectionViewManagerPrivate {
	CollectionPage* page;
};

struct _Page {
	GtkScrolledWindow parent_instance;
	PagePrivate * priv;
	GtkBuilder* builder;
	GtkToolbar* toolbar;
	gboolean in_view;
	gdouble wheel_factor;
	gdouble modified_wheel_factor;
};

struct _PageClass {
	GtkScrolledWindowClass parent_class;
	void (*set_page_name) (Page* self, const gchar* page_name);
	void (*set_container) (Page* self, GtkWindow* container);
	void (*clear_container) (Page* self);
	GtkToolbar* (*get_toolbar) (Page* self);
	GtkMenu* (*get_page_context_menu) (Page* self);
	void (*switching_from) (Page* self);
	void (*switched_to) (Page* self);
	void (*ready) (Page* self);
	void (*switching_to_fullscreen) (Page* self, FullscreenWindow* fsw);
	void (*returning_from_fullscreen) (Page* self, FullscreenWindow* fsw);
	void (*add_actions) (Page* self, GActionMap* map);
	void (*remove_actions) (Page* self, GActionMap* map);
	void (*init_collect_ui_filenames) (Page* self, GeeList* ui_filenames);
	InjectionGroup** (*init_collect_injection_groups) (Page* self, gint* result_length1);
	void (*init_actions) (Page* self, gint selected_count, gint count);
	void (*update_actions) (Page* self, gint selected_count, gint count);
	gboolean (*on_left_click) (Page* self, GdkEventButton* event);
	gboolean (*on_middle_click) (Page* self, GdkEventButton* event);
	gboolean (*on_right_click) (Page* self, GdkEventButton* event);
	gboolean (*on_left_released) (Page* self, GdkEventButton* event);
	gboolean (*on_middle_released) (Page* self, GdkEventButton* event);
	gboolean (*on_right_released) (Page* self, GdkEventButton* event);
	gboolean (*on_ctrl_pressed) (Page* self, GdkEventKey* event);
	gboolean (*on_ctrl_released) (Page* self, GdkEventKey* event);
	gboolean (*on_alt_pressed) (Page* self, GdkEventKey* event);
	gboolean (*on_alt_released) (Page* self, GdkEventKey* event);
	gboolean (*on_shift_pressed) (Page* self, GdkEventKey* event);
	gboolean (*on_shift_released) (Page* self, GdkEventKey* event);
	gboolean (*on_super_pressed) (Page* self, GdkEventKey* event);
	gboolean (*on_super_released) (Page* self, GdkEventKey* event);
	gboolean (*on_app_key_pressed) (Page* self, GdkEventKey* event);
	gboolean (*on_app_key_released) (Page* self, GdkEventKey* event);
	void (*on_move) (Page* self, GdkRectangle* rect);
	void (*on_move_start) (Page* self, GdkRectangle* rect);
	void (*on_move_finished) (Page* self, GdkRectangle* rect);
	void (*on_resize) (Page* self, GdkRectangle* rect);
	void (*on_resize_start) (Page* self, GdkRectangle* rect);
	void (*on_resize_finished) (Page* self, GdkRectangle* rect);
	gboolean (*on_configure) (Page* self, GdkEventConfigure* event, GdkRectangle* rect);
	gboolean (*on_motion) (Page* self, GdkEventMotion* event, gint x, gint y, GdkModifierType mask);
	gboolean (*on_leave_notify_event) (Page* self);
	gboolean (*on_mousewheel_up) (Page* self, GdkEventScroll* event);
	gboolean (*on_mousewheel_down) (Page* self, GdkEventScroll* event);
	gboolean (*on_mousewheel_left) (Page* self, GdkEventScroll* event);
	gboolean (*on_mousewheel_right) (Page* self, GdkEventScroll* event);
	gboolean (*on_context_keypress) (Page* self);
	gboolean (*on_context_buttonpress) (Page* self, GdkEventButton* event);
	gboolean (*on_context_invoked) (Page* self);
	void (*set_page_cursor) (Page* self, GdkCursorType cursor_type);
};

struct _CheckerboardPageKeyboardModifiers {
	gboolean ctrl_pressed;
	gboolean alt_pressed;
	gboolean shift_pressed;
	gboolean super_pressed;
};

struct _CheckerboardPage {
	Page parent_instance;
	CheckerboardPagePrivate * priv;
	CheckerboardItem* anchor;
	CheckerboardItem* cursor;
};

struct _CheckerboardPageClass {
	PageClass parent_class;
	GtkMenu* (*get_item_context_menu) (CheckerboardPage* self);
	gchar* (*get_view_empty_icon) (CheckerboardPage* self);
	gchar* (*get_view_empty_message) (CheckerboardPage* self);
	gchar* (*get_filter_no_match_message) (CheckerboardPage* self);
	void (*on_item_activated) (CheckerboardPage* self, CheckerboardItem* item, CheckerboardPageActivator activator, CheckerboardPageKeyboardModifiers* modifiers);
	SearchViewFilter* (*get_search_view_filter) (CheckerboardPage* self);
	CoreViewTracker* (*get_view_tracker) (CheckerboardPage* self);
	gboolean (*on_mouse_over) (CheckerboardPage* self, CheckerboardItem* item, gint x, gint y, GdkModifierType mask);
	void (*set_display_titles) (CheckerboardPage* self, gboolean display);
	void (*set_display_comments) (CheckerboardPage* self, gboolean display);
};

struct _MediaPage {
	CheckerboardPage parent_instance;
	MediaPagePrivate * priv;
};

struct _MediaPageClass {
	CheckerboardPageClass parent_class;
	void (*on_zoom_changed) (MediaPage* self);
	void (*on_export) (MediaPage* self);
	void (*on_increase_size) (MediaPage* self);
	void (*on_decrease_size) (MediaPage* self);
	void (*on_increase_rating) (MediaPage* self);
	void (*on_decrease_rating) (MediaPage* self);
	void (*on_set_rating) (MediaPage* self, Rating rating);
	void (*on_rate_rejected) (MediaPage* self);
	void (*on_rate_unrated) (MediaPage* self);
	void (*on_rate_one) (MediaPage* self);
	void (*on_rate_two) (MediaPage* self);
	void (*on_rate_three) (MediaPage* self);
	void (*on_rate_four) (MediaPage* self);
	void (*on_rate_five) (MediaPage* self);
	void (*on_move_to_trash) (MediaPage* self);
	void (*on_edit_title) (MediaPage* self);
	void (*on_edit_comment) (MediaPage* self);
	void (*on_display_titles) (MediaPage* self, GSimpleAction* action, GVariant* value);
	void (*on_display_comments) (MediaPage* self, GSimpleAction* action, GVariant* value);
	void (*on_display_ratings) (MediaPage* self, GSimpleAction* action, GVariant* value);
	void (*on_display_tags) (MediaPage* self, GSimpleAction* action, GVariant* value);
	void (*get_config_photos_sort) (MediaPage* self, gboolean* sort_order, gint* sort_by);
	void (*set_config_photos_sort) (MediaPage* self, gboolean sort_order, gint sort_by);
	void (*on_sort_changed) (MediaPage* self, GSimpleAction* action, GVariant* value);
	void (*developer_changed) (MediaPage* self, RawDeveloper rd);
	DataView* (*create_thumbnail) (MediaPage* self, DataSource* source);
};

struct _CollectionPage {
	MediaPage parent_instance;
	CollectionPagePrivate * priv;
};

struct _CollectionPageClass {
	MediaPageClass parent_class;
};

struct _CollectionPagePrivate {
	ExporterUI* exporter;
	CollectionPageCollectionSearchViewFilter* search_filter;
};

struct _ExportFormatParameters {
	ExportFormatMode mode;
	PhotoFileFormat specified_format;
	JpegQuality quality;
	gboolean export_metadata;
};

struct _Dimensions {
	gint width;
	gint height;
};

struct _Scaling {
	ScaleConstraint constraint;
	gint scale;
	Dimensions viewport;
	gboolean scale_up;
};

struct _DateableIface {
	GTypeInterface parent_iface;
	void (*set_exposure_time) (Dateable* self, GDateTime* target_time);
	GDateTime* (*get_exposure_time) (Dateable* self);
};

struct _ViewFilter {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ViewFilterPrivate * priv;
};

struct _ViewFilterClass {
	GTypeClass parent_class;
	void (*finalize) (ViewFilter *self);
	gboolean (*predicate) (ViewFilter* self, DataView* view);
	void (*refresh) (ViewFilter* self);
};

struct _SearchViewFilter {
	ViewFilter parent_instance;
	SearchViewFilterPrivate * priv;
};

struct _SearchViewFilterClass {
	ViewFilterClass parent_class;
	guint (*get_criteria) (SearchViewFilter* self);
};

struct _DefaultSearchViewFilter {
	SearchViewFilter parent_instance;
	DefaultSearchViewFilterPrivate * priv;
};

struct _DefaultSearchViewFilterClass {
	SearchViewFilterClass parent_class;
};

struct _CollectionPageCollectionSearchViewFilter {
	DefaultSearchViewFilter parent_instance;
	CollectionPageCollectionSearchViewFilterPrivate * priv;
};

struct _CollectionPageCollectionSearchViewFilterClass {
	DefaultSearchViewFilterClass parent_class;
};

static gint CollectionViewManager_private_offset;
static gpointer collection_view_manager_parent_class = NULL;
static gint CollectionPage_private_offset;
static gpointer collection_page_parent_class = NULL;
VALA_EXTERN LibraryPhotoSourceCollection* library_photo_global;
static gpointer collection_page_collection_search_view_filter_parent_class = NULL;

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 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 data_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataView, g_object_unref)
VALA_EXTERN GType collection_view_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CollectionViewManager, view_manager_unref)
VALA_EXTERN GType page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Page, g_object_unref)
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 DataView* view_manager_create_view (ViewManager* self,
                                    DataSource* source);
VALA_EXTERN CollectionViewManager* collection_view_manager_new (CollectionPage* page);
VALA_EXTERN CollectionViewManager* collection_view_manager_construct (GType object_type,
                                                          CollectionPage* page);
VALA_EXTERN ViewManager* view_manager_construct (GType object_type);
static DataView* collection_view_manager_real_create_view (ViewManager* base,
                                                    DataSource* source);
VALA_EXTERN DataView* media_page_create_thumbnail (MediaPage* self,
                                       DataSource* source);
static void collection_view_manager_finalize (ViewManager * obj);
static GType collection_view_manager_get_type_once (void);
VALA_EXTERN GType page_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PageWindow, g_object_unref)
VALA_EXTERN GType fullscreen_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FullscreenWindow, g_object_unref)
VALA_EXTERN gpointer injection_group_ref (gpointer instance);
VALA_EXTERN void injection_group_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_injection_group (const gchar* name,
                                        const gchar* nick,
                                        const gchar* blurb,
                                        GType object_type,
                                        GParamFlags flags);
VALA_EXTERN void value_set_injection_group (GValue* value,
                                gpointer v_object);
VALA_EXTERN void value_take_injection_group (GValue* value,
                                 gpointer v_object);
VALA_EXTERN gpointer value_get_injection_group (const GValue* value);
VALA_EXTERN GType injection_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (InjectionGroup, injection_group_unref)
VALA_EXTERN GType thumbnail_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ThumbnailView, g_object_unref)
VALA_EXTERN GType checkerboard_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CheckerboardItem, g_object_unref)
VALA_EXTERN GType checkerboard_page_activator_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType checkerboard_page_keyboard_modifiers_get_type (void) G_GNUC_CONST ;
VALA_EXTERN CheckerboardPageKeyboardModifiers* checkerboard_page_keyboard_modifiers_dup (const CheckerboardPageKeyboardModifiers* self);
VALA_EXTERN void checkerboard_page_keyboard_modifiers_free (CheckerboardPageKeyboardModifiers* self);
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 search_view_filter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SearchViewFilter, view_filter_unref)
VALA_EXTERN gpointer core_tracker_ref (gpointer instance);
VALA_EXTERN void core_tracker_unref (gpointer instance);
VALA_EXTERN GParamSpec* core_param_spec_tracker (const gchar* name,
                                     const gchar* nick,
                                     const gchar* blurb,
                                     GType object_type,
                                     GParamFlags flags);
VALA_EXTERN void core_value_set_tracker (GValue* value,
                             gpointer v_object);
VALA_EXTERN void core_value_take_tracker (GValue* value,
                              gpointer v_object);
VALA_EXTERN gpointer core_value_get_tracker (const GValue* value);
VALA_EXTERN GType core_tracker_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CoreTracker, core_tracker_unref)
VALA_EXTERN GType core_view_tracker_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CoreViewTracker, core_tracker_unref)
VALA_EXTERN GType rating_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType raw_developer_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gpointer exporter_ui_ref (gpointer instance);
VALA_EXTERN void exporter_ui_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_exporter_ui (const gchar* name,
                                    const gchar* nick,
                                    const gchar* blurb,
                                    GType object_type,
                                    GParamFlags flags);
VALA_EXTERN void value_set_exporter_ui (GValue* value,
                            gpointer v_object);
VALA_EXTERN void value_take_exporter_ui (GValue* value,
                             gpointer v_object);
VALA_EXTERN gpointer value_get_exporter_ui (const GValue* value);
VALA_EXTERN GType exporter_ui_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ExporterUI, exporter_ui_unref)
VALA_EXTERN GType default_search_view_filter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DefaultSearchViewFilter, view_filter_unref)
VALA_EXTERN GType collection_page_collection_search_view_filter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CollectionPageCollectionSearchViewFilter, view_filter_unref)
VALA_EXTERN GtkToolbar* page_get_toolbar (Page* self);
VALA_EXTERN void page_init_collect_ui_filenames (Page* self,
                                     GeeList* ui_filenames);
VALA_EXTERN void page_add_actions (Page* self,
                       GActionMap* map);
VALA_EXTERN void page_remove_actions (Page* self,
                          GActionMap* map);
VALA_EXTERN InjectionGroup** page_init_collect_injection_groups (Page* self,
                                                     gint* result_length1);
VALA_EXTERN void page_init_actions (Page* self,
                        gint selected_count,
                        gint count);
VALA_EXTERN void page_update_actions (Page* self,
                          gint selected_count,
                          gint count);
VALA_EXTERN void checkerboard_page_on_item_activated (CheckerboardPage* self,
                                          CheckerboardItem* item,
                                          CheckerboardPageActivator activator,
                                          CheckerboardPageKeyboardModifiers* modifiers);
VALA_EXTERN gboolean page_on_app_key_pressed (Page* self,
                                  GdkEventKey* event);
VALA_EXTERN void media_page_on_export (MediaPage* self);
VALA_EXTERN gboolean page_on_ctrl_pressed (Page* self,
                               GdkEventKey* event);
VALA_EXTERN gboolean page_on_ctrl_released (Page* self,
                                GdkEventKey* event);
VALA_EXTERN SearchViewFilter* checkerboard_page_get_search_view_filter (CheckerboardPage* self);
static void collection_page_on_print (CollectionPage* self);
static void _collection_page_on_print_gsimple_action_activate_callback (GSimpleAction* action,
                                                                 GVariant* parameter,
                                                                 gpointer self);
static void collection_page_on_publish (CollectionPage* self);
static void _collection_page_on_publish_gsimple_action_activate_callback (GSimpleAction* action,
                                                                   GVariant* parameter,
                                                                   gpointer self);
static void collection_page_on_rotate_clockwise (CollectionPage* self);
static void _collection_page_on_rotate_clockwise_gsimple_action_activate_callback (GSimpleAction* action,
                                                                            GVariant* parameter,
                                                                            gpointer self);
static void collection_page_on_rotate_counterclockwise (CollectionPage* self);
static void _collection_page_on_rotate_counterclockwise_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                   GVariant* parameter,
                                                                                   gpointer self);
static void collection_page_on_flip_horizontally (CollectionPage* self);
static void _collection_page_on_flip_horizontally_gsimple_action_activate_callback (GSimpleAction* action,
                                                                             GVariant* parameter,
                                                                             gpointer self);
static void collection_page_on_flip_vertically (CollectionPage* self);
static void _collection_page_on_flip_vertically_gsimple_action_activate_callback (GSimpleAction* action,
                                                                           GVariant* parameter,
                                                                           gpointer self);
static void collection_page_on_enhance (CollectionPage* self);
static void _collection_page_on_enhance_gsimple_action_activate_callback (GSimpleAction* action,
                                                                   GVariant* parameter,
                                                                   gpointer self);
VALA_EXTERN void collection_page_on_copy_adjustments (CollectionPage* self);
static void _collection_page_on_copy_adjustments_gsimple_action_activate_callback (GSimpleAction* action,
                                                                            GVariant* parameter,
                                                                            gpointer self);
VALA_EXTERN void collection_page_on_paste_adjustments (CollectionPage* self);
static void _collection_page_on_paste_adjustments_gsimple_action_activate_callback (GSimpleAction* action,
                                                                             GVariant* parameter,
                                                                             gpointer self);
static void collection_page_on_revert (CollectionPage* self);
static void _collection_page_on_revert_gsimple_action_activate_callback (GSimpleAction* action,
                                                                  GVariant* parameter,
                                                                  gpointer self);
VALA_EXTERN void collection_page_on_set_background (CollectionPage* self);
static void _collection_page_on_set_background_gsimple_action_activate_callback (GSimpleAction* action,
                                                                          GVariant* parameter,
                                                                          gpointer self);
static void collection_page_on_duplicate_photo (CollectionPage* self);
static void _collection_page_on_duplicate_photo_gsimple_action_activate_callback (GSimpleAction* action,
                                                                           GVariant* parameter,
                                                                           gpointer self);
static void collection_page_on_adjust_date_time (CollectionPage* self);
static void _collection_page_on_adjust_date_time_gsimple_action_activate_callback (GSimpleAction* action,
                                                                            GVariant* parameter,
                                                                            gpointer self);
static void collection_page_on_external_edit (CollectionPage* self);
static void _collection_page_on_external_edit_gsimple_action_activate_callback (GSimpleAction* action,
                                                                         GVariant* parameter,
                                                                         gpointer self);
static void collection_page_on_external_edit_raw (CollectionPage* self);
static void _collection_page_on_external_edit_raw_gsimple_action_activate_callback (GSimpleAction* action,
                                                                             GVariant* parameter,
                                                                             gpointer self);
static void collection_page_on_slideshow (CollectionPage* self);
static void _collection_page_on_slideshow_gsimple_action_activate_callback (GSimpleAction* action,
                                                                     GVariant* parameter,
                                                                     gpointer self);
VALA_EXTERN CollectionPageCollectionSearchViewFilter* collection_page_collection_search_view_filter_new (void);
VALA_EXTERN CollectionPageCollectionSearchViewFilter* collection_page_collection_search_view_filter_construct (GType object_type);
VALA_EXTERN CollectionPage* collection_page_construct (GType object_type,
                                           const gchar* page_name);
VALA_EXTERN MediaPage* media_page_construct (GType object_type,
                                 const gchar* page_name);
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 view_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ViewCollection, data_collection_unref)
VALA_EXTERN ViewCollection* page_get_view (Page* 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 collection_page_on_photos_altered (CollectionPage* self,
                                        GeeMap* altered);
static void _collection_page_on_photos_altered_data_collection_items_altered (DataCollection* _sender,
                                                                       GeeMap* items,
                                                                       gpointer self);
VALA_EXTERN void checkerboard_page_init_item_context_menu (CheckerboardPage* self,
                                               const gchar* path);
VALA_EXTERN void page_init_toolbar (Page* self,
                        const gchar* path);
VALA_EXTERN GType configuration_facade_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConfigurationFacade, g_object_unref)
VALA_EXTERN GType config_facade_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConfigFacade, g_object_unref)
VALA_EXTERN ConfigFacade* config_facade_get_instance (void);
static void collection_page_on_external_app_changed (CollectionPage* self);
static void _collection_page_on_external_app_changed_configuration_facade_external_app_changed (ConfigurationFacade* _sender,
                                                                                         gpointer self);
static GtkToolbar* collection_page_real_get_toolbar (Page* base);
VALA_EXTERN GType media_page_zoom_slider_assembly_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MediaPageZoomSliderAssembly, g_object_unref)
VALA_EXTERN MediaPageZoomSliderAssembly* media_page_create_zoom_slider_assembly (MediaPage* self);
VALA_EXTERN void media_page_connect_slider (MediaPage* self,
                                MediaPageZoomSliderAssembly* slider);
static InjectionGroup* collection_page_create_file_menu_injectables (void);
VALA_EXTERN InjectionGroup* injection_group_new (const gchar* path);
VALA_EXTERN InjectionGroup* injection_group_construct (GType object_type,
                                           const gchar* path);
VALA_EXTERN void injection_group_add_menu_item (InjectionGroup* self,
                                    const gchar* name,
                                    const gchar* action,
                                    const gchar* accelerator);
VALA_EXTERN void injection_group_add_separator (InjectionGroup* self);
static InjectionGroup* collection_page_create_edit_menu_injectables (void);
static InjectionGroup* collection_page_create_view_menu_fullscreen_injectables (void);
static InjectionGroup* collection_page_create_photos_menu_edits_injectables (void);
static InjectionGroup* collection_page_create_photos_menu_date_injectables (void);
static InjectionGroup* collection_page_create_photos_menu_externals_injectables (void);
static void collection_page_real_init_collect_ui_filenames (Page* base,
                                                     GeeList* ui_filenames);
static void collection_page_real_add_actions (Page* base,
                                       GActionMap* map);
static void collection_page_real_remove_actions (Page* base,
                                          GActionMap* map);
static InjectionGroup** collection_page_real_init_collect_injection_groups (Page* base,
                                                                     gint* result_length1);
static void _vala_array_add74 (InjectionGroup** * array,
                        gint* length,
                        gint* size,
                        InjectionGroup* value);
static void _vala_array_add75 (InjectionGroup** * array,
                        gint* length,
                        gint* size,
                        InjectionGroup* value);
static void _vala_array_add76 (InjectionGroup** * array,
                        gint* length,
                        gint* size,
                        InjectionGroup* value);
static void _vala_array_add77 (InjectionGroup** * array,
                        gint* length,
                        gint* size,
                        InjectionGroup* value);
static void _vala_array_add78 (InjectionGroup** * array,
                        gint* length,
                        gint* size,
                        InjectionGroup* value);
static void _vala_array_add79 (InjectionGroup** * array,
                        gint* length,
                        gint* size,
                        InjectionGroup* value);
static gboolean collection_page_selection_has_video (CollectionPage* self);
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 gboolean media_source_collection_has_video (GeeCollection* media);
VALA_EXTERN GeeList* view_collection_get_selected_sources (ViewCollection* self);
static gboolean collection_page_page_has_photo (CollectionPage* self);
VALA_EXTERN gboolean media_source_collection_has_photo (GeeCollection* media);
VALA_EXTERN GeeCollection* view_collection_get_sources (ViewCollection* self);
static gboolean collection_page_selection_has_photo (CollectionPage* self);
static void collection_page_real_init_actions (Page* base,
                                        gint selected_count,
                                        gint count);
VALA_EXTERN void page_set_action_sensitive (Page* self,
                                const gchar* name,
                                gboolean sensitive);
static void collection_page_real_update_actions (Page* base,
                                          gint selected_count,
                                          gint count);
VALA_EXTERN GType app_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AppWindow, g_object_unref)
VALA_EXTERN AppWindow* app_window_get_instance (void);
VALA_EXTERN Page* page_window_get_current_page (PageWindow* self);
VALA_EXTERN DataView* view_collection_get_selected_at (ViewCollection* self,
                                           gint index);
VALA_EXTERN DataSource* data_view_get_source (DataView* self);
VALA_EXTERN GType video_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (VideoSource, g_object_unref)
VALA_EXTERN GType video_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Video, g_object_unref)
VALA_EXTERN gboolean is_string_empty (const gchar* s);
VALA_EXTERN gchar* configuration_facade_get_external_photo_app (ConfigurationFacade* self);
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 photo_file_format_get_type (void) G_GNUC_CONST ;
VALA_EXTERN PhotoFileFormat photo_get_master_file_format (Photo* self);
VALA_EXTERN gchar* configuration_facade_get_external_raw_app (ConfigurationFacade* self);
static gboolean collection_page_can_revert_selected (CollectionPage* self);
VALA_EXTERN gboolean photo_has_color_adjustments (Photo* self);
VALA_EXTERN void page_update_menu_item_label (Page* self,
                                  const gchar* id,
                                  const gchar* new_label);
VALA_EXTERN gboolean data_view_is_selected (DataView* self);
VALA_EXTERN gboolean alteration_has_subject (Alteration* self,
                                 const gchar* subject);
VALA_EXTERN GType library_photo_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LibraryPhoto, g_object_unref)
VALA_EXTERN gint view_collection_get_selected_count (ViewCollection* self);
VALA_EXTERN gpointer print_manager_ref (gpointer instance);
VALA_EXTERN void print_manager_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_print_manager (const gchar* name,
                                      const gchar* nick,
                                      const gchar* blurb,
                                      GType object_type,
                                      GParamFlags flags);
VALA_EXTERN void value_set_print_manager (GValue* value,
                              gpointer v_object);
VALA_EXTERN void value_take_print_manager (GValue* value,
                               gpointer v_object);
VALA_EXTERN gpointer value_get_print_manager (const GValue* value);
VALA_EXTERN GType print_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PrintManager, print_manager_unref)
VALA_EXTERN PrintManager* print_manager_get_instance (void);
VALA_EXTERN void print_manager_spool_photo (PrintManager* self,
                                GeeCollection* to_print);
VALA_EXTERN GeeList* view_collection_get_selected_sources_of_type (ViewCollection* self,
                                                       GType t);
static void collection_page_real_on_item_activated (CheckerboardPage* base,
                                             CheckerboardItem* item,
                                             CheckerboardPageActivator activator,
                                             CheckerboardPageKeyboardModifiers* modifiers);
VALA_EXTERN GType media_source_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MediaSourceItem, g_object_unref)
VALA_EXTERN GType thumbnail_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Thumbnail, g_object_unref)
VALA_EXTERN MediaSource* thumbnail_get_media_source (Thumbnail* self);
VALA_EXTERN void media_page_on_play_video (MediaPage* self);
VALA_EXTERN gchar* data_object_to_string (DataObject* self);
VALA_EXTERN GType library_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LibraryWindow, g_object_unref)
VALA_EXTERN LibraryWindow* library_window_get_app (void);
VALA_EXTERN void library_window_switch_to_photo_page (LibraryWindow* self,
                                          CollectionPage* controller,
                                          Photo* current);
static gboolean collection_page_real_on_app_key_pressed (Page* base,
                                                  GdkEventKey* event);
VALA_EXTERN void page_activate_action (Page* self,
                           const gchar* name);
static void collection_page_real_on_export (MediaPage* base);
VALA_EXTERN GType exporter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Exporter, g_object_unref)
VALA_EXTERN ExporterUI* video_export_many (GeeCollection* videos,
                               ExporterCompletionCallback done,
                               gpointer done_target,
                               gboolean export_in_place);
static void collection_page_on_export_completed (CollectionPage* self);
static void _collection_page_on_export_completed_exporter_completion_callback (Exporter* exporter,
                                                                        gboolean is_cancelled,
                                                                        gpointer self);
VALA_EXTERN GType export_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ExportDialog, g_object_unref)
VALA_EXTERN ExportDialog* export_dialog_new (const gchar* title);
VALA_EXTERN ExportDialog* export_dialog_construct (GType object_type,
                                       const gchar* title);
VALA_EXTERN GType export_format_parameters_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType export_format_mode_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType jpeg_quality_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ExportFormatParameters* export_format_parameters_dup (const ExportFormatParameters* self);
VALA_EXTERN void export_format_parameters_free (ExportFormatParameters* self);
VALA_EXTERN void export_format_parameters_current (ExportFormatParameters* result);
VALA_EXTERN void export_format_parameters_last (ExportFormatParameters* result);
VALA_EXTERN GType scale_constraint_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gboolean export_dialog_execute (ExportDialog* self,
                                gint* scale,
                                ScaleConstraint* constraint,
                                ExportFormatParameters* parameters);
VALA_EXTERN GType scaling_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType dimensions_get_type (void) G_GNUC_CONST ;
VALA_EXTERN Dimensions* dimensions_dup (const Dimensions* self);
VALA_EXTERN void dimensions_free (Dimensions* self);
VALA_EXTERN Scaling* scaling_dup (const Scaling* self);
VALA_EXTERN void scaling_free (Scaling* self);
VALA_EXTERN void scaling_for_constraint (ScaleConstraint constraint,
                             gint scale,
                             gboolean scale_up,
                             Scaling* result);
VALA_EXTERN GFile* export_ui_choose_file (const gchar* current_file_basename);
VALA_EXTERN gchar* photo_get_export_basename_for_parameters (Photo* self,
                                                 ExportFormatParameters* params);
VALA_EXTERN void page_window_set_busy_cursor (PageWindow* self);
VALA_EXTERN void photo_export (Photo* self,
                   GFile* dest_file,
                   Scaling* scaling,
                   JpegQuality quality,
                   PhotoFileFormat export_format,
                   gboolean direct_copy_unmodified,
                   gboolean export_metadata,
                   GError** error);
VALA_EXTERN PhotoFileFormat photo_get_export_format_for_parameters (Photo* self,
                                                        ExportFormatParameters* params);
VALA_EXTERN void page_window_set_normal_cursor (PageWindow* self);
VALA_EXTERN GtkResponseType export_error_dialog (GFile* dest,
                                     gboolean photos_remaining);
VALA_EXTERN GFile* export_ui_choose_dir (const gchar* user_title);
VALA_EXTERN Exporter* exporter_new (GeeCollection* to_export,
                        GFile* dir,
                        Scaling* scaling,
                        ExportFormatParameters* export_params,
                        gboolean auto_replace_all);
VALA_EXTERN Exporter* exporter_construct (GType object_type,
                              GeeCollection* to_export,
                              GFile* dir,
                              Scaling* scaling,
                              ExportFormatParameters* export_params,
                              gboolean auto_replace_all);
VALA_EXTERN ExporterUI* exporter_ui_new (Exporter* exporter);
VALA_EXTERN ExporterUI* exporter_ui_construct (GType object_type,
                                   Exporter* exporter);
VALA_EXTERN void exporter_ui_export (ExporterUI* self,
                         ExporterCompletionCallback completion_callback,
                         gpointer completion_callback_target);
VALA_EXTERN gboolean photo_has_transformations (Photo* self);
VALA_EXTERN gboolean photo_has_editable (Photo* self);
static gboolean collection_page_can_revert_editable_selected (CollectionPage* self);
VALA_EXTERN GType command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Command, g_object_unref)
VALA_EXTERN GType page_command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PageCommand, g_object_unref)
VALA_EXTERN GType multiple_data_source_command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MultipleDataSourceCommand, g_object_unref)
VALA_EXTERN GType rotate_multiple_command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RotateMultipleCommand, g_object_unref)
VALA_EXTERN GeeList* view_collection_get_selected (ViewCollection* self);
VALA_EXTERN GType rotation_get_type (void) G_GNUC_CONST ;
VALA_EXTERN RotateMultipleCommand* rotate_multiple_command_new (GeeIterable* iter,
                                                    Rotation rotation,
                                                    const gchar* name,
                                                    const gchar* explanation,
                                                    const gchar* progress_text,
                                                    const gchar* undo_progress_text);
VALA_EXTERN RotateMultipleCommand* rotate_multiple_command_construct (GType object_type,
                                                          GeeIterable* iter,
                                                          Rotation rotation,
                                                          const gchar* name,
                                                          const gchar* explanation,
                                                          const gchar* progress_text,
                                                          const gchar* undo_progress_text);
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* page_get_command_manager (Page* self);
VALA_EXTERN void command_manager_execute (CommandManager* self,
                              Command* command);
VALA_EXTERN void publishing_ui_publishing_dialog_go (GeeCollection* to_publish);
VALA_EXTERN gboolean revert_editable_dialog (GtkWindow* owner,
                                 GeeCollection* photos);
VALA_EXTERN void photo_revert_to_master (Photo* self,
                             gboolean notify);
VALA_EXTERN GType multiple_photo_transformation_command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MultiplePhotoTransformationCommand, g_object_unref)
VALA_EXTERN GType revert_multiple_command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RevertMultipleCommand, g_object_unref)
VALA_EXTERN RevertMultipleCommand* revert_multiple_command_new (GeeIterable* iter);
VALA_EXTERN RevertMultipleCommand* revert_multiple_command_construct (GType object_type,
                                                          GeeIterable* iter);
VALA_EXTERN PixelTransformationBundle* photo_get_color_adjustments (Photo* self);
VALA_EXTERN GType adjust_colors_multiple_command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AdjustColorsMultipleCommand, g_object_unref)
VALA_EXTERN AdjustColorsMultipleCommand* adjust_colors_multiple_command_new (GeeIterable* iter,
                                                                 PixelTransformationBundle* transformations,
                                                                 const gchar* name,
                                                                 const gchar* explanation);
VALA_EXTERN AdjustColorsMultipleCommand* adjust_colors_multiple_command_construct (GType object_type,
                                                                       GeeIterable* iter,
                                                                       PixelTransformationBundle* transformations,
                                                                       const gchar* name,
                                                                       const gchar* explanation);
VALA_EXTERN GType enhance_multiple_command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (EnhanceMultipleCommand, g_object_unref)
VALA_EXTERN EnhanceMultipleCommand* enhance_multiple_command_new (GeeIterable* iter);
VALA_EXTERN EnhanceMultipleCommand* enhance_multiple_command_construct (GType object_type,
                                                            GeeIterable* iter);
VALA_EXTERN GType duplicate_multiple_photos_command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DuplicateMultiplePhotosCommand, g_object_unref)
VALA_EXTERN DuplicateMultiplePhotosCommand* duplicate_multiple_photos_command_new (GeeIterable* iter);
VALA_EXTERN DuplicateMultiplePhotosCommand* duplicate_multiple_photos_command_construct (GType object_type,
                                                                             GeeIterable* iter);
VALA_EXTERN GType dateable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Dateable, g_object_unref)
VALA_EXTERN GType adjust_date_time_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AdjustDateTimeDialog, g_object_unref)
VALA_EXTERN AdjustDateTimeDialog* adjust_date_time_dialog_new (Dateable* source,
                                                   gint photo_count,
                                                   gboolean display_options,
                                                   gboolean contains_video,
                                                   gboolean only_video);
VALA_EXTERN AdjustDateTimeDialog* adjust_date_time_dialog_construct (GType object_type,
                                                         Dateable* source,
                                                         gint photo_count,
                                                         gboolean display_options,
                                                         gboolean contains_video,
                                                         gboolean only_video);
VALA_EXTERN gboolean adjust_date_time_dialog_execute (AdjustDateTimeDialog* self,
                                          GTimeSpan* time_shift,
                                          gboolean* keep_relativity,
                                          gboolean* modify_originals);
VALA_EXTERN GType adjust_date_time_photos_command_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AdjustDateTimePhotosCommand, g_object_unref)
VALA_EXTERN AdjustDateTimePhotosCommand* adjust_date_time_photos_command_new (GeeIterable* iter,
                                                                  gint64 time_shift,
                                                                  gboolean keep_relativity,
                                                                  gboolean modify_originals);
VALA_EXTERN AdjustDateTimePhotosCommand* adjust_date_time_photos_command_construct (GType object_type,
                                                                        GeeIterable* iter,
                                                                        gint64 time_shift,
                                                                        gboolean keep_relativity,
                                                                        gboolean modify_originals);
VALA_EXTERN void photo_open_with_external_editor (Photo* self,
                                      GError** error);
VALA_EXTERN void open_external_editor_error_dialog (GError* err,
                                        Photo* photo);
VALA_EXTERN void photo_open_with_raw_external_editor (Photo* self,
                                          GError** error);
VALA_EXTERN void app_window_error_message (const gchar* message,
                               GtkWindow* parent);
VALA_EXTERN gchar* resources_launch_editor_failed (GError* err);
VALA_EXTERN void media_source_collection_filter_media (GeeCollection* media,
                                           GeeCollection* photos,
                                           GeeCollection* videos);
VALA_EXTERN GType set_background_photo_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SetBackgroundPhotoDialog, g_object_unref)
VALA_EXTERN SetBackgroundPhotoDialog* set_background_photo_dialog_new (void);
VALA_EXTERN SetBackgroundPhotoDialog* set_background_photo_dialog_construct (GType object_type);
VALA_EXTERN gboolean set_background_photo_dialog_execute (SetBackgroundPhotoDialog* self,
                                              gboolean* desktop_background,
                                              gboolean* screensaver);
VALA_EXTERN void desktop_integration_set_background (Photo* photo,
                                         gboolean desktop,
                                         gboolean screensaver);
VALA_EXTERN GType set_background_slideshow_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SetBackgroundSlideshowDialog, g_object_unref)
VALA_EXTERN SetBackgroundSlideshowDialog* set_background_slideshow_dialog_new (void);
VALA_EXTERN SetBackgroundSlideshowDialog* set_background_slideshow_dialog_construct (GType object_type);
VALA_EXTERN gboolean set_background_slideshow_dialog_execute (SetBackgroundSlideshowDialog* self,
                                                  gint* delay_value,
                                                  gboolean* desktop_background,
                                                  gboolean* screensaver);
VALA_EXTERN void desktop_integration_set_background_slideshow (GeeCollection* photos,
                                                   gdouble duration,
                                                   gdouble transition,
                                                   gboolean desktop_background,
                                                   gboolean screensaver);
VALA_EXTERN gint data_collection_get_count (DataCollection* self);
VALA_EXTERN DataView* view_collection_get_view_for_source (ViewCollection* self,
                                               DataSource* source);
VALA_EXTERN void app_window_go_fullscreen (AppWindow* self,
                               Page* page);
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 GType library_photo_source_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LibraryPhotoSourceCollection, data_collection_unref)
VALA_EXTERN SlideshowPage* slideshow_page_new (SourceCollection* sources,
                                   ViewCollection* controller,
                                   Photo* start);
VALA_EXTERN SlideshowPage* slideshow_page_construct (GType object_type,
                                         SourceCollection* sources,
                                         ViewCollection* controller,
                                         Photo* start);
VALA_EXTERN GType single_photo_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SinglePhotoPage, g_object_unref)
VALA_EXTERN GType slideshow_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SlideshowPage, g_object_unref)
static gboolean collection_page_real_on_ctrl_pressed (Page* base,
                                               GdkEventKey* event);
static gboolean collection_page_real_on_ctrl_released (Page* base,
                                                GdkEventKey* event);
static SearchViewFilter* collection_page_real_get_search_view_filter (CheckerboardPage* base);
VALA_EXTERN guint search_view_filter_get_criteria (SearchViewFilter* self);
static guint collection_page_collection_search_view_filter_real_get_criteria (SearchViewFilter* base);
VALA_EXTERN GType search_filter_criteria_get_type (void) G_GNUC_CONST ;
VALA_EXTERN DefaultSearchViewFilter* default_search_view_filter_construct (GType object_type);
static GType collection_page_collection_search_view_filter_get_type_once (void);
static void collection_page_finalize (GObject * obj);
static GType collection_page_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static const GActionEntry COLLECTION_PAGE_entries[16] = {{"Print", _collection_page_on_print_gsimple_action_activate_callback}, {"Publish", _collection_page_on_publish_gsimple_action_activate_callback}, {"RotateClockwise", _collection_page_on_rotate_clockwise_gsimple_action_activate_callback}, {"RotateCounterclockwise", _collection_page_on_rotate_counterclockwise_gsimple_action_activate_callback}, {"FlipHorizontally", _collection_page_on_flip_horizontally_gsimple_action_activate_callback}, {"FlipVertically", _collection_page_on_flip_vertically_gsimple_action_activate_callback}, {"Enhance", _collection_page_on_enhance_gsimple_action_activate_callback}, {"CopyColorAdjustments", _collection_page_on_copy_adjustments_gsimple_action_activate_callback}, {"PasteColorAdjustments", _collection_page_on_paste_adjustments_gsimple_action_activate_callback}, {"Revert", _collection_page_on_revert_gsimple_action_activate_callback}, {"SetBackground", _collection_page_on_set_background_gsimple_action_activate_callback}, {"Duplicate", _collection_page_on_duplicate_photo_gsimple_action_activate_callback}, {"AdjustDateTime", _collection_page_on_adjust_date_time_gsimple_action_activate_callback}, {"ExternalEdit", _collection_page_on_external_edit_gsimple_action_activate_callback}, {"ExternalEditRAW", _collection_page_on_external_edit_raw_gsimple_action_activate_callback}, {"Slideshow", _collection_page_on_slideshow_gsimple_action_activate_callback}};

static inline gpointer
collection_view_manager_get_instance_private (CollectionViewManager* self)
{
	return G_STRUCT_MEMBER_P (self, CollectionViewManager_private_offset);
}

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

CollectionViewManager*
collection_view_manager_construct (GType object_type,
                                   CollectionPage* page)
{
	CollectionViewManager* self = NULL;
	CollectionPage* _tmp0_;
	g_return_val_if_fail (IS_COLLECTION_PAGE (page), NULL);
	self = (CollectionViewManager*) view_manager_construct (object_type);
	_tmp0_ = _g_object_ref0 (page);
	_g_object_unref0 (self->priv->page);
	self->priv->page = _tmp0_;
	return self;
}

CollectionViewManager*
collection_view_manager_new (CollectionPage* page)
{
	return collection_view_manager_construct (TYPE_COLLECTION_VIEW_MANAGER, page);
}

static DataView*
collection_view_manager_real_create_view (ViewManager* base,
                                          DataSource* source)
{
	CollectionViewManager * self;
	CollectionPage* _tmp0_;
	DataView* _tmp1_;
	DataView* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_COLLECTION_VIEW_MANAGER, CollectionViewManager);
	g_return_val_if_fail (IS_DATA_SOURCE (source), NULL);
	_tmp0_ = self->priv->page;
	_tmp1_ = media_page_create_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_PAGE, MediaPage), source);
	result = _tmp1_;
	return result;
}

static void
collection_view_manager_class_init (CollectionViewManagerClass * klass,
                                    gpointer klass_data)
{
	collection_view_manager_parent_class = g_type_class_peek_parent (klass);
	((ViewManagerClass *) klass)->finalize = collection_view_manager_finalize;
	g_type_class_adjust_private_offset (klass, &CollectionViewManager_private_offset);
	((ViewManagerClass *) klass)->create_view = (DataView* (*) (ViewManager*, DataSource*)) collection_view_manager_real_create_view;
}

static void
collection_view_manager_instance_init (CollectionViewManager * self,
                                       gpointer klass)
{
	self->priv = collection_view_manager_get_instance_private (self);
}

static void
collection_view_manager_finalize (ViewManager * obj)
{
	CollectionViewManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_COLLECTION_VIEW_MANAGER, CollectionViewManager);
	_g_object_unref0 (self->priv->page);
	VIEW_MANAGER_CLASS (collection_view_manager_parent_class)->finalize (obj);
}

static GType
collection_view_manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (CollectionViewManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) collection_view_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CollectionViewManager), 0, (GInstanceInitFunc) collection_view_manager_instance_init, NULL };
	GType collection_view_manager_type_id;
	collection_view_manager_type_id = g_type_register_static (TYPE_VIEW_MANAGER, "CollectionViewManager", &g_define_type_info, 0);
	CollectionViewManager_private_offset = g_type_add_instance_private (collection_view_manager_type_id, sizeof (CollectionViewManagerPrivate));
	return collection_view_manager_type_id;
}

GType
collection_view_manager_get_type (void)
{
	static volatile gsize collection_view_manager_type_id__once = 0;
	if (g_once_init_enter (&collection_view_manager_type_id__once)) {
		GType collection_view_manager_type_id;
		collection_view_manager_type_id = collection_view_manager_get_type_once ();
		g_once_init_leave (&collection_view_manager_type_id__once, collection_view_manager_type_id);
	}
	return collection_view_manager_type_id__once;
}

static inline gpointer
collection_page_get_instance_private (CollectionPage* self)
{
	return G_STRUCT_MEMBER_P (self, CollectionPage_private_offset);
}

static void
_collection_page_on_print_gsimple_action_activate_callback (GSimpleAction* action,
                                                            GVariant* parameter,
                                                            gpointer self)
{
	collection_page_on_print ((CollectionPage*) self);
}

static void
_collection_page_on_publish_gsimple_action_activate_callback (GSimpleAction* action,
                                                              GVariant* parameter,
                                                              gpointer self)
{
	collection_page_on_publish ((CollectionPage*) self);
}

static void
_collection_page_on_rotate_clockwise_gsimple_action_activate_callback (GSimpleAction* action,
                                                                       GVariant* parameter,
                                                                       gpointer self)
{
	collection_page_on_rotate_clockwise ((CollectionPage*) self);
}

static void
_collection_page_on_rotate_counterclockwise_gsimple_action_activate_callback (GSimpleAction* action,
                                                                              GVariant* parameter,
                                                                              gpointer self)
{
	collection_page_on_rotate_counterclockwise ((CollectionPage*) self);
}

static void
_collection_page_on_flip_horizontally_gsimple_action_activate_callback (GSimpleAction* action,
                                                                        GVariant* parameter,
                                                                        gpointer self)
{
	collection_page_on_flip_horizontally ((CollectionPage*) self);
}

static void
_collection_page_on_flip_vertically_gsimple_action_activate_callback (GSimpleAction* action,
                                                                      GVariant* parameter,
                                                                      gpointer self)
{
	collection_page_on_flip_vertically ((CollectionPage*) self);
}

static void
_collection_page_on_enhance_gsimple_action_activate_callback (GSimpleAction* action,
                                                              GVariant* parameter,
                                                              gpointer self)
{
	collection_page_on_enhance ((CollectionPage*) self);
}

static void
_collection_page_on_copy_adjustments_gsimple_action_activate_callback (GSimpleAction* action,
                                                                       GVariant* parameter,
                                                                       gpointer self)
{
	collection_page_on_copy_adjustments ((CollectionPage*) self);
}

static void
_collection_page_on_paste_adjustments_gsimple_action_activate_callback (GSimpleAction* action,
                                                                        GVariant* parameter,
                                                                        gpointer self)
{
	collection_page_on_paste_adjustments ((CollectionPage*) self);
}

static void
_collection_page_on_revert_gsimple_action_activate_callback (GSimpleAction* action,
                                                             GVariant* parameter,
                                                             gpointer self)
{
	collection_page_on_revert ((CollectionPage*) self);
}

static void
_collection_page_on_set_background_gsimple_action_activate_callback (GSimpleAction* action,
                                                                     GVariant* parameter,
                                                                     gpointer self)
{
	collection_page_on_set_background ((CollectionPage*) self);
}

static void
_collection_page_on_duplicate_photo_gsimple_action_activate_callback (GSimpleAction* action,
                                                                      GVariant* parameter,
                                                                      gpointer self)
{
	collection_page_on_duplicate_photo ((CollectionPage*) self);
}

static void
_collection_page_on_adjust_date_time_gsimple_action_activate_callback (GSimpleAction* action,
                                                                       GVariant* parameter,
                                                                       gpointer self)
{
	collection_page_on_adjust_date_time ((CollectionPage*) self);
}

static void
_collection_page_on_external_edit_gsimple_action_activate_callback (GSimpleAction* action,
                                                                    GVariant* parameter,
                                                                    gpointer self)
{
	collection_page_on_external_edit ((CollectionPage*) self);
}

static void
_collection_page_on_external_edit_raw_gsimple_action_activate_callback (GSimpleAction* action,
                                                                        GVariant* parameter,
                                                                        gpointer self)
{
	collection_page_on_external_edit_raw ((CollectionPage*) self);
}

static void
_collection_page_on_slideshow_gsimple_action_activate_callback (GSimpleAction* action,
                                                                GVariant* parameter,
                                                                gpointer self)
{
	collection_page_on_slideshow ((CollectionPage*) self);
}

static void
_collection_page_on_photos_altered_data_collection_items_altered (DataCollection* _sender,
                                                                  GeeMap* items,
                                                                  gpointer self)
{
	collection_page_on_photos_altered ((CollectionPage*) self, items);
}

static void
_collection_page_on_external_app_changed_configuration_facade_external_app_changed (ConfigurationFacade* _sender,
                                                                                    gpointer self)
{
	collection_page_on_external_app_changed ((CollectionPage*) self);
}

CollectionPage*
collection_page_construct (GType object_type,
                           const gchar* page_name)
{
	CollectionPage * self = NULL;
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	ConfigFacade* _tmp2_;
	ConfigFacade* _tmp3_;
	g_return_val_if_fail (page_name != NULL, NULL);
	self = (CollectionPage*) media_page_construct (object_type, page_name);
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _collection_page_on_photos_altered_data_collection_items_altered, self, 0);
	_data_collection_unref0 (_tmp1_);
	checkerboard_page_init_item_context_menu (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), "CollectionContextMenu");
	page_init_toolbar (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CollectionToolbar");
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_tmp2_ = config_facade_get_instance ();
	_tmp3_ = _tmp2_;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), "external-app-changed", (GCallback) _collection_page_on_external_app_changed_configuration_facade_external_app_changed, self, 0);
	_g_object_unref0 (_tmp3_);
	return self;
}

static GtkToolbar*
collection_page_real_get_toolbar (Page* base)
{
	CollectionPage * self;
	GtkToolbar* _tmp0_;
	GtkToolbar* _tmp28_;
	GtkToolbar* _tmp29_;
	GtkToolbar* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_COLLECTION_PAGE, CollectionPage);
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->toolbar;
	if (_tmp0_ == NULL) {
		GtkToolbar* _tmp1_;
		GtkToolbar* _tmp2_;
		GtkSeparatorToolItem* separator = NULL;
		GtkSeparatorToolItem* _tmp3_;
		GtkSeparatorToolItem* _tmp4_;
		GtkSeparatorToolItem* _tmp5_;
		GtkToolbar* _tmp6_;
		GtkToolbar* _tmp7_;
		GtkSeparatorToolItem* _tmp8_;
		GtkSeparatorToolItem* drawn_separator = NULL;
		GtkSeparatorToolItem* _tmp9_;
		GtkSeparatorToolItem* _tmp10_;
		GtkSeparatorToolItem* _tmp11_;
		GtkToolbar* _tmp12_;
		GtkToolbar* _tmp13_;
		GtkSeparatorToolItem* _tmp14_;
		MediaPageZoomSliderAssembly* zoom_slider_assembly = NULL;
		MediaPageZoomSliderAssembly* _tmp15_;
		MediaPageZoomSliderAssembly* _tmp16_;
		GtkToolbar* _tmp17_;
		GtkToolbar* _tmp18_;
		MediaPageZoomSliderAssembly* _tmp19_;
		GtkToolButton* rotate_button = NULL;
		GtkBuilder* _tmp20_;
		GObject* _tmp21_;
		GtkToolButton* _tmp22_;
		GtkBindingSet* binding_set = NULL;
		GtkToolButton* _tmp23_;
		GObjectClass* _tmp24_;
		GtkBindingSet* _tmp25_;
		GtkBindingSet* _tmp26_;
		GtkBindingSet* _tmp27_;
		_tmp1_ = PAGE_CLASS (collection_page_parent_class)->get_toolbar (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_PAGE, MediaPage), TYPE_PAGE, Page));
		_tmp2_ = _tmp1_;
		_g_object_unref0 (_tmp2_);
		_tmp3_ = (GtkSeparatorToolItem*) gtk_separator_tool_item_new ();
		g_object_ref_sink (_tmp3_);
		separator = _tmp3_;
		_tmp4_ = separator;
		gtk_tool_item_set_expand (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_tool_item_get_type (), GtkToolItem), TRUE);
		_tmp5_ = separator;
		gtk_separator_tool_item_set_draw (_tmp5_, FALSE);
		_tmp6_ = page_get_toolbar (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp7_ = _tmp6_;
		_tmp8_ = separator;
		gtk_toolbar_insert (_tmp7_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_tool_item_get_type (), GtkToolItem), -1);
		_g_object_unref0 (_tmp7_);
		_tmp9_ = (GtkSeparatorToolItem*) gtk_separator_tool_item_new ();
		g_object_ref_sink (_tmp9_);
		drawn_separator = _tmp9_;
		_tmp10_ = drawn_separator;
		gtk_tool_item_set_expand (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_tool_item_get_type (), GtkToolItem), FALSE);
		_tmp11_ = drawn_separator;
		gtk_separator_tool_item_set_draw (_tmp11_, TRUE);
		_tmp12_ = page_get_toolbar (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp13_ = _tmp12_;
		_tmp14_ = drawn_separator;
		gtk_toolbar_insert (_tmp13_, G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_tool_item_get_type (), GtkToolItem), -1);
		_g_object_unref0 (_tmp13_);
		_tmp15_ = media_page_create_zoom_slider_assembly (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_PAGE, MediaPage));
		zoom_slider_assembly = _tmp15_;
		_tmp16_ = zoom_slider_assembly;
		media_page_connect_slider (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_PAGE, MediaPage), _tmp16_);
		_tmp17_ = page_get_toolbar (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp18_ = _tmp17_;
		_tmp19_ = zoom_slider_assembly;
		gtk_toolbar_insert (_tmp18_, G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_tool_item_get_type (), GtkToolItem), -1);
		_g_object_unref0 (_tmp18_);
		_tmp20_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->builder;
		_tmp21_ = gtk_builder_get_object (_tmp20_, "ToolRotate");
		_tmp22_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, gtk_tool_button_get_type ()) ? ((GtkToolButton*) _tmp21_) : NULL);
		rotate_button = _tmp22_;
		_tmp23_ = rotate_button;
		_tmp24_ = G_OBJECT_GET_CLASS (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, G_TYPE_OBJECT, GObject));
		_tmp25_ = gtk_binding_set_by_class ((gpointer) _tmp24_);
		binding_set = _tmp25_;
		_tmp26_ = binding_set;
		gtk_binding_entry_add_signal (_tmp26_, GDK_KEY_KP_Space, GDK_CONTROL_MASK, "clicked", (guint) 0, NULL);
		_tmp27_ = binding_set;
		gtk_binding_entry_add_signal (_tmp27_, GDK_KEY_space, GDK_CONTROL_MASK, "clicked", (guint) 0, NULL);
		_g_object_unref0 (rotate_button);
		_g_object_unref0 (zoom_slider_assembly);
		_g_object_unref0 (drawn_separator);
		_g_object_unref0 (separator);
	}
	_tmp28_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->toolbar;
	_tmp29_ = _g_object_ref0 (_tmp28_);
	result = _tmp29_;
	return result;
}

static InjectionGroup*
collection_page_create_file_menu_injectables (void)
{
	InjectionGroup* group = NULL;
	InjectionGroup* _tmp0_;
	InjectionGroup* result;
	_tmp0_ = injection_group_new ("FileExtrasPlaceholder");
	group = _tmp0_;
	injection_group_add_menu_item (group, _ ("_Print"), "Print", "<Primary>p");
	injection_group_add_separator (group);
	injection_group_add_menu_item (group, _ ("_Publish"), "Publish", "<Primary><Shift>p");
	injection_group_add_menu_item (group, _ ("Send _To…"), "SendTo", NULL);
	injection_group_add_menu_item (group, _ ("Set as _Desktop Background"), "SetBackground", "<Primary>b");
	result = group;
	return result;
}

static InjectionGroup*
collection_page_create_edit_menu_injectables (void)
{
	InjectionGroup* group = NULL;
	InjectionGroup* _tmp0_;
	InjectionGroup* result;
	_tmp0_ = injection_group_new ("EditExtrasPlaceholder");
	group = _tmp0_;
	injection_group_add_menu_item (group, _ ("_Duplicate"), "Duplicate", "<Primary>D");
	result = group;
	return result;
}

static InjectionGroup*
collection_page_create_view_menu_fullscreen_injectables (void)
{
	InjectionGroup* group = NULL;
	InjectionGroup* _tmp0_;
	InjectionGroup* result;
	_tmp0_ = injection_group_new ("ViewExtrasFullscreenSlideshowPlaceholder");
	group = _tmp0_;
	injection_group_add_menu_item (group, _ ("Fullscreen"), "CommonFullscreen", "F11");
	injection_group_add_separator (group);
	injection_group_add_menu_item (group, _ ("S_lideshow"), "Slideshow", "F5");
	result = group;
	return result;
}

static InjectionGroup*
collection_page_create_photos_menu_edits_injectables (void)
{
	InjectionGroup* group = NULL;
	InjectionGroup* _tmp0_;
	InjectionGroup* result;
	_tmp0_ = injection_group_new ("PhotosExtrasEditsPlaceholder");
	group = _tmp0_;
	injection_group_add_menu_item (group, _ ("Rotate _Right"), "RotateClockwise", "<Primary>r");
	injection_group_add_menu_item (group, _ ("Rotate _Left"), "RotateCounterclockwise", "<Primary><Shift>r");
	injection_group_add_menu_item (group, _ ("Flip Hori_zontally"), "FlipHorizontally", NULL);
	injection_group_add_menu_item (group, _ ("Flip Verti_cally"), "FlipVertically", NULL);
	injection_group_add_separator (group);
	injection_group_add_menu_item (group, _ ("_Enhance"), "Enhance", NULL);
	injection_group_add_menu_item (group, _ ("Re_vert to Original"), "Revert", NULL);
	injection_group_add_separator (group);
	injection_group_add_menu_item (group, _ ("_Copy Color Adjustments"), "CopyColorAdjustments", "<Primary><Shift>c");
	injection_group_add_menu_item (group, _ ("_Paste Color Adjustments"), "PasteColorAdjustments", "<Primary><Shift>v");
	result = group;
	return result;
}

static InjectionGroup*
collection_page_create_photos_menu_date_injectables (void)
{
	InjectionGroup* group = NULL;
	InjectionGroup* _tmp0_;
	InjectionGroup* result;
	_tmp0_ = injection_group_new ("PhotosExtrasDateTimePlaceholder");
	group = _tmp0_;
	injection_group_add_menu_item (group, _ ("Adjust Date and Time…"), "AdjustDateTime", "F4");
	result = group;
	return result;
}

static InjectionGroup*
collection_page_create_photos_menu_externals_injectables (void)
{
	InjectionGroup* group = NULL;
	InjectionGroup* _tmp0_;
	InjectionGroup* result;
	_tmp0_ = injection_group_new ("PhotosExtrasExternalsPlaceholder");
	group = _tmp0_;
	injection_group_add_menu_item (group, _ ("Open With E_xternal Editor"), "ExternalEdit", "<Primary>Return");
	injection_group_add_menu_item (group, _ ("Open With RA_W Editor"), "ExternalEditRAW", "<Primary><Shift>Return");
	injection_group_add_menu_item (group, _ ("_Play"), "PlayVideo", "<Primary>Y");
	result = group;
	return result;
}

static void
collection_page_real_init_collect_ui_filenames (Page* base,
                                                GeeList* ui_filenames)
{
	CollectionPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_COLLECTION_PAGE, CollectionPage);
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (ui_filenames, GEE_TYPE_LIST));
	PAGE_CLASS (collection_page_parent_class)->init_collect_ui_filenames (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_PAGE, MediaPage), TYPE_PAGE, Page), ui_filenames);
	gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (ui_filenames, GEE_TYPE_COLLECTION, GeeCollection), "collection.ui");
}

static void
collection_page_real_add_actions (Page* base,
                                  GActionMap* map)
{
	CollectionPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_COLLECTION_PAGE, CollectionPage);
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (map, g_action_map_get_type ()));
	PAGE_CLASS (collection_page_parent_class)->add_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_PAGE, MediaPage), TYPE_PAGE, Page), map);
	g_action_map_add_action_entries (map, COLLECTION_PAGE_entries, (gint) G_N_ELEMENTS (COLLECTION_PAGE_entries), self);
}

static void
collection_page_real_remove_actions (Page* base,
                                     GActionMap* map)
{
	CollectionPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_COLLECTION_PAGE, CollectionPage);
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (map, g_action_map_get_type ()));
	PAGE_CLASS (collection_page_parent_class)->remove_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_PAGE, MediaPage), TYPE_PAGE, Page), map);
	{
		GActionEntry* entry_collection = NULL;
		gint entry_collection_length1 = 0;
		gint _entry_collection_size_ = 0;
		gint entry_it = 0;
		entry_collection = COLLECTION_PAGE_entries;
		entry_collection_length1 = G_N_ELEMENTS (COLLECTION_PAGE_entries);
		for (entry_it = 0; entry_it < entry_collection_length1; entry_it = entry_it + 1) {
			GActionEntry entry = {0};
			entry = entry_collection[entry_it];
			{
				GActionEntry _tmp0_;
				const gchar* _tmp1_;
				_tmp0_ = entry;
				_tmp1_ = _tmp0_.name;
				g_action_map_remove_action (map, _tmp1_);
			}
		}
	}
}

static void
_vala_array_add74 (InjectionGroup** * array,
                   gint* length,
                   gint* size,
                   InjectionGroup* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (InjectionGroup*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add75 (InjectionGroup** * array,
                   gint* length,
                   gint* size,
                   InjectionGroup* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (InjectionGroup*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add76 (InjectionGroup** * array,
                   gint* length,
                   gint* size,
                   InjectionGroup* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (InjectionGroup*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add77 (InjectionGroup** * array,
                   gint* length,
                   gint* size,
                   InjectionGroup* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (InjectionGroup*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add78 (InjectionGroup** * array,
                   gint* length,
                   gint* size,
                   InjectionGroup* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (InjectionGroup*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add79 (InjectionGroup** * array,
                   gint* length,
                   gint* size,
                   InjectionGroup* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (InjectionGroup*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static InjectionGroup**
collection_page_real_init_collect_injection_groups (Page* base,
                                                    gint* result_length1)
{
	CollectionPage * self;
	InjectionGroup** groups = NULL;
	gint _tmp0_ = 0;
	InjectionGroup** _tmp1_;
	gint groups_length1;
	gint _groups_size_;
	InjectionGroup* _tmp2_;
	InjectionGroup* _tmp3_;
	InjectionGroup* _tmp4_;
	InjectionGroup* _tmp5_;
	InjectionGroup* _tmp6_;
	InjectionGroup* _tmp7_;
	InjectionGroup** _tmp8_;
	gint _tmp8__length1;
	InjectionGroup** result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_COLLECTION_PAGE, CollectionPage);
	_tmp1_ = PAGE_CLASS (collection_page_parent_class)->init_collect_injection_groups (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_PAGE, MediaPage), TYPE_PAGE, Page), &_tmp0_);
	groups = _tmp1_;
	groups_length1 = _tmp0_;
	_groups_size_ = groups_length1;
	_tmp2_ = collection_page_create_file_menu_injectables ();
	_vala_array_add74 (&groups, &groups_length1, &_groups_size_, _tmp2_);
	_tmp3_ = collection_page_create_edit_menu_injectables ();
	_vala_array_add75 (&groups, &groups_length1, &_groups_size_, _tmp3_);
	_tmp4_ = collection_page_create_view_menu_fullscreen_injectables ();
	_vala_array_add76 (&groups, &groups_length1, &_groups_size_, _tmp4_);
	_tmp5_ = collection_page_create_photos_menu_edits_injectables ();
	_vala_array_add77 (&groups, &groups_length1, &_groups_size_, _tmp5_);
	_tmp6_ = collection_page_create_photos_menu_date_injectables ();
	_vala_array_add78 (&groups, &groups_length1, &_groups_size_, _tmp6_);
	_tmp7_ = collection_page_create_photos_menu_externals_injectables ();
	_vala_array_add79 (&groups, &groups_length1, &_groups_size_, _tmp7_);
	_tmp8_ = groups;
	_tmp8__length1 = groups_length1;
	if (result_length1) {
		*result_length1 = _tmp8__length1;
	}
	result = _tmp8_;
	return result;
}

static gboolean
collection_page_selection_has_video (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	GeeList* _tmp2_;
	GeeCollection* _tmp3_;
	gboolean _tmp4_;
	gboolean result;
	g_return_val_if_fail (IS_COLLECTION_PAGE (self), FALSE);
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_sources (_tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection);
	_tmp4_ = media_source_collection_has_video (_tmp3_);
	_g_object_unref0 (_tmp3_);
	_data_collection_unref0 (_tmp1_);
	result = _tmp4_;
	return result;
}

static gboolean
collection_page_page_has_photo (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	GeeCollection* _tmp2_;
	GeeCollection* _tmp3_;
	gboolean _tmp4_;
	gboolean result;
	g_return_val_if_fail (IS_COLLECTION_PAGE (self), FALSE);
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_sources (_tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection);
	_tmp4_ = media_source_collection_has_photo (_tmp3_);
	_g_object_unref0 (_tmp3_);
	_data_collection_unref0 (_tmp1_);
	result = _tmp4_;
	return result;
}

static gboolean
collection_page_selection_has_photo (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	GeeList* _tmp2_;
	GeeCollection* _tmp3_;
	gboolean _tmp4_;
	gboolean result;
	g_return_val_if_fail (IS_COLLECTION_PAGE (self), FALSE);
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_sources (_tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection);
	_tmp4_ = media_source_collection_has_photo (_tmp3_);
	_g_object_unref0 (_tmp3_);
	_data_collection_unref0 (_tmp1_);
	result = _tmp4_;
	return result;
}

static void
collection_page_real_init_actions (Page* base,
                                   gint selected_count,
                                   gint count)
{
	CollectionPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_COLLECTION_PAGE, CollectionPage);
	PAGE_CLASS (collection_page_parent_class)->init_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_PAGE, MediaPage), TYPE_PAGE, Page), selected_count, count);
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateClockwise", TRUE);
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateCounterclockwise", TRUE);
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Enhance", TRUE);
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Publish", TRUE);
}

static void
collection_page_real_update_actions (Page* base,
                                     gint selected_count,
                                     gint count)
{
	CollectionPage * self;
	AppWindow* _tmp0_;
	AppWindow* _tmp1_;
	Page* _tmp2_;
	Page* _tmp3_;
	gboolean _tmp4_;
	gboolean one_selected = FALSE;
	gboolean has_selected = FALSE;
	gboolean primary_is_video = FALSE;
	gboolean selection_has_videos = FALSE;
	gboolean selection_has_photos = FALSE;
	gboolean page_has_photos = FALSE;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp19_ = FALSE;
	gboolean _tmp20_ = FALSE;
	gboolean _tmp21_ = FALSE;
	gboolean _tmp32_ = FALSE;
	gboolean _tmp33_ = FALSE;
	gboolean _tmp34_ = FALSE;
	gboolean _tmp35_ = FALSE;
	gboolean _tmp42_ = FALSE;
	gboolean _tmp43_ = FALSE;
	gboolean _tmp44_ = FALSE;
	gboolean _tmp45_ = FALSE;
	gboolean _tmp46_ = FALSE;
	gboolean _tmp47_ = FALSE;
	gboolean _tmp48_ = FALSE;
	gboolean _tmp49_ = FALSE;
	gboolean _tmp50_ = FALSE;
	gboolean _tmp51_ = FALSE;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_COLLECTION_PAGE, CollectionPage);
	_tmp0_ = app_window_get_instance ();
	_tmp1_ = _tmp0_;
	_tmp2_ = page_window_get_current_page (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE_WINDOW, PageWindow));
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_ != G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page);
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
	if (_tmp4_) {
		return;
	}
	PAGE_CLASS (collection_page_parent_class)->update_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_PAGE, MediaPage), TYPE_PAGE, Page), selected_count, count);
	one_selected = selected_count == 1;
	has_selected = selected_count > 0;
	primary_is_video = FALSE;
	if (has_selected) {
		ViewCollection* _tmp5_;
		ViewCollection* _tmp6_;
		DataView* _tmp7_;
		DataView* _tmp8_;
		DataSource* _tmp9_;
		DataSource* _tmp10_;
		gboolean _tmp11_;
		_tmp5_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp6_ = _tmp5_;
		_tmp7_ = view_collection_get_selected_at (_tmp6_, 0);
		_tmp8_ = _tmp7_;
		_tmp9_ = data_view_get_source (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = IS_VIDEO (_tmp10_);
		_g_object_unref0 (_tmp10_);
		_g_object_unref0 (_tmp8_);
		_data_collection_unref0 (_tmp6_);
		if (_tmp11_) {
			primary_is_video = TRUE;
		}
	}
	selection_has_videos = collection_page_selection_has_video (self);
	selection_has_photos = collection_page_selection_has_photo (self);
	page_has_photos = collection_page_page_has_photo (self);
	if (has_selected) {
		_tmp12_ = !selection_has_videos;
	} else {
		_tmp12_ = FALSE;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Duplicate", _tmp12_);
	if (!primary_is_video) {
		_tmp14_ = one_selected;
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		ConfigFacade* _tmp15_;
		ConfigFacade* _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		_tmp15_ = config_facade_get_instance ();
		_tmp16_ = _tmp15_;
		_tmp17_ = configuration_facade_get_external_photo_app (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
		_tmp18_ = _tmp17_;
		_tmp13_ = !is_string_empty (_tmp18_);
		_g_free0 (_tmp18_);
		_g_object_unref0 (_tmp16_);
	} else {
		_tmp13_ = FALSE;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ExternalEdit", _tmp13_);
	if (one_selected) {
		_tmp21_ = !primary_is_video;
	} else {
		_tmp21_ = FALSE;
	}
	if (_tmp21_) {
		ViewCollection* _tmp22_;
		ViewCollection* _tmp23_;
		DataView* _tmp24_;
		DataView* _tmp25_;
		DataSource* _tmp26_;
		Photo* _tmp27_;
		_tmp22_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp23_ = _tmp22_;
		_tmp24_ = view_collection_get_selected_at (_tmp23_, 0);
		_tmp25_ = _tmp24_;
		_tmp26_ = data_view_get_source (_tmp25_);
		_tmp27_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_PHOTO, Photo);
		_tmp20_ = photo_get_master_file_format (_tmp27_) == PHOTO_FILE_FORMAT_RAW;
		_g_object_unref0 (_tmp27_);
		_g_object_unref0 (_tmp25_);
		_data_collection_unref0 (_tmp23_);
	} else {
		_tmp20_ = FALSE;
	}
	if (_tmp20_) {
		ConfigFacade* _tmp28_;
		ConfigFacade* _tmp29_;
		gchar* _tmp30_;
		gchar* _tmp31_;
		_tmp28_ = config_facade_get_instance ();
		_tmp29_ = _tmp28_;
		_tmp30_ = configuration_facade_get_external_raw_app (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
		_tmp31_ = _tmp30_;
		_tmp19_ = !is_string_empty (_tmp31_);
		_g_free0 (_tmp31_);
		_g_object_unref0 (_tmp29_);
	} else {
		_tmp19_ = FALSE;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ExternalEditRAW", _tmp19_);
	if (!selection_has_videos) {
		_tmp32_ = collection_page_can_revert_selected (self);
	} else {
		_tmp32_ = FALSE;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Revert", _tmp32_);
	if (!selection_has_videos) {
		_tmp33_ = has_selected;
	} else {
		_tmp33_ = FALSE;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Enhance", _tmp33_);
	if (!selection_has_videos) {
		_tmp35_ = one_selected;
	} else {
		_tmp35_ = FALSE;
	}
	if (_tmp35_) {
		ViewCollection* _tmp36_;
		ViewCollection* _tmp37_;
		DataView* _tmp38_;
		DataView* _tmp39_;
		DataSource* _tmp40_;
		Photo* _tmp41_;
		_tmp36_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp37_ = _tmp36_;
		_tmp38_ = view_collection_get_selected_at (_tmp37_, 0);
		_tmp39_ = _tmp38_;
		_tmp40_ = data_view_get_source (_tmp39_);
		_tmp41_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, TYPE_PHOTO, Photo);
		_tmp34_ = photo_has_color_adjustments (_tmp41_);
		_g_object_unref0 (_tmp41_);
		_g_object_unref0 (_tmp39_);
		_data_collection_unref0 (_tmp37_);
	} else {
		_tmp34_ = FALSE;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CopyColorAdjustments", _tmp34_);
	if (!selection_has_videos) {
		_tmp43_ = has_selected;
	} else {
		_tmp43_ = FALSE;
	}
	if (_tmp43_) {
		_tmp42_ = pixel_transformation_bundle_has_copied_color_adjustments ();
	} else {
		_tmp42_ = FALSE;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "PasteColorAdjustments", _tmp42_);
	if (!selection_has_videos) {
		_tmp44_ = has_selected;
	} else {
		_tmp44_ = FALSE;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateClockwise", _tmp44_);
	if (!selection_has_videos) {
		_tmp45_ = has_selected;
	} else {
		_tmp45_ = FALSE;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateCounterclockwise", _tmp45_);
	if (!selection_has_videos) {
		_tmp46_ = has_selected;
	} else {
		_tmp46_ = FALSE;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "FlipHorizontally", _tmp46_);
	if (!selection_has_videos) {
		_tmp47_ = has_selected;
	} else {
		_tmp47_ = FALSE;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "FlipVertically", _tmp47_);
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "AdjustDateTime", has_selected);
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "NewEvent", has_selected);
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "AddTags", has_selected);
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ModifyTags", one_selected);
	if (page_has_photos) {
		_tmp49_ = !has_selected;
	} else {
		_tmp49_ = FALSE;
	}
	if (_tmp49_) {
		_tmp48_ = TRUE;
	} else {
		_tmp48_ = selection_has_photos;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Slideshow", _tmp48_);
	if (!selection_has_videos) {
		_tmp50_ = has_selected;
	} else {
		_tmp50_ = FALSE;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Print", _tmp50_);
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Publish", has_selected);
	if (has_selected) {
		_tmp51_ = selection_has_photos;
	} else {
		_tmp51_ = FALSE;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "SetBackground", _tmp51_);
	if (has_selected) {
		const gchar* _tmp52_ = NULL;
		gchar* label = NULL;
		gchar* _tmp53_;
		const gchar* _tmp54_;
		g_debug ("CollectionPage.vala:283: Setting action label for SetBackground...");
		if (one_selected) {
			_tmp52_ = RESOURCES_SET_BACKGROUND_MENU;
		} else {
			_tmp52_ = RESOURCES_SET_BACKGROUND_SLIDESHOW_MENU;
		}
		_tmp53_ = g_strdup (_tmp52_);
		label = _tmp53_;
		_tmp54_ = label;
		page_update_menu_item_label (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "SetBackground", _tmp54_);
		_g_free0 (label);
	}
}

static void
collection_page_on_photos_altered (CollectionPage* self,
                                   GeeMap* altered)
{
	g_return_if_fail (IS_COLLECTION_PAGE (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_;
			DataView* view = NULL;
			DataObject* _tmp8_;
			DataView* _tmp9_;
			gboolean _tmp10_ = FALSE;
			DataView* _tmp11_;
			LibraryPhoto* photo = NULL;
			DataView* _tmp15_;
			DataSource* _tmp16_;
			LibraryPhoto* _tmp17_;
			LibraryPhoto* _tmp18_;
			LibraryPhoto* _tmp19_;
			_tmp5_ = _object_it;
			if (!gee_iterator_next (_tmp5_)) {
				break;
			}
			_tmp6_ = _object_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			object = (DataObject*) _tmp7_;
			_tmp8_ = object;
			_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_VIEW, DataView));
			view = _tmp9_;
			_tmp11_ = view;
			if (!data_view_is_selected (_tmp11_)) {
				_tmp10_ = TRUE;
			} else {
				DataView* _tmp12_;
				gpointer _tmp13_;
				Alteration* _tmp14_;
				_tmp12_ = view;
				_tmp13_ = gee_map_get (altered, G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_DATA_OBJECT, DataObject));
				_tmp14_ = (Alteration*) _tmp13_;
				_tmp10_ = !alteration_has_subject (_tmp14_, "image");
				_alteration_unref0 (_tmp14_);
			}
			if (_tmp10_) {
				_g_object_unref0 (view);
				_g_object_unref0 (object);
				continue;
			}
			_tmp15_ = view;
			_tmp16_ = data_view_get_source (_tmp15_);
			_tmp17_ = IS_LIBRARY_PHOTO (_tmp16_) ? ((LibraryPhoto*) _tmp16_) : NULL;
			if (_tmp17_ == NULL) {
				_g_object_unref0 (_tmp16_);
			}
			photo = _tmp17_;
			_tmp18_ = photo;
			if (_tmp18_ == NULL) {
				_g_object_unref0 (photo);
				_g_object_unref0 (view);
				_g_object_unref0 (object);
				continue;
			}
			page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Revert", collection_page_can_revert_selected (self));
			_tmp19_ = photo;
			page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CopyColorAdjustments", photo_has_color_adjustments (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_PHOTO, Photo)));
			_g_object_unref0 (photo);
			_g_object_unref0 (view);
			_g_object_unref0 (object);
			break;
		}
		_g_object_unref0 (_object_it);
	}
}

static void
collection_page_on_print (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_count (_tmp1_) > 0;
	_data_collection_unref0 (_tmp1_);
	if (_tmp2_) {
		PrintManager* _tmp3_;
		PrintManager* _tmp4_;
		ViewCollection* _tmp5_;
		ViewCollection* _tmp6_;
		GeeList* _tmp7_;
		GeeCollection* _tmp8_;
		_tmp3_ = print_manager_get_instance ();
		_tmp4_ = _tmp3_;
		_tmp5_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp6_ = _tmp5_;
		_tmp7_ = view_collection_get_selected_sources_of_type (_tmp6_, TYPE_PHOTO);
		_tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection);
		print_manager_spool_photo (_tmp4_, _tmp8_);
		_g_object_unref0 (_tmp8_);
		_data_collection_unref0 (_tmp6_);
		_print_manager_unref0 (_tmp4_);
	}
}

static void
collection_page_on_external_app_changed (CollectionPage* self)
{
	gint selected_count = 0;
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gint _tmp2_;
	gboolean _tmp3_ = FALSE;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_count (_tmp1_);
	_data_collection_unref0 (_tmp1_);
	selected_count = _tmp2_;
	if (selected_count == 1) {
		ConfigFacade* _tmp4_;
		ConfigFacade* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp4_ = config_facade_get_instance ();
		_tmp5_ = _tmp4_;
		_tmp6_ = configuration_facade_get_external_photo_app (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
		_tmp7_ = _tmp6_;
		_tmp3_ = g_strcmp0 (_tmp7_, "") != 0;
		_g_free0 (_tmp7_);
		_g_object_unref0 (_tmp5_);
	} else {
		_tmp3_ = FALSE;
	}
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ExternalEdit", _tmp3_);
}

static void
collection_page_real_on_item_activated (CheckerboardPage* base,
                                        CheckerboardItem* item,
                                        CheckerboardPageActivator activator,
                                        CheckerboardPageKeyboardModifiers* modifiers)
{
	CollectionPage * self;
	Thumbnail* thumbnail = NULL;
	Thumbnail* _tmp0_;
	Thumbnail* _tmp1_;
	MediaSource* _tmp2_;
	MediaSource* _tmp3_;
	gboolean _tmp4_;
	LibraryPhoto* photo = NULL;
	Thumbnail* _tmp5_;
	MediaSource* _tmp6_;
	LibraryPhoto* _tmp7_;
	LibraryPhoto* _tmp8_;
	LibraryPhoto* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_COLLECTION_PAGE, CollectionPage);
	g_return_if_fail (IS_CHECKERBOARD_ITEM (item));
	g_return_if_fail (modifiers != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (item, TYPE_THUMBNAIL, Thumbnail));
	thumbnail = _tmp0_;
	_tmp1_ = thumbnail;
	_tmp2_ = thumbnail_get_media_source (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = IS_VIDEO (_tmp3_);
	_g_object_unref0 (_tmp3_);
	if (_tmp4_) {
		media_page_on_play_video (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_PAGE, MediaPage));
		_g_object_unref0 (thumbnail);
		return;
	}
	_tmp5_ = thumbnail;
	_tmp6_ = thumbnail_get_media_source (_tmp5_);
	_tmp7_ = IS_LIBRARY_PHOTO (_tmp6_) ? ((LibraryPhoto*) _tmp6_) : NULL;
	if (_tmp7_ == NULL) {
		_g_object_unref0 (_tmp6_);
	}
	photo = _tmp7_;
	_tmp8_ = photo;
	if (_tmp8_ == NULL) {
		_g_object_unref0 (photo);
		_g_object_unref0 (thumbnail);
		return;
	}
	_tmp9_ = photo;
	_tmp10_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_OBJECT, DataObject));
	_tmp11_ = _tmp10_;
	g_debug ("CollectionPage.vala:349: activating %s", _tmp11_);
	_g_free0 (_tmp11_);
	if (activator == CHECKERBOARD_PAGE_ACTIVATOR_MOUSE) {
		CheckerboardPageKeyboardModifiers _tmp12_;
		_tmp12_ = *modifiers;
		if (_tmp12_.super_pressed) {
			collection_page_on_external_edit (self);
		} else {
			LibraryWindow* _tmp13_;
			LibraryWindow* _tmp14_;
			LibraryPhoto* _tmp15_;
			_tmp13_ = library_window_get_app ();
			_tmp14_ = _tmp13_;
			_tmp15_ = photo;
			library_window_switch_to_photo_page (_tmp14_, self, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_PHOTO, Photo));
			_g_object_unref0 (_tmp14_);
		}
	} else {
		if (activator == CHECKERBOARD_PAGE_ACTIVATOR_KEYBOARD) {
			gboolean _tmp16_ = FALSE;
			CheckerboardPageKeyboardModifiers _tmp17_;
			_tmp17_ = *modifiers;
			if (!_tmp17_.shift_pressed) {
				CheckerboardPageKeyboardModifiers _tmp18_;
				_tmp18_ = *modifiers;
				_tmp16_ = !_tmp18_.ctrl_pressed;
			} else {
				_tmp16_ = FALSE;
			}
			if (_tmp16_) {
				LibraryWindow* _tmp19_;
				LibraryWindow* _tmp20_;
				LibraryPhoto* _tmp21_;
				_tmp19_ = library_window_get_app ();
				_tmp20_ = _tmp19_;
				_tmp21_ = photo;
				library_window_switch_to_photo_page (_tmp20_, self, G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_PHOTO, Photo));
				_g_object_unref0 (_tmp20_);
			}
		}
	}
	_g_object_unref0 (photo);
	_g_object_unref0 (thumbnail);
}

static gboolean
collection_page_real_on_app_key_pressed (Page* base,
                                         GdkEventKey* event)
{
	CollectionPage * self;
	gboolean handled = FALSE;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	static GQuark _tmp2_label2 = 0;
	static GQuark _tmp2_label3 = 0;
	static GQuark _tmp2_label4 = 0;
	static GQuark _tmp2_label5 = 0;
	static GQuark _tmp2_label6 = 0;
	static GQuark _tmp2_label7 = 0;
	static GQuark _tmp2_label8 = 0;
	static GQuark _tmp2_label9 = 0;
	gboolean _tmp5_ = FALSE;
	gboolean result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_COLLECTION_PAGE, CollectionPage);
	g_return_val_if_fail (event != NULL, FALSE);
	handled = TRUE;
	_tmp0_ = gdk_keyval_name (event->keyval);
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	if ((((((((_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("Page_Up")))) || (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("KP_Page_Up"))))) || (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("Page_Down"))))) || (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("KP_Page_Down"))))) || (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("Home"))))) || (_tmp3_ == ((0 != _tmp2_label5) ? _tmp2_label5 : (_tmp2_label5 = g_quark_from_static_string ("KP_Home"))))) || (_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string ("End"))))) || (_tmp3_ == ((0 != _tmp2_label7) ? _tmp2_label7 : (_tmp2_label7 = g_quark_from_static_string ("KP_End"))))) {
		switch (0) {
			default:
			{
				gboolean _tmp4_ = FALSE;
				g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "key-press-event", event, &_tmp4_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label8) ? _tmp2_label8 : (_tmp2_label8 = g_quark_from_static_string ("bracketright")))) {
		switch (0) {
			default:
			{
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateClockwise");
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label9) ? _tmp2_label9 : (_tmp2_label9 = g_quark_from_static_string ("bracketleft")))) {
		switch (0) {
			default:
			{
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateCounterclockwise");
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				handled = FALSE;
				break;
			}
		}
	}
	if (handled) {
		_tmp5_ = TRUE;
	} else {
		_tmp5_ = PAGE_CLASS (collection_page_parent_class)->on_app_key_pressed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_PAGE, MediaPage), TYPE_PAGE, Page), event);
	}
	result = _tmp5_;
	return result;
}

static void
_collection_page_on_export_completed_exporter_completion_callback (Exporter* exporter,
                                                                   gboolean is_cancelled,
                                                                   gpointer self)
{
	collection_page_on_export_completed ((CollectionPage*) self);
}

static void
collection_page_real_on_export (MediaPage* base)
{
	CollectionPage * self;
	ExporterUI* _tmp0_;
	GeeCollection* export_list = NULL;
	ViewCollection* _tmp1_;
	ViewCollection* _tmp2_;
	GeeList* _tmp3_;
	GeeCollection* _tmp4_;
	GeeCollection* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gboolean has_some_photos = FALSE;
	gboolean has_some_videos = FALSE;
	gboolean _tmp8_ = FALSE;
	gchar* title = NULL;
	ExportDialog* export_dialog = NULL;
	const gchar* _tmp19_;
	ExportDialog* _tmp20_;
	ExportFormatParameters _tmp21_ = {0};
	ExportFormatParameters export_params = {0};
	gint scale = 0;
	ScaleConstraint constraint = 0;
	ExportDialog* _tmp24_;
	gint _tmp25_ = 0;
	ScaleConstraint _tmp26_ = 0;
	gboolean _tmp27_;
	Scaling scaling = {0};
	Scaling _tmp28_ = {0};
	GeeCollection* _tmp29_;
	gint _tmp30_;
	gint _tmp31_;
	GFile* export_dir = NULL;
	const gchar* _tmp61_;
	GFile* _tmp62_;
	GFile* _tmp63_;
	GeeCollection* _tmp64_;
	GFile* _tmp65_;
	Scaling _tmp66_;
	ExportFormatParameters _tmp67_;
	Exporter* _tmp68_;
	Exporter* _tmp69_;
	ExporterUI* _tmp70_;
	ExporterUI* _tmp71_;
	GError* _inner_error0_ = NULL;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_COLLECTION_PAGE, CollectionPage);
	_tmp0_ = self->priv->exporter;
	if (_tmp0_ != NULL) {
		return;
	}
	_tmp1_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp2_ = _tmp1_;
	_tmp3_ = view_collection_get_selected_sources (_tmp2_);
	_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection);
	_data_collection_unref0 (_tmp2_);
	export_list = _tmp4_;
	_tmp5_ = export_list;
	_tmp6_ = gee_collection_get_size (_tmp5_);
	_tmp7_ = _tmp6_;
	if (_tmp7_ == 0) {
		_g_object_unref0 (export_list);
		return;
	}
	has_some_photos = collection_page_selection_has_photo (self);
	has_some_videos = collection_page_selection_has_video (self);
	if (has_some_photos) {
		_tmp8_ = TRUE;
	} else {
		_tmp8_ = has_some_videos;
	}
	_vala_assert (_tmp8_, "has_some_photos || has_some_videos");
	if (!has_some_photos) {
		GeeCollection* _tmp9_;
		ExporterUI* _tmp10_;
		_tmp9_ = export_list;
		_tmp10_ = video_export_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_COLLECTION, GeeCollection), _collection_page_on_export_completed_exporter_completion_callback, self, FALSE);
		_exporter_ui_unref0 (self->priv->exporter);
		self->priv->exporter = _tmp10_;
		_g_object_unref0 (export_list);
		return;
	}
	title = NULL;
	if (has_some_videos) {
		GeeCollection* _tmp11_;
		gint _tmp12_;
		gint _tmp13_;
		gchar* _tmp14_;
		_tmp11_ = export_list;
		_tmp12_ = gee_collection_get_size (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = g_strdup (ngettext ("Export Photo/Video", "Export Photos/Videos", (gulong) _tmp13_));
		_g_free0 (title);
		title = _tmp14_;
	} else {
		GeeCollection* _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		gchar* _tmp18_;
		_tmp15_ = export_list;
		_tmp16_ = gee_collection_get_size (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = g_strdup (ngettext ("Export Photo", "Export Photos", (gulong) _tmp17_));
		_g_free0 (title);
		title = _tmp18_;
	}
	_tmp19_ = title;
	_tmp20_ = export_dialog_new (_tmp19_);
	g_object_ref_sink (_tmp20_);
	export_dialog = _tmp20_;
	if (has_some_videos) {
		ExportFormatParameters _tmp22_ = {0};
		export_format_parameters_current (&_tmp22_);
		_tmp21_ = _tmp22_;
	} else {
		ExportFormatParameters _tmp23_ = {0};
		export_format_parameters_last (&_tmp23_);
		_tmp21_ = _tmp23_;
	}
	export_params = _tmp21_;
	_tmp24_ = export_dialog;
	_tmp27_ = export_dialog_execute (_tmp24_, &_tmp25_, &_tmp26_, &export_params);
	scale = _tmp25_;
	constraint = _tmp26_;
	if (!_tmp27_) {
		_g_object_unref0 (export_dialog);
		_g_free0 (title);
		_g_object_unref0 (export_list);
		return;
	}
	scaling_for_constraint (constraint, scale, FALSE, &_tmp28_);
	scaling = _tmp28_;
	_tmp29_ = export_list;
	_tmp30_ = gee_collection_get_size (_tmp29_);
	_tmp31_ = _tmp30_;
	if (_tmp31_ == 1) {
		LibraryPhoto* photo = NULL;
		GFile* save_as = NULL;
		LibraryPhoto* _tmp39_;
		ExportFormatParameters _tmp40_;
		gchar* _tmp41_;
		gchar* _tmp42_;
		GFile* _tmp43_;
		GFile* _tmp44_;
		GFile* _tmp45_;
		photo = NULL;
		{
			GeeIterator* _p_it = NULL;
			GeeCollection* _tmp32_;
			GeeIterator* _tmp33_;
			_tmp32_ = export_list;
			_tmp33_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, GEE_TYPE_COLLECTION, GeeCollection), GEE_TYPE_ITERABLE, GeeIterable));
			_p_it = _tmp33_;
			while (TRUE) {
				GeeIterator* _tmp34_;
				LibraryPhoto* p = NULL;
				GeeIterator* _tmp35_;
				gpointer _tmp36_;
				LibraryPhoto* _tmp37_;
				LibraryPhoto* _tmp38_;
				_tmp34_ = _p_it;
				if (!gee_iterator_next (_tmp34_)) {
					break;
				}
				_tmp35_ = _p_it;
				_tmp36_ = gee_iterator_get (_tmp35_);
				p = (LibraryPhoto*) _tmp36_;
				_tmp37_ = p;
				_tmp38_ = _g_object_ref0 (_tmp37_);
				_g_object_unref0 (photo);
				photo = _tmp38_;
				_g_object_unref0 (p);
				break;
			}
			_g_object_unref0 (_p_it);
		}
		_tmp39_ = photo;
		_tmp40_ = export_params;
		_tmp41_ = photo_get_export_basename_for_parameters (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, TYPE_PHOTO, Photo), &_tmp40_);
		_tmp42_ = _tmp41_;
		_tmp43_ = export_ui_choose_file (_tmp42_);
		_tmp44_ = _tmp43_;
		_g_free0 (_tmp42_);
		save_as = _tmp44_;
		_tmp45_ = save_as;
		if (_tmp45_ == NULL) {
			_g_object_unref0 (save_as);
			_g_object_unref0 (photo);
			_g_object_unref0 (export_dialog);
			_g_free0 (title);
			_g_object_unref0 (export_list);
			return;
		}
		{
			AppWindow* _tmp46_;
			AppWindow* _tmp47_;
			LibraryPhoto* _tmp48_;
			GFile* _tmp49_;
			Scaling _tmp50_;
			ExportFormatParameters _tmp51_;
			LibraryPhoto* _tmp52_;
			ExportFormatParameters _tmp53_;
			ExportFormatParameters _tmp54_;
			ExportFormatParameters _tmp55_;
			AppWindow* _tmp56_;
			AppWindow* _tmp57_;
			_tmp46_ = app_window_get_instance ();
			_tmp47_ = _tmp46_;
			page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, TYPE_PAGE_WINDOW, PageWindow));
			_g_object_unref0 (_tmp47_);
			_tmp48_ = photo;
			_tmp49_ = save_as;
			_tmp50_ = scaling;
			_tmp51_ = export_params;
			_tmp52_ = photo;
			_tmp53_ = export_params;
			_tmp54_ = export_params;
			_tmp55_ = export_params;
			photo_export (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, TYPE_PHOTO, Photo), _tmp49_, &_tmp50_, _tmp51_.quality, photo_get_export_format_for_parameters (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, TYPE_PHOTO, Photo), &_tmp53_), _tmp54_.mode == EXPORT_FORMAT_MODE_UNMODIFIED, _tmp55_.export_metadata, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_tmp56_ = app_window_get_instance ();
			_tmp57_ = _tmp56_;
			page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp57_, TYPE_PAGE_WINDOW, PageWindow));
			_g_object_unref0 (_tmp57_);
		}
		goto __finally0;
		__catch0_g_error:
		{
			AppWindow* _tmp58_;
			AppWindow* _tmp59_;
			GFile* _tmp60_;
			g_clear_error (&_inner_error0_);
			_tmp58_ = app_window_get_instance ();
			_tmp59_ = _tmp58_;
			page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, TYPE_PAGE_WINDOW, PageWindow));
			_g_object_unref0 (_tmp59_);
			_tmp60_ = save_as;
			export_error_dialog (_tmp60_, FALSE);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (save_as);
			_g_object_unref0 (photo);
			_g_object_unref0 (export_dialog);
			_g_free0 (title);
			_g_object_unref0 (export_list);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		_g_object_unref0 (save_as);
		_g_object_unref0 (photo);
		_g_object_unref0 (export_dialog);
		_g_free0 (title);
		_g_object_unref0 (export_list);
		return;
	}
	_tmp61_ = title;
	_tmp62_ = export_ui_choose_dir (_tmp61_);
	export_dir = _tmp62_;
	_tmp63_ = export_dir;
	if (_tmp63_ == NULL) {
		_g_object_unref0 (export_dir);
		_g_object_unref0 (export_dialog);
		_g_free0 (title);
		_g_object_unref0 (export_list);
		return;
	}
	_tmp64_ = export_list;
	_tmp65_ = export_dir;
	_tmp66_ = scaling;
	_tmp67_ = export_params;
	_tmp68_ = exporter_new (_tmp64_, _tmp65_, &_tmp66_, &_tmp67_, FALSE);
	_tmp69_ = _tmp68_;
	_tmp70_ = exporter_ui_new (_tmp69_);
	_exporter_ui_unref0 (self->priv->exporter);
	self->priv->exporter = _tmp70_;
	_g_object_unref0 (_tmp69_);
	_tmp71_ = self->priv->exporter;
	exporter_ui_export (_tmp71_, _collection_page_on_export_completed_exporter_completion_callback, self);
	_g_object_unref0 (export_dir);
	_g_object_unref0 (export_dialog);
	_g_free0 (title);
	_g_object_unref0 (export_list);
}

static void
collection_page_on_export_completed (CollectionPage* self)
{
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_exporter_ui_unref0 (self->priv->exporter);
	self->priv->exporter = NULL;
}

static gboolean
collection_page_can_revert_selected (CollectionPage* self)
{
	gboolean result;
	g_return_val_if_fail (IS_COLLECTION_PAGE (self), FALSE);
	{
		GeeList* _source_list = NULL;
		ViewCollection* _tmp0_;
		ViewCollection* _tmp1_;
		GeeList* _tmp2_;
		GeeList* _tmp3_;
		gint _source_size = 0;
		GeeList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _source_index = 0;
		_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp1_ = _tmp0_;
		_tmp2_ = view_collection_get_selected_sources (_tmp1_);
		_tmp3_ = _tmp2_;
		_data_collection_unref0 (_tmp1_);
		_source_list = _tmp3_;
		_tmp4_ = _source_list;
		_tmp5_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection));
		_tmp6_ = _tmp5_;
		_source_size = _tmp6_;
		_source_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			DataSource* source = NULL;
			GeeList* _tmp9_;
			gpointer _tmp10_;
			LibraryPhoto* photo = NULL;
			DataSource* _tmp11_;
			LibraryPhoto* _tmp12_;
			gboolean _tmp13_ = FALSE;
			LibraryPhoto* _tmp14_;
			_source_index = _source_index + 1;
			_tmp7_ = _source_index;
			_tmp8_ = _source_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _source_list;
			_tmp10_ = gee_list_get (_tmp9_, _source_index);
			source = (DataSource*) _tmp10_;
			_tmp11_ = source;
			_tmp12_ = _g_object_ref0 (IS_LIBRARY_PHOTO (_tmp11_) ? ((LibraryPhoto*) _tmp11_) : NULL);
			photo = _tmp12_;
			_tmp14_ = photo;
			if (_tmp14_ != NULL) {
				gboolean _tmp15_ = FALSE;
				LibraryPhoto* _tmp16_;
				_tmp16_ = photo;
				if (photo_has_transformations (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_PHOTO, Photo))) {
					_tmp15_ = TRUE;
				} else {
					LibraryPhoto* _tmp17_;
					_tmp17_ = photo;
					_tmp15_ = photo_has_editable (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_PHOTO, Photo));
				}
				_tmp13_ = _tmp15_;
			} else {
				_tmp13_ = FALSE;
			}
			if (_tmp13_) {
				result = TRUE;
				_g_object_unref0 (photo);
				_g_object_unref0 (source);
				_g_object_unref0 (_source_list);
				return result;
			}
			_g_object_unref0 (photo);
			_g_object_unref0 (source);
		}
		_g_object_unref0 (_source_list);
	}
	result = FALSE;
	return result;
}

static gboolean
collection_page_can_revert_editable_selected (CollectionPage* self)
{
	gboolean result;
	g_return_val_if_fail (IS_COLLECTION_PAGE (self), FALSE);
	{
		GeeList* _source_list = NULL;
		ViewCollection* _tmp0_;
		ViewCollection* _tmp1_;
		GeeList* _tmp2_;
		GeeList* _tmp3_;
		gint _source_size = 0;
		GeeList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _source_index = 0;
		_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp1_ = _tmp0_;
		_tmp2_ = view_collection_get_selected_sources (_tmp1_);
		_tmp3_ = _tmp2_;
		_data_collection_unref0 (_tmp1_);
		_source_list = _tmp3_;
		_tmp4_ = _source_list;
		_tmp5_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection));
		_tmp6_ = _tmp5_;
		_source_size = _tmp6_;
		_source_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			DataSource* source = NULL;
			GeeList* _tmp9_;
			gpointer _tmp10_;
			LibraryPhoto* photo = NULL;
			DataSource* _tmp11_;
			LibraryPhoto* _tmp12_;
			gboolean _tmp13_ = FALSE;
			LibraryPhoto* _tmp14_;
			_source_index = _source_index + 1;
			_tmp7_ = _source_index;
			_tmp8_ = _source_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _source_list;
			_tmp10_ = gee_list_get (_tmp9_, _source_index);
			source = (DataSource*) _tmp10_;
			_tmp11_ = source;
			_tmp12_ = _g_object_ref0 (IS_LIBRARY_PHOTO (_tmp11_) ? ((LibraryPhoto*) _tmp11_) : NULL);
			photo = _tmp12_;
			_tmp14_ = photo;
			if (_tmp14_ != NULL) {
				LibraryPhoto* _tmp15_;
				_tmp15_ = photo;
				_tmp13_ = photo_has_editable (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_PHOTO, Photo));
			} else {
				_tmp13_ = FALSE;
			}
			if (_tmp13_) {
				result = TRUE;
				_g_object_unref0 (photo);
				_g_object_unref0 (source);
				_g_object_unref0 (_source_list);
				return result;
			}
			_g_object_unref0 (photo);
			_g_object_unref0 (source);
		}
		_g_object_unref0 (_source_list);
	}
	result = FALSE;
	return result;
}

static void
collection_page_on_rotate_clockwise (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gboolean _tmp2_;
	RotateMultipleCommand* command = NULL;
	ViewCollection* _tmp3_;
	ViewCollection* _tmp4_;
	GeeList* _tmp5_;
	GeeList* _tmp6_;
	RotateMultipleCommand* _tmp7_;
	RotateMultipleCommand* _tmp8_;
	CommandManager* _tmp9_;
	CommandManager* _tmp10_;
	RotateMultipleCommand* _tmp11_;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_count (_tmp1_) == 0;
	_data_collection_unref0 (_tmp1_);
	if (_tmp2_) {
		return;
	}
	_tmp3_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp4_ = _tmp3_;
	_tmp5_ = view_collection_get_selected (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = rotate_multiple_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable), ROTATION_CLOCKWISE, RESOURCES_ROTATE_CW_FULL_LABEL, RESOURCES_ROTATE_CW_TOOLTIP, _ ("Rotating"), _ ("Undoing Rotate"));
	_tmp8_ = _tmp7_;
	_g_object_unref0 (_tmp6_);
	_data_collection_unref0 (_tmp4_);
	command = _tmp8_;
	_tmp9_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp10_ = _tmp9_;
	_tmp11_ = command;
	command_manager_execute (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_COMMAND, Command));
	_command_manager_unref0 (_tmp10_);
	_g_object_unref0 (command);
}

static void
collection_page_on_publish (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_count (_tmp1_) > 0;
	_data_collection_unref0 (_tmp1_);
	if (_tmp2_) {
		ViewCollection* _tmp3_;
		ViewCollection* _tmp4_;
		GeeList* _tmp5_;
		GeeCollection* _tmp6_;
		_tmp3_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp4_ = _tmp3_;
		_tmp5_ = view_collection_get_selected_sources (_tmp4_);
		_tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection);
		publishing_ui_publishing_dialog_go (_tmp6_);
		_g_object_unref0 (_tmp6_);
		_data_collection_unref0 (_tmp4_);
	}
}

static void
collection_page_on_rotate_counterclockwise (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gboolean _tmp2_;
	RotateMultipleCommand* command = NULL;
	ViewCollection* _tmp3_;
	ViewCollection* _tmp4_;
	GeeList* _tmp5_;
	GeeList* _tmp6_;
	RotateMultipleCommand* _tmp7_;
	RotateMultipleCommand* _tmp8_;
	CommandManager* _tmp9_;
	CommandManager* _tmp10_;
	RotateMultipleCommand* _tmp11_;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_count (_tmp1_) == 0;
	_data_collection_unref0 (_tmp1_);
	if (_tmp2_) {
		return;
	}
	_tmp3_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp4_ = _tmp3_;
	_tmp5_ = view_collection_get_selected (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = rotate_multiple_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable), ROTATION_COUNTERCLOCKWISE, RESOURCES_ROTATE_CCW_FULL_LABEL, RESOURCES_ROTATE_CCW_TOOLTIP, _ ("Rotating"), _ ("Undoing Rotate"));
	_tmp8_ = _tmp7_;
	_g_object_unref0 (_tmp6_);
	_data_collection_unref0 (_tmp4_);
	command = _tmp8_;
	_tmp9_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp10_ = _tmp9_;
	_tmp11_ = command;
	command_manager_execute (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_COMMAND, Command));
	_command_manager_unref0 (_tmp10_);
	_g_object_unref0 (command);
}

static void
collection_page_on_flip_horizontally (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gboolean _tmp2_;
	RotateMultipleCommand* command = NULL;
	ViewCollection* _tmp3_;
	ViewCollection* _tmp4_;
	GeeList* _tmp5_;
	GeeList* _tmp6_;
	RotateMultipleCommand* _tmp7_;
	RotateMultipleCommand* _tmp8_;
	CommandManager* _tmp9_;
	CommandManager* _tmp10_;
	RotateMultipleCommand* _tmp11_;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_count (_tmp1_) == 0;
	_data_collection_unref0 (_tmp1_);
	if (_tmp2_) {
		return;
	}
	_tmp3_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp4_ = _tmp3_;
	_tmp5_ = view_collection_get_selected (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = rotate_multiple_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable), ROTATION_MIRROR, RESOURCES_HFLIP_LABEL, "", _ ("Flipping Horizontally"), _ ("Undoing Flip Horizontally"));
	_tmp8_ = _tmp7_;
	_g_object_unref0 (_tmp6_);
	_data_collection_unref0 (_tmp4_);
	command = _tmp8_;
	_tmp9_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp10_ = _tmp9_;
	_tmp11_ = command;
	command_manager_execute (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_COMMAND, Command));
	_command_manager_unref0 (_tmp10_);
	_g_object_unref0 (command);
}

static void
collection_page_on_flip_vertically (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gboolean _tmp2_;
	RotateMultipleCommand* command = NULL;
	ViewCollection* _tmp3_;
	ViewCollection* _tmp4_;
	GeeList* _tmp5_;
	GeeList* _tmp6_;
	RotateMultipleCommand* _tmp7_;
	RotateMultipleCommand* _tmp8_;
	CommandManager* _tmp9_;
	CommandManager* _tmp10_;
	RotateMultipleCommand* _tmp11_;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_count (_tmp1_) == 0;
	_data_collection_unref0 (_tmp1_);
	if (_tmp2_) {
		return;
	}
	_tmp3_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp4_ = _tmp3_;
	_tmp5_ = view_collection_get_selected (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = rotate_multiple_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable), ROTATION_UPSIDE_DOWN, RESOURCES_VFLIP_LABEL, "", _ ("Flipping Vertically"), _ ("Undoing Flip Vertically"));
	_tmp8_ = _tmp7_;
	_g_object_unref0 (_tmp6_);
	_data_collection_unref0 (_tmp4_);
	command = _tmp8_;
	_tmp9_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp10_ = _tmp9_;
	_tmp11_ = command;
	command_manager_execute (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_COMMAND, Command));
	_command_manager_unref0 (_tmp10_);
	_g_object_unref0 (command);
}

static void
collection_page_on_revert (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gboolean _tmp2_;
	RevertMultipleCommand* command = NULL;
	ViewCollection* _tmp22_;
	ViewCollection* _tmp23_;
	GeeList* _tmp24_;
	GeeList* _tmp25_;
	RevertMultipleCommand* _tmp26_;
	RevertMultipleCommand* _tmp27_;
	CommandManager* _tmp28_;
	CommandManager* _tmp29_;
	RevertMultipleCommand* _tmp30_;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_count (_tmp1_) == 0;
	_data_collection_unref0 (_tmp1_);
	if (_tmp2_) {
		return;
	}
	if (collection_page_can_revert_editable_selected (self)) {
		AppWindow* _tmp3_;
		AppWindow* _tmp4_;
		ViewCollection* _tmp5_;
		ViewCollection* _tmp6_;
		GeeList* _tmp7_;
		GeeCollection* _tmp8_;
		gboolean _tmp9_;
		_tmp3_ = app_window_get_instance ();
		_tmp4_ = _tmp3_;
		_tmp5_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp6_ = _tmp5_;
		_tmp7_ = view_collection_get_selected_sources (_tmp6_);
		_tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection);
		_tmp9_ = !revert_editable_dialog (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_window_get_type (), GtkWindow), _tmp8_);
		_g_object_unref0 (_tmp8_);
		_data_collection_unref0 (_tmp6_);
		_g_object_unref0 (_tmp4_);
		if (_tmp9_) {
			return;
		}
		{
			GeeList* _object_list = NULL;
			ViewCollection* _tmp10_;
			ViewCollection* _tmp11_;
			GeeList* _tmp12_;
			GeeList* _tmp13_;
			gint _object_size = 0;
			GeeList* _tmp14_;
			gint _tmp15_;
			gint _tmp16_;
			gint _object_index = 0;
			_tmp10_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
			_tmp11_ = _tmp10_;
			_tmp12_ = view_collection_get_selected_sources (_tmp11_);
			_tmp13_ = _tmp12_;
			_data_collection_unref0 (_tmp11_);
			_object_list = _tmp13_;
			_tmp14_ = _object_list;
			_tmp15_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_COLLECTION, GeeCollection));
			_tmp16_ = _tmp15_;
			_object_size = _tmp16_;
			_object_index = -1;
			while (TRUE) {
				gint _tmp17_;
				gint _tmp18_;
				DataObject* object = NULL;
				GeeList* _tmp19_;
				gpointer _tmp20_;
				DataObject* _tmp21_;
				_object_index = _object_index + 1;
				_tmp17_ = _object_index;
				_tmp18_ = _object_size;
				if (!(_tmp17_ < _tmp18_)) {
					break;
				}
				_tmp19_ = _object_list;
				_tmp20_ = gee_list_get (_tmp19_, _object_index);
				object = G_TYPE_CHECK_INSTANCE_CAST ((DataSource*) _tmp20_, TYPE_DATA_OBJECT, DataObject);
				_tmp21_ = object;
				photo_revert_to_master (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_PHOTO, Photo), TRUE);
				_g_object_unref0 (object);
			}
			_g_object_unref0 (_object_list);
		}
	}
	_tmp22_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp23_ = _tmp22_;
	_tmp24_ = view_collection_get_selected (_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = revert_multiple_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_ITERABLE, GeeIterable));
	_tmp27_ = _tmp26_;
	_g_object_unref0 (_tmp25_);
	_data_collection_unref0 (_tmp23_);
	command = _tmp27_;
	_tmp28_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp29_ = _tmp28_;
	_tmp30_ = command;
	command_manager_execute (_tmp29_, G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, TYPE_COMMAND, Command));
	_command_manager_unref0 (_tmp29_);
	_g_object_unref0 (command);
}

void
collection_page_on_copy_adjustments (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gboolean _tmp2_;
	Photo* photo = NULL;
	ViewCollection* _tmp3_;
	ViewCollection* _tmp4_;
	DataView* _tmp5_;
	DataView* _tmp6_;
	DataSource* _tmp7_;
	Photo* _tmp8_;
	Photo* _tmp9_;
	PixelTransformationBundle* _tmp10_;
	PixelTransformationBundle* _tmp11_;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_count (_tmp1_) != 1;
	_data_collection_unref0 (_tmp1_);
	if (_tmp2_) {
		return;
	}
	_tmp3_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp4_ = _tmp3_;
	_tmp5_ = view_collection_get_selected_at (_tmp4_, 0);
	_tmp6_ = _tmp5_;
	_tmp7_ = data_view_get_source (_tmp6_);
	_tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_PHOTO, Photo);
	_g_object_unref0 (_tmp6_);
	_data_collection_unref0 (_tmp4_);
	photo = _tmp8_;
	_tmp9_ = photo;
	_tmp10_ = photo_get_color_adjustments (_tmp9_);
	_tmp11_ = _tmp10_;
	pixel_transformation_bundle_set_copied_color_adjustments (_tmp11_);
	_pixel_transformation_bundle_unref0 (_tmp11_);
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "PasteColorAdjustments", TRUE);
	_g_object_unref0 (photo);
}

void
collection_page_on_paste_adjustments (CollectionPage* self)
{
	PixelTransformationBundle* copied_adjustments = NULL;
	PixelTransformationBundle* _tmp0_;
	gboolean _tmp1_ = FALSE;
	ViewCollection* _tmp2_;
	ViewCollection* _tmp3_;
	gboolean _tmp4_;
	AdjustColorsMultipleCommand* command = NULL;
	ViewCollection* _tmp6_;
	ViewCollection* _tmp7_;
	GeeList* _tmp8_;
	GeeList* _tmp9_;
	PixelTransformationBundle* _tmp10_;
	AdjustColorsMultipleCommand* _tmp11_;
	AdjustColorsMultipleCommand* _tmp12_;
	CommandManager* _tmp13_;
	CommandManager* _tmp14_;
	AdjustColorsMultipleCommand* _tmp15_;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = pixel_transformation_bundle_get_copied_color_adjustments ();
	copied_adjustments = _tmp0_;
	_tmp2_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp3_ = _tmp2_;
	_tmp4_ = view_collection_get_selected_count (_tmp3_) == 0;
	_data_collection_unref0 (_tmp3_);
	if (_tmp4_) {
		_tmp1_ = TRUE;
	} else {
		PixelTransformationBundle* _tmp5_;
		_tmp5_ = copied_adjustments;
		_tmp1_ = _tmp5_ == NULL;
	}
	if (_tmp1_) {
		_pixel_transformation_bundle_unref0 (copied_adjustments);
		return;
	}
	_tmp6_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp7_ = _tmp6_;
	_tmp8_ = view_collection_get_selected (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = copied_adjustments;
	_tmp11_ = adjust_colors_multiple_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ITERABLE, GeeIterable), _tmp10_, RESOURCES_PASTE_ADJUSTMENTS_LABEL, RESOURCES_PASTE_ADJUSTMENTS_TOOLTIP);
	_tmp12_ = _tmp11_;
	_g_object_unref0 (_tmp9_);
	_data_collection_unref0 (_tmp7_);
	command = _tmp12_;
	_tmp13_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp14_ = _tmp13_;
	_tmp15_ = command;
	command_manager_execute (_tmp14_, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_COMMAND, Command));
	_command_manager_unref0 (_tmp14_);
	_g_object_unref0 (command);
	_pixel_transformation_bundle_unref0 (copied_adjustments);
}

static void
collection_page_on_enhance (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gboolean _tmp2_;
	EnhanceMultipleCommand* command = NULL;
	ViewCollection* _tmp3_;
	ViewCollection* _tmp4_;
	GeeList* _tmp5_;
	GeeList* _tmp6_;
	EnhanceMultipleCommand* _tmp7_;
	EnhanceMultipleCommand* _tmp8_;
	CommandManager* _tmp9_;
	CommandManager* _tmp10_;
	EnhanceMultipleCommand* _tmp11_;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_count (_tmp1_) == 0;
	_data_collection_unref0 (_tmp1_);
	if (_tmp2_) {
		return;
	}
	_tmp3_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp4_ = _tmp3_;
	_tmp5_ = view_collection_get_selected (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = enhance_multiple_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable));
	_tmp8_ = _tmp7_;
	_g_object_unref0 (_tmp6_);
	_data_collection_unref0 (_tmp4_);
	command = _tmp8_;
	_tmp9_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp10_ = _tmp9_;
	_tmp11_ = command;
	command_manager_execute (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_COMMAND, Command));
	_command_manager_unref0 (_tmp10_);
	_g_object_unref0 (command);
}

static void
collection_page_on_duplicate_photo (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gboolean _tmp2_;
	DuplicateMultiplePhotosCommand* command = NULL;
	ViewCollection* _tmp3_;
	ViewCollection* _tmp4_;
	GeeList* _tmp5_;
	GeeList* _tmp6_;
	DuplicateMultiplePhotosCommand* _tmp7_;
	DuplicateMultiplePhotosCommand* _tmp8_;
	CommandManager* _tmp9_;
	CommandManager* _tmp10_;
	DuplicateMultiplePhotosCommand* _tmp11_;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_count (_tmp1_) == 0;
	_data_collection_unref0 (_tmp1_);
	if (_tmp2_) {
		return;
	}
	_tmp3_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp4_ = _tmp3_;
	_tmp5_ = view_collection_get_selected (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = duplicate_multiple_photos_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable));
	_tmp8_ = _tmp7_;
	_g_object_unref0 (_tmp6_);
	_data_collection_unref0 (_tmp4_);
	command = _tmp8_;
	_tmp9_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp10_ = _tmp9_;
	_tmp11_ = command;
	command_manager_execute (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_COMMAND, Command));
	_command_manager_unref0 (_tmp10_);
	_g_object_unref0 (command);
}

static void
collection_page_on_adjust_date_time (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gboolean _tmp2_;
	gboolean selected_has_videos = FALSE;
	gboolean only_videos_selected = FALSE;
	Dateable* photo_source = NULL;
	ViewCollection* _tmp18_;
	ViewCollection* _tmp19_;
	DataView* _tmp20_;
	DataView* _tmp21_;
	DataSource* _tmp22_;
	Dateable* _tmp23_;
	AdjustDateTimeDialog* dialog = NULL;
	Dateable* _tmp24_;
	ViewCollection* _tmp25_;
	ViewCollection* _tmp26_;
	AdjustDateTimeDialog* _tmp27_;
	AdjustDateTimeDialog* _tmp28_;
	gint64 time_shift = 0LL;
	gboolean keep_relativity = FALSE;
	gboolean modify_originals = FALSE;
	AdjustDateTimeDialog* _tmp29_;
	GTimeSpan _tmp30_ = 0LL;
	gboolean _tmp31_ = FALSE;
	gboolean _tmp32_ = FALSE;
	gboolean _tmp33_;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_count (_tmp1_) == 0;
	_data_collection_unref0 (_tmp1_);
	if (_tmp2_) {
		return;
	}
	selected_has_videos = FALSE;
	only_videos_selected = TRUE;
	{
		GeeList* _dv_list = NULL;
		ViewCollection* _tmp3_;
		ViewCollection* _tmp4_;
		GeeList* _tmp5_;
		GeeList* _tmp6_;
		gint _dv_size = 0;
		GeeList* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gint _dv_index = 0;
		_tmp3_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp4_ = _tmp3_;
		_tmp5_ = view_collection_get_selected (_tmp4_);
		_tmp6_ = _tmp5_;
		_data_collection_unref0 (_tmp4_);
		_dv_list = _tmp6_;
		_tmp7_ = _dv_list;
		_tmp8_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection));
		_tmp9_ = _tmp8_;
		_dv_size = _tmp9_;
		_dv_index = -1;
		while (TRUE) {
			gint _tmp10_;
			gint _tmp11_;
			DataView* dv = NULL;
			GeeList* _tmp12_;
			gpointer _tmp13_;
			DataView* _tmp14_;
			DataSource* _tmp15_;
			DataSource* _tmp16_;
			gboolean _tmp17_;
			_dv_index = _dv_index + 1;
			_tmp10_ = _dv_index;
			_tmp11_ = _dv_size;
			if (!(_tmp10_ < _tmp11_)) {
				break;
			}
			_tmp12_ = _dv_list;
			_tmp13_ = gee_list_get (_tmp12_, _dv_index);
			dv = (DataView*) _tmp13_;
			_tmp14_ = dv;
			_tmp15_ = data_view_get_source (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = IS_VIDEO (_tmp16_);
			_g_object_unref0 (_tmp16_);
			if (_tmp17_) {
				selected_has_videos = TRUE;
			} else {
				only_videos_selected = FALSE;
			}
			_g_object_unref0 (dv);
		}
		_g_object_unref0 (_dv_list);
	}
	_tmp18_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp19_ = _tmp18_;
	_tmp20_ = view_collection_get_selected_at (_tmp19_, 0);
	_tmp21_ = _tmp20_;
	_tmp22_ = data_view_get_source (_tmp21_);
	_tmp23_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_DATEABLE, Dateable);
	_g_object_unref0 (_tmp21_);
	_data_collection_unref0 (_tmp19_);
	photo_source = _tmp23_;
	_tmp24_ = photo_source;
	_tmp25_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp26_ = _tmp25_;
	_tmp27_ = adjust_date_time_dialog_new (_tmp24_, view_collection_get_selected_count (_tmp26_), TRUE, selected_has_videos, only_videos_selected);
	g_object_ref_sink (_tmp27_);
	_tmp28_ = _tmp27_;
	_data_collection_unref0 (_tmp26_);
	dialog = _tmp28_;
	_tmp29_ = dialog;
	_tmp33_ = adjust_date_time_dialog_execute (_tmp29_, &_tmp30_, &_tmp31_, &_tmp32_);
	time_shift = (gint64) _tmp30_;
	keep_relativity = _tmp31_;
	modify_originals = _tmp32_;
	if (_tmp33_) {
		AdjustDateTimePhotosCommand* command = NULL;
		ViewCollection* _tmp34_;
		ViewCollection* _tmp35_;
		GeeList* _tmp36_;
		GeeList* _tmp37_;
		AdjustDateTimePhotosCommand* _tmp38_;
		AdjustDateTimePhotosCommand* _tmp39_;
		CommandManager* _tmp40_;
		CommandManager* _tmp41_;
		AdjustDateTimePhotosCommand* _tmp42_;
		_tmp34_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp35_ = _tmp34_;
		_tmp36_ = view_collection_get_selected (_tmp35_);
		_tmp37_ = _tmp36_;
		_tmp38_ = adjust_date_time_photos_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, GEE_TYPE_ITERABLE, GeeIterable), time_shift, keep_relativity, modify_originals);
		_tmp39_ = _tmp38_;
		_g_object_unref0 (_tmp37_);
		_data_collection_unref0 (_tmp35_);
		command = _tmp39_;
		_tmp40_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp41_ = _tmp40_;
		_tmp42_ = command;
		command_manager_execute (_tmp41_, G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, TYPE_COMMAND, Command));
		_command_manager_unref0 (_tmp41_);
		_g_object_unref0 (command);
	}
	_g_object_unref0 (dialog);
	_g_object_unref0 (photo_source);
}

static void
collection_page_on_external_edit (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gboolean _tmp2_;
	Photo* photo = NULL;
	ViewCollection* _tmp3_;
	ViewCollection* _tmp4_;
	DataView* _tmp5_;
	DataView* _tmp6_;
	DataSource* _tmp7_;
	Photo* _tmp8_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_count (_tmp1_) != 1;
	_data_collection_unref0 (_tmp1_);
	if (_tmp2_) {
		return;
	}
	_tmp3_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp4_ = _tmp3_;
	_tmp5_ = view_collection_get_selected_at (_tmp4_, 0);
	_tmp6_ = _tmp5_;
	_tmp7_ = data_view_get_source (_tmp6_);
	_tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_PHOTO, Photo);
	_g_object_unref0 (_tmp6_);
	_data_collection_unref0 (_tmp4_);
	photo = _tmp8_;
	{
		AppWindow* _tmp9_;
		AppWindow* _tmp10_;
		Photo* _tmp11_;
		AppWindow* _tmp12_;
		AppWindow* _tmp13_;
		_tmp9_ = app_window_get_instance ();
		_tmp10_ = _tmp9_;
		page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_PAGE_WINDOW, PageWindow));
		_g_object_unref0 (_tmp10_);
		_tmp11_ = photo;
		photo_open_with_external_editor (_tmp11_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp12_ = app_window_get_instance ();
		_tmp13_ = _tmp12_;
		page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_PAGE_WINDOW, PageWindow));
		_g_object_unref0 (_tmp13_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* err = NULL;
		AppWindow* _tmp14_;
		AppWindow* _tmp15_;
		GError* _tmp16_;
		Photo* _tmp17_;
		err = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp14_ = app_window_get_instance ();
		_tmp15_ = _tmp14_;
		page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_PAGE_WINDOW, PageWindow));
		_g_object_unref0 (_tmp15_);
		_tmp16_ = err;
		_tmp17_ = photo;
		open_external_editor_error_dialog (_tmp16_, _tmp17_);
		_g_error_free0 (err);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (photo);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_g_object_unref0 (photo);
}

static void
collection_page_on_external_edit_raw (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gboolean _tmp2_;
	Photo* photo = NULL;
	ViewCollection* _tmp3_;
	ViewCollection* _tmp4_;
	DataView* _tmp5_;
	DataView* _tmp6_;
	DataSource* _tmp7_;
	Photo* _tmp8_;
	Photo* _tmp9_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = view_collection_get_selected_count (_tmp1_) != 1;
	_data_collection_unref0 (_tmp1_);
	if (_tmp2_) {
		return;
	}
	_tmp3_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp4_ = _tmp3_;
	_tmp5_ = view_collection_get_selected_at (_tmp4_, 0);
	_tmp6_ = _tmp5_;
	_tmp7_ = data_view_get_source (_tmp6_);
	_tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_PHOTO, Photo);
	_g_object_unref0 (_tmp6_);
	_data_collection_unref0 (_tmp4_);
	photo = _tmp8_;
	_tmp9_ = photo;
	if (photo_get_master_file_format (_tmp9_) != PHOTO_FILE_FORMAT_RAW) {
		_g_object_unref0 (photo);
		return;
	}
	{
		AppWindow* _tmp10_;
		AppWindow* _tmp11_;
		Photo* _tmp12_;
		AppWindow* _tmp13_;
		AppWindow* _tmp14_;
		_tmp10_ = app_window_get_instance ();
		_tmp11_ = _tmp10_;
		page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_PAGE_WINDOW, PageWindow));
		_g_object_unref0 (_tmp11_);
		_tmp12_ = photo;
		photo_open_with_raw_external_editor (_tmp12_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp13_ = app_window_get_instance ();
		_tmp14_ = _tmp13_;
		page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_PAGE_WINDOW, PageWindow));
		_g_object_unref0 (_tmp14_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* err = NULL;
		AppWindow* _tmp15_;
		AppWindow* _tmp16_;
		GError* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		err = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp15_ = app_window_get_instance ();
		_tmp16_ = _tmp15_;
		page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_PAGE_WINDOW, PageWindow));
		_g_object_unref0 (_tmp16_);
		_tmp17_ = err;
		_tmp18_ = resources_launch_editor_failed (_tmp17_);
		_tmp19_ = _tmp18_;
		app_window_error_message (_tmp19_, NULL);
		_g_free0 (_tmp19_);
		_g_error_free0 (err);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (photo);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_g_object_unref0 (photo);
}

void
collection_page_on_set_background (CollectionPage* self)
{
	GeeArrayList* photos = NULL;
	GeeArrayList* _tmp0_;
	ViewCollection* _tmp1_;
	ViewCollection* _tmp2_;
	GeeList* _tmp3_;
	GeeCollection* _tmp4_;
	GeeArrayList* _tmp5_;
	gboolean desktop = FALSE;
	gboolean screensaver = FALSE;
	GeeArrayList* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = gee_array_list_new (TYPE_LIBRARY_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	photos = _tmp0_;
	_tmp1_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp2_ = _tmp1_;
	_tmp3_ = view_collection_get_selected_sources (_tmp2_);
	_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection);
	_tmp5_ = photos;
	media_source_collection_filter_media (_tmp4_, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection), NULL);
	_g_object_unref0 (_tmp4_);
	_data_collection_unref0 (_tmp2_);
	_tmp6_ = photos;
	_tmp7_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
	_tmp8_ = _tmp7_;
	if (_tmp8_ == 1) {
		SetBackgroundPhotoDialog* dialog = NULL;
		SetBackgroundPhotoDialog* _tmp9_;
		SetBackgroundPhotoDialog* _tmp10_;
		gboolean _tmp11_ = FALSE;
		gboolean _tmp12_ = FALSE;
		gboolean _tmp13_;
		_tmp9_ = set_background_photo_dialog_new ();
		g_object_ref_sink (_tmp9_);
		dialog = _tmp9_;
		_tmp10_ = dialog;
		_tmp13_ = set_background_photo_dialog_execute (_tmp10_, &_tmp11_, &_tmp12_);
		desktop = _tmp11_;
		screensaver = _tmp12_;
		if (_tmp13_) {
			AppWindow* _tmp14_;
			AppWindow* _tmp15_;
			GeeArrayList* _tmp16_;
			gpointer _tmp17_;
			LibraryPhoto* _tmp18_;
			AppWindow* _tmp19_;
			AppWindow* _tmp20_;
			_tmp14_ = app_window_get_instance ();
			_tmp15_ = _tmp14_;
			page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_PAGE_WINDOW, PageWindow));
			_g_object_unref0 (_tmp15_);
			_tmp16_ = photos;
			_tmp17_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), 0);
			_tmp18_ = (LibraryPhoto*) _tmp17_;
			desktop_integration_set_background (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_PHOTO, Photo), desktop, screensaver);
			_g_object_unref0 (_tmp18_);
			_tmp19_ = app_window_get_instance ();
			_tmp20_ = _tmp19_;
			page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_PAGE_WINDOW, PageWindow));
			_g_object_unref0 (_tmp20_);
		}
		_g_object_unref0 (dialog);
	} else {
		GeeArrayList* _tmp21_;
		gint _tmp22_;
		gint _tmp23_;
		_tmp21_ = photos;
		_tmp22_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
		_tmp23_ = _tmp22_;
		if (_tmp23_ > 1) {
			SetBackgroundSlideshowDialog* dialog = NULL;
			SetBackgroundSlideshowDialog* _tmp24_;
			gint delay = 0;
			SetBackgroundSlideshowDialog* _tmp25_;
			gint _tmp26_ = 0;
			gboolean _tmp27_ = FALSE;
			gboolean _tmp28_ = FALSE;
			gboolean _tmp29_;
			_tmp24_ = set_background_slideshow_dialog_new ();
			g_object_ref_sink (_tmp24_);
			dialog = _tmp24_;
			_tmp25_ = dialog;
			_tmp29_ = set_background_slideshow_dialog_execute (_tmp25_, &_tmp26_, &_tmp27_, &_tmp28_);
			delay = _tmp26_;
			desktop = _tmp27_;
			screensaver = _tmp28_;
			if (_tmp29_) {
				AppWindow* _tmp30_;
				AppWindow* _tmp31_;
				GeeArrayList* _tmp32_;
				AppWindow* _tmp33_;
				AppWindow* _tmp34_;
				_tmp30_ = app_window_get_instance ();
				_tmp31_ = _tmp30_;
				page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, TYPE_PAGE_WINDOW, PageWindow));
				_g_object_unref0 (_tmp31_);
				_tmp32_ = photos;
				desktop_integration_set_background_slideshow (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, GEE_TYPE_COLLECTION, GeeCollection), (gdouble) delay, COLLECTION_PAGE_DESKTOP_SLIDESHOW_TRANSITION_SEC, desktop, screensaver);
				_tmp33_ = app_window_get_instance ();
				_tmp34_ = _tmp33_;
				page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, TYPE_PAGE_WINDOW, PageWindow));
				_g_object_unref0 (_tmp34_);
			}
			_g_object_unref0 (dialog);
		}
	}
	_g_object_unref0 (photos);
}

static void
collection_page_on_slideshow (CollectionPage* self)
{
	ViewCollection* _tmp0_;
	ViewCollection* _tmp1_;
	gboolean _tmp2_;
	ViewCollection* _tmp3_;
	ViewCollection* _tmp4_;
	gboolean _tmp5_;
	g_return_if_fail (IS_COLLECTION_PAGE (self));
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp1_ = _tmp0_;
	_tmp2_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection)) == 0;
	_data_collection_unref0 (_tmp1_);
	if (_tmp2_) {
		return;
	}
	_tmp3_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
	_tmp4_ = _tmp3_;
	_tmp5_ = view_collection_get_selected_count (_tmp4_) > 0;
	_data_collection_unref0 (_tmp4_);
	if (_tmp5_) {
		GeeList* sources = NULL;
		ViewCollection* _tmp6_;
		ViewCollection* _tmp7_;
		GeeList* _tmp8_;
		GeeList* _tmp9_;
		gboolean _tmp10_ = FALSE;
		GeeList* _tmp11_;
		Thumbnail* thumbnail = NULL;
		ViewCollection* _tmp15_;
		ViewCollection* _tmp16_;
		GeeList* _tmp17_;
		gpointer _tmp18_;
		DataSource* _tmp19_;
		DataView* _tmp20_;
		Thumbnail* _tmp21_;
		Thumbnail* _tmp22_;
		LibraryPhoto* photo = NULL;
		Thumbnail* _tmp23_;
		MediaSource* _tmp24_;
		LibraryPhoto* _tmp25_;
		LibraryPhoto* _tmp26_;
		AppWindow* _tmp27_;
		AppWindow* _tmp28_;
		LibraryPhotoSourceCollection* _tmp29_;
		ViewCollection* _tmp30_;
		ViewCollection* _tmp31_;
		LibraryPhoto* _tmp32_;
		SlideshowPage* _tmp33_;
		SlideshowPage* _tmp34_;
		_tmp6_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp7_ = _tmp6_;
		_tmp8_ = view_collection_get_selected_sources_of_type (_tmp7_, TYPE_LIBRARY_PHOTO);
		_tmp9_ = _tmp8_;
		_data_collection_unref0 (_tmp7_);
		sources = _tmp9_;
		_tmp11_ = sources;
		if (_tmp11_ == NULL) {
			_tmp10_ = TRUE;
		} else {
			GeeList* _tmp12_;
			gint _tmp13_;
			gint _tmp14_;
			_tmp12_ = sources;
			_tmp13_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_COLLECTION, GeeCollection));
			_tmp14_ = _tmp13_;
			_tmp10_ = _tmp14_ == 0;
		}
		if (_tmp10_) {
			_g_object_unref0 (sources);
			return;
		}
		_tmp15_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp16_ = _tmp15_;
		_tmp17_ = sources;
		_tmp18_ = gee_list_get (_tmp17_, 0);
		_tmp19_ = (DataSource*) _tmp18_;
		_tmp20_ = view_collection_get_view_for_source (_tmp16_, _tmp19_);
		_tmp21_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_THUMBNAIL, Thumbnail);
		_g_object_unref0 (_tmp19_);
		_data_collection_unref0 (_tmp16_);
		thumbnail = _tmp21_;
		_tmp22_ = thumbnail;
		if (_tmp22_ == NULL) {
			_g_object_unref0 (thumbnail);
			_g_object_unref0 (sources);
			return;
		}
		_tmp23_ = thumbnail;
		_tmp24_ = thumbnail_get_media_source (_tmp23_);
		_tmp25_ = IS_LIBRARY_PHOTO (_tmp24_) ? ((LibraryPhoto*) _tmp24_) : NULL;
		if (_tmp25_ == NULL) {
			_g_object_unref0 (_tmp24_);
		}
		photo = _tmp25_;
		_tmp26_ = photo;
		if (_tmp26_ == NULL) {
			_g_object_unref0 (photo);
			_g_object_unref0 (thumbnail);
			_g_object_unref0 (sources);
			return;
		}
		_tmp27_ = app_window_get_instance ();
		_tmp28_ = _tmp27_;
		_tmp29_ = library_photo_global;
		_tmp30_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp31_ = _tmp30_;
		_tmp32_ = photo;
		_tmp33_ = slideshow_page_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp31_, G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, TYPE_PHOTO, Photo));
		g_object_ref_sink (_tmp33_);
		_tmp34_ = _tmp33_;
		app_window_go_fullscreen (_tmp28_, G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, TYPE_PAGE, Page));
		_g_object_unref0 (_tmp34_);
		_data_collection_unref0 (_tmp31_);
		_g_object_unref0 (_tmp28_);
		_g_object_unref0 (photo);
		_g_object_unref0 (thumbnail);
		_g_object_unref0 (sources);
	} else {
		AppWindow* _tmp35_;
		AppWindow* _tmp36_;
		LibraryPhotoSourceCollection* _tmp37_;
		ViewCollection* _tmp38_;
		ViewCollection* _tmp39_;
		SlideshowPage* _tmp40_;
		SlideshowPage* _tmp41_;
		_tmp35_ = app_window_get_instance ();
		_tmp36_ = _tmp35_;
		_tmp37_ = library_photo_global;
		_tmp38_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
		_tmp39_ = _tmp38_;
		_tmp40_ = slideshow_page_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp39_, NULL);
		g_object_ref_sink (_tmp40_);
		_tmp41_ = _tmp40_;
		app_window_go_fullscreen (_tmp36_, G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, TYPE_PAGE, Page));
		_g_object_unref0 (_tmp41_);
		_data_collection_unref0 (_tmp39_);
		_g_object_unref0 (_tmp36_);
	}
}

static gboolean
collection_page_real_on_ctrl_pressed (Page* base,
                                      GdkEventKey* event)
{
	CollectionPage * self;
	GtkToolButton* rotate_button = NULL;
	GtkBuilder* _tmp0_;
	GObject* _tmp1_;
	GtkToolButton* _tmp2_;
	GtkToolButton* _tmp3_;
	gboolean result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_COLLECTION_PAGE, CollectionPage);
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->builder;
	_tmp1_ = gtk_builder_get_object (_tmp0_, "ToolRotate");
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, gtk_tool_button_get_type ()) ? ((GtkToolButton*) _tmp1_) : NULL);
	rotate_button = _tmp2_;
	_tmp3_ = rotate_button;
	if (_tmp3_ != NULL) {
		GtkToolButton* _tmp4_;
		GtkToolButton* _tmp5_;
		GtkToolButton* _tmp6_;
		_tmp4_ = rotate_button;
		gtk_actionable_set_action_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_actionable_get_type (), GtkActionable), "win.RotateCounterclockwise");
		_tmp5_ = rotate_button;
		gtk_tool_button_set_icon_name (_tmp5_, RESOURCES_COUNTERCLOCKWISE);
		_tmp6_ = rotate_button;
		gtk_tool_item_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_tool_item_get_type (), GtkToolItem), RESOURCES_ROTATE_CCW_TOOLTIP);
	}
	result = PAGE_CLASS (collection_page_parent_class)->on_ctrl_pressed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_PAGE, MediaPage), TYPE_PAGE, Page), event);
	_g_object_unref0 (rotate_button);
	return result;
}

static gboolean
collection_page_real_on_ctrl_released (Page* base,
                                       GdkEventKey* event)
{
	CollectionPage * self;
	GtkToolButton* rotate_button = NULL;
	GtkBuilder* _tmp0_;
	GObject* _tmp1_;
	GtkToolButton* _tmp2_;
	GtkToolButton* _tmp3_;
	gboolean result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_COLLECTION_PAGE, CollectionPage);
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->builder;
	_tmp1_ = gtk_builder_get_object (_tmp0_, "ToolRotate");
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, gtk_tool_button_get_type ()) ? ((GtkToolButton*) _tmp1_) : NULL);
	rotate_button = _tmp2_;
	_tmp3_ = rotate_button;
	if (_tmp3_ != NULL) {
		GtkToolButton* _tmp4_;
		GtkToolButton* _tmp5_;
		GtkToolButton* _tmp6_;
		_tmp4_ = rotate_button;
		gtk_actionable_set_action_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_actionable_get_type (), GtkActionable), "win.RotateClockwise");
		_tmp5_ = rotate_button;
		gtk_tool_button_set_icon_name (_tmp5_, RESOURCES_CLOCKWISE);
		_tmp6_ = rotate_button;
		gtk_tool_item_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_tool_item_get_type (), GtkToolItem), RESOURCES_ROTATE_CW_TOOLTIP);
	}
	result = PAGE_CLASS (collection_page_parent_class)->on_ctrl_released (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_PAGE, MediaPage), TYPE_PAGE, Page), event);
	_g_object_unref0 (rotate_button);
	return result;
}

static gpointer
_view_filter_ref0 (gpointer self)
{
	return self ? view_filter_ref (self) : NULL;
}

static SearchViewFilter*
collection_page_real_get_search_view_filter (CheckerboardPage* base)
{
	CollectionPage * self;
	CollectionPageCollectionSearchViewFilter* _tmp0_;
	SearchViewFilter* _tmp1_;
	SearchViewFilter* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_COLLECTION_PAGE, CollectionPage);
	_tmp0_ = self->priv->search_filter;
	_tmp1_ = _view_filter_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SEARCH_VIEW_FILTER, SearchViewFilter));
	result = _tmp1_;
	return result;
}

static guint
collection_page_collection_search_view_filter_real_get_criteria (SearchViewFilter* base)
{
	CollectionPageCollectionSearchViewFilter * self;
	guint result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, COLLECTION_PAGE_TYPE_COLLECTION_SEARCH_VIEW_FILTER, CollectionPageCollectionSearchViewFilter);
	result = (guint) ((((SEARCH_FILTER_CRITERIA_TEXT | SEARCH_FILTER_CRITERIA_FLAG) | SEARCH_FILTER_CRITERIA_MEDIA) | SEARCH_FILTER_CRITERIA_RATING) | SEARCH_FILTER_CRITERIA_SAVEDSEARCH);
	return result;
}

CollectionPageCollectionSearchViewFilter*
collection_page_collection_search_view_filter_construct (GType object_type)
{
	CollectionPageCollectionSearchViewFilter* self = NULL;
	self = (CollectionPageCollectionSearchViewFilter*) default_search_view_filter_construct (object_type);
	return self;
}

CollectionPageCollectionSearchViewFilter*
collection_page_collection_search_view_filter_new (void)
{
	return collection_page_collection_search_view_filter_construct (COLLECTION_PAGE_TYPE_COLLECTION_SEARCH_VIEW_FILTER);
}

static void
collection_page_collection_search_view_filter_class_init (CollectionPageCollectionSearchViewFilterClass * klass,
                                                          gpointer klass_data)
{
	collection_page_collection_search_view_filter_parent_class = g_type_class_peek_parent (klass);
	((SearchViewFilterClass *) klass)->get_criteria = (guint (*) (SearchViewFilter*)) collection_page_collection_search_view_filter_real_get_criteria;
}

static void
collection_page_collection_search_view_filter_instance_init (CollectionPageCollectionSearchViewFilter * self,
                                                             gpointer klass)
{
}

static GType
collection_page_collection_search_view_filter_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (CollectionPageCollectionSearchViewFilterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) collection_page_collection_search_view_filter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CollectionPageCollectionSearchViewFilter), 0, (GInstanceInitFunc) collection_page_collection_search_view_filter_instance_init, NULL };
	GType collection_page_collection_search_view_filter_type_id;
	collection_page_collection_search_view_filter_type_id = g_type_register_static (TYPE_DEFAULT_SEARCH_VIEW_FILTER, "CollectionPageCollectionSearchViewFilter", &g_define_type_info, 0);
	return collection_page_collection_search_view_filter_type_id;
}

GType
collection_page_collection_search_view_filter_get_type (void)
{
	static volatile gsize collection_page_collection_search_view_filter_type_id__once = 0;
	if (g_once_init_enter (&collection_page_collection_search_view_filter_type_id__once)) {
		GType collection_page_collection_search_view_filter_type_id;
		collection_page_collection_search_view_filter_type_id = collection_page_collection_search_view_filter_get_type_once ();
		g_once_init_leave (&collection_page_collection_search_view_filter_type_id__once, collection_page_collection_search_view_filter_type_id);
	}
	return collection_page_collection_search_view_filter_type_id__once;
}

static void
collection_page_class_init (CollectionPageClass * klass,
                            gpointer klass_data)
{
	collection_page_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &CollectionPage_private_offset);
	((PageClass *) klass)->get_toolbar = (GtkToolbar* (*) (Page*)) collection_page_real_get_toolbar;
	((PageClass *) klass)->init_collect_ui_filenames = (void (*) (Page*, GeeList*)) collection_page_real_init_collect_ui_filenames;
	((PageClass *) klass)->add_actions = (void (*) (Page*, GActionMap*)) collection_page_real_add_actions;
	((PageClass *) klass)->remove_actions = (void (*) (Page*, GActionMap*)) collection_page_real_remove_actions;
	((PageClass *) klass)->init_collect_injection_groups = (InjectionGroup** (*) (Page*, gint*)) collection_page_real_init_collect_injection_groups;
	((PageClass *) klass)->init_actions = (void (*) (Page*, gint, gint)) collection_page_real_init_actions;
	((PageClass *) klass)->update_actions = (void (*) (Page*, gint, gint)) collection_page_real_update_actions;
	((CheckerboardPageClass *) klass)->on_item_activated = (void (*) (CheckerboardPage*, CheckerboardItem*, CheckerboardPageActivator, CheckerboardPageKeyboardModifiers*)) collection_page_real_on_item_activated;
	((PageClass *) klass)->on_app_key_pressed = (gboolean (*) (Page*, GdkEventKey*)) collection_page_real_on_app_key_pressed;
	((MediaPageClass *) klass)->on_export = (void (*) (MediaPage*)) collection_page_real_on_export;
	((PageClass *) klass)->on_ctrl_pressed = (gboolean (*) (Page*, GdkEventKey*)) collection_page_real_on_ctrl_pressed;
	((PageClass *) klass)->on_ctrl_released = (gboolean (*) (Page*, GdkEventKey*)) collection_page_real_on_ctrl_released;
	((CheckerboardPageClass *) klass)->get_search_view_filter = (SearchViewFilter* (*) (CheckerboardPage*)) collection_page_real_get_search_view_filter;
	G_OBJECT_CLASS (klass)->finalize = collection_page_finalize;
}

static void
collection_page_instance_init (CollectionPage * self,
                               gpointer klass)
{
	CollectionPageCollectionSearchViewFilter* _tmp0_;
	self->priv = collection_page_get_instance_private (self);
	self->priv->exporter = NULL;
	_tmp0_ = collection_page_collection_search_view_filter_new ();
	self->priv->search_filter = _tmp0_;
}

static void
collection_page_finalize (GObject * obj)
{
	CollectionPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_COLLECTION_PAGE, CollectionPage);
	_exporter_ui_unref0 (self->priv->exporter);
	_view_filter_unref0 (self->priv->search_filter);
	G_OBJECT_CLASS (collection_page_parent_class)->finalize (obj);
}

static GType
collection_page_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (CollectionPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) collection_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CollectionPage), 0, (GInstanceInitFunc) collection_page_instance_init, NULL };
	GType collection_page_type_id;
	collection_page_type_id = g_type_register_static (TYPE_MEDIA_PAGE, "CollectionPage", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	CollectionPage_private_offset = g_type_add_instance_private (collection_page_type_id, sizeof (CollectionPagePrivate));
	return collection_page_type_id;
}

GType
collection_page_get_type (void)
{
	static volatile gsize collection_page_type_id__once = 0;
	if (g_once_init_enter (&collection_page_type_id__once)) {
		GType collection_page_type_id;
		collection_page_type_id = collection_page_get_type_once ();
		g_once_init_leave (&collection_page_type_id__once, collection_page_type_id);
	}
	return collection_page_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;
}

