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

/*
* Copyright (c) 2014-2017 elementary LLC. (https://github.com/elementary/photos)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/

#include "io.elementary.photos.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <glib-object.h>
#include <gee.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	LIBRARY_RAWS_ENTRY_0_PROPERTY,
	LIBRARY_RAWS_ENTRY_NUM_PROPERTIES
};
static GParamSpec* library_raws_entry_properties[LIBRARY_RAWS_ENTRY_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define LIBRARY_RAWS_PAGE_TYPE_RAWS_SEARCH_VIEW_FILTER (library_raws_page_raws_search_view_filter_get_type ())
#define LIBRARY_RAWS_PAGE_RAWS_SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIBRARY_RAWS_PAGE_TYPE_RAWS_SEARCH_VIEW_FILTER, LibraryRawsPageRawsSearchViewFilter))
#define LIBRARY_RAWS_PAGE_RAWS_SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIBRARY_RAWS_PAGE_TYPE_RAWS_SEARCH_VIEW_FILTER, LibraryRawsPageRawsSearchViewFilterClass))
#define LIBRARY_RAWS_PAGE_IS_RAWS_SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIBRARY_RAWS_PAGE_TYPE_RAWS_SEARCH_VIEW_FILTER))
#define LIBRARY_RAWS_PAGE_IS_RAWS_SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIBRARY_RAWS_PAGE_TYPE_RAWS_SEARCH_VIEW_FILTER))
#define LIBRARY_RAWS_PAGE_RAWS_SEARCH_VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIBRARY_RAWS_PAGE_TYPE_RAWS_SEARCH_VIEW_FILTER, LibraryRawsPageRawsSearchViewFilterClass))

typedef struct _LibraryRawsPageRawsSearchViewFilter LibraryRawsPageRawsSearchViewFilter;
typedef struct _LibraryRawsPageRawsSearchViewFilterClass LibraryRawsPageRawsSearchViewFilterClass;
enum  {
	LIBRARY_RAWS_PAGE_0_PROPERTY,
	LIBRARY_RAWS_PAGE_NUM_PROPERTIES
};
static GParamSpec* library_raws_page_properties[LIBRARY_RAWS_PAGE_NUM_PROPERTIES];
#define _view_manager_unref0(var) ((var == NULL) ? NULL : (var = (view_manager_unref (var), NULL)))
#define _view_filter_unref0(var) ((var == NULL) ? NULL : (var = (view_filter_unref (var), NULL)))

#define LIBRARY_RAWS_PAGE_TYPE_RAWS_VIEW_MANAGER (library_raws_page_raws_view_manager_get_type ())
#define LIBRARY_RAWS_PAGE_RAWS_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIBRARY_RAWS_PAGE_TYPE_RAWS_VIEW_MANAGER, LibraryRawsPageRawsViewManager))
#define LIBRARY_RAWS_PAGE_RAWS_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIBRARY_RAWS_PAGE_TYPE_RAWS_VIEW_MANAGER, LibraryRawsPageRawsViewManagerClass))
#define LIBRARY_RAWS_PAGE_IS_RAWS_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIBRARY_RAWS_PAGE_TYPE_RAWS_VIEW_MANAGER))
#define LIBRARY_RAWS_PAGE_IS_RAWS_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIBRARY_RAWS_PAGE_TYPE_RAWS_VIEW_MANAGER))
#define LIBRARY_RAWS_PAGE_RAWS_VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIBRARY_RAWS_PAGE_TYPE_RAWS_VIEW_MANAGER, LibraryRawsPageRawsViewManagerClass))

typedef struct _LibraryRawsPageRawsViewManager LibraryRawsPageRawsViewManager;
typedef struct _LibraryRawsPageRawsViewManagerClass LibraryRawsPageRawsViewManagerClass;
#define _media_collection_registry_unref0(var) ((var == NULL) ? NULL : (var = (media_collection_registry_unref (var), NULL)))
#define _view_collection_monitor_unref0(var) ((var == NULL) ? NULL : (var = (view_collection_monitor_unref (var), NULL)))
#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL)))
typedef struct _LibraryRawsPageRawsViewManagerPrivate LibraryRawsPageRawsViewManagerPrivate;
typedef struct _LibraryRawsPageRawsSearchViewFilterPrivate LibraryRawsPageRawsSearchViewFilterPrivate;

struct _LibraryRawsPagePrivate {
	ViewManager* view_manager;
	LibraryRawsPageRawsSearchViewFilter* search_filter;
};

struct _LibraryRawsPageRawsViewManager {
	CollectionViewManager parent_instance;
	LibraryRawsPageRawsViewManagerPrivate * priv;
};

struct _LibraryRawsPageRawsViewManagerClass {
	CollectionViewManagerClass parent_class;
};

struct _LibraryRawsPageRawsSearchViewFilter {
	CollectionPageCollectionSearchViewFilter parent_instance;
	LibraryRawsPageRawsSearchViewFilterPrivate * priv;
};

struct _LibraryRawsPageRawsSearchViewFilterClass {
	CollectionPageCollectionSearchViewFilterClass parent_class;
};

static gpointer library_raws_entry_parent_class = NULL;
static gint LibraryRawsPage_private_offset;
static gpointer library_raws_page_parent_class = NULL;
static gpointer library_raws_page_raws_view_manager_parent_class = NULL;
static gpointer library_raws_page_raws_search_view_filter_parent_class = NULL;

static gchar* library_raws_entry_real_get_sidebar_name (SidebarSimplePageEntry* base);
static GIcon* library_raws_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base);
static Page* library_raws_entry_real_create_page (SidebarSimplePageEntry* base);
static void library_raws_entry_finalize (GObject * obj);
static GType library_raws_entry_get_type_once (void);
static GType library_raws_page_raws_search_view_filter_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static LibraryRawsPageRawsSearchViewFilter* library_raws_page_raws_search_view_filter_new (void);
static LibraryRawsPageRawsSearchViewFilter* library_raws_page_raws_search_view_filter_construct (GType object_type);
static LibraryRawsPageRawsViewManager* library_raws_page_raws_view_manager_new (LibraryRawsPage* owner);
static LibraryRawsPageRawsViewManager* library_raws_page_raws_view_manager_construct (GType object_type,
                                                                               LibraryRawsPage* owner);
static GType library_raws_page_raws_view_manager_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static gchar* library_raws_page_real_get_view_empty_message (CheckerboardPage* base);
static SearchViewFilter* library_raws_page_real_get_search_view_filter (CheckerboardPage* base);
static gboolean library_raws_page_raws_view_manager_real_include_in_view (ViewManager* base,
                                                                   DataSource* source);
static GType library_raws_page_raws_view_manager_get_type_once (void);
static guint library_raws_page_raws_search_view_filter_real_get_criteria (SearchViewFilter* base);
static GType library_raws_page_raws_search_view_filter_get_type_once (void);
static void library_raws_page_finalize (GObject * obj);
static GType library_raws_page_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static gchar*
library_raws_entry_real_get_sidebar_name (SidebarSimplePageEntry* base)
{
	LibraryRawsEntry * self;
	gchar* _tmp0_;
	gchar* result;
	self = (LibraryRawsEntry*) base;
	_tmp0_ = g_strdup (_ ("Raw Photos"));
	result = _tmp0_;
	return result;
}

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

static GIcon*
library_raws_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base)
{
	LibraryRawsEntry * self;
	GIcon* _tmp0_;
	GIcon* _tmp1_;
	GIcon* result;
	self = (LibraryRawsEntry*) base;
	_tmp0_ = self->icon;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static Page*
library_raws_entry_real_create_page (SidebarSimplePageEntry* base)
{
	LibraryRawsEntry * self;
	LibraryRawsPage* _tmp0_;
	Page* result;
	self = (LibraryRawsEntry*) base;
	_tmp0_ = library_raws_page_new (NULL, NULL);
	g_object_ref_sink (_tmp0_);
	result = (Page*) _tmp0_;
	return result;
}

LibraryRawsEntry*
library_raws_entry_construct (GType object_type)
{
	LibraryRawsEntry * self = NULL;
	self = (LibraryRawsEntry*) sidebar_simple_page_entry_construct (object_type);
	return self;
}

LibraryRawsEntry*
library_raws_entry_new (void)
{
	return library_raws_entry_construct (LIBRARY_TYPE_RAWS_ENTRY);
}

static void
library_raws_entry_class_init (LibraryRawsEntryClass * klass,
                               gpointer klass_data)
{
	library_raws_entry_parent_class = g_type_class_peek_parent (klass);
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry*)) library_raws_entry_real_get_sidebar_name;
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (GIcon* (*) (SidebarSimplePageEntry*)) library_raws_entry_real_get_sidebar_icon;
	((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry*)) library_raws_entry_real_create_page;
	G_OBJECT_CLASS (klass)->finalize = library_raws_entry_finalize;
}

static void
library_raws_entry_instance_init (LibraryRawsEntry * self,
                                  gpointer klass)
{
	GThemedIcon* _tmp0_;
	_tmp0_ = (GThemedIcon*) g_themed_icon_new (RESOURCES_ICON_RAW_PAGE);
	self->icon = (GIcon*) _tmp0_;
}

static void
library_raws_entry_finalize (GObject * obj)
{
	LibraryRawsEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIBRARY_TYPE_RAWS_ENTRY, LibraryRawsEntry);
	_g_object_unref0 (self->icon);
	G_OBJECT_CLASS (library_raws_entry_parent_class)->finalize (obj);
}

static GType
library_raws_entry_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LibraryRawsEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) library_raws_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LibraryRawsEntry), 0, (GInstanceInitFunc) library_raws_entry_instance_init, NULL };
	GType library_raws_entry_type_id;
	library_raws_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "LibraryRawsEntry", &g_define_type_info, 0);
	return library_raws_entry_type_id;
}

GType
library_raws_entry_get_type (void)
{
	static volatile gsize library_raws_entry_type_id__once = 0;
	if (g_once_init_enter (&library_raws_entry_type_id__once)) {
		GType library_raws_entry_type_id;
		library_raws_entry_type_id = library_raws_entry_get_type_once ();
		g_once_init_leave (&library_raws_entry_type_id__once, library_raws_entry_type_id);
	}
	return library_raws_entry_type_id__once;
}

static inline gpointer
library_raws_page_get_instance_private (LibraryRawsPage* self)
{
	return G_STRUCT_MEMBER_P (self, LibraryRawsPage_private_offset);
}

LibraryRawsPage*
library_raws_page_construct (GType object_type,
                             ProgressMonitor monitor,
                             gpointer monitor_target)
{
	LibraryRawsPage * self = NULL;
	LibraryRawsPageRawsViewManager* _tmp0_;
	self = (LibraryRawsPage*) collection_page_construct (object_type, LIBRARY_RAWS_PAGE_NAME);
	_tmp0_ = library_raws_page_raws_view_manager_new (self);
	_view_manager_unref0 (self->priv->view_manager);
	self->priv->view_manager = (ViewManager*) _tmp0_;
	{
		GeeIterator* _sources_it = NULL;
		MediaCollectionRegistry* _tmp1_;
		MediaCollectionRegistry* _tmp2_;
		GeeCollection* _tmp3_;
		GeeCollection* _tmp4_;
		GeeIterator* _tmp5_;
		GeeIterator* _tmp6_;
		_tmp1_ = media_collection_registry_get_instance ();
		_tmp2_ = _tmp1_;
		_tmp3_ = media_collection_registry_get_all (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
		_tmp6_ = _tmp5_;
		_g_object_unref0 (_tmp4_);
		_media_collection_registry_unref0 (_tmp2_);
		_sources_it = _tmp6_;
		while (TRUE) {
			GeeIterator* _tmp7_;
			MediaSourceCollection* sources = NULL;
			GeeIterator* _tmp8_;
			gpointer _tmp9_;
			ViewCollection* _tmp10_;
			ViewCollection* _tmp11_;
			MediaSourceCollection* _tmp12_;
			ViewManager* _tmp13_;
			ViewCollectionMonitor* _tmp14_;
			ViewCollectionMonitor* _tmp15_;
			_tmp7_ = _sources_it;
			if (!gee_iterator_next (_tmp7_)) {
				break;
			}
			_tmp8_ = _sources_it;
			_tmp9_ = gee_iterator_get (_tmp8_);
			sources = (MediaSourceCollection*) _tmp9_;
			_tmp10_ = page_get_view ((Page*) self);
			_tmp11_ = _tmp10_;
			_tmp12_ = sources;
			_tmp13_ = self->priv->view_manager;
			_tmp14_ = view_collection_monitor_source_collection (_tmp11_, (SourceCollection*) _tmp12_, _tmp13_, NULL, NULL, monitor, monitor_target);
			_tmp15_ = _tmp14_;
			_view_collection_monitor_unref0 (_tmp15_);
			_data_collection_unref0 (_tmp11_);
			_data_collection_unref0 (sources);
		}
		_g_object_unref0 (_sources_it);
	}
	return self;
}

LibraryRawsPage*
library_raws_page_new (ProgressMonitor monitor,
                       gpointer monitor_target)
{
	return library_raws_page_construct (LIBRARY_TYPE_RAWS_PAGE, monitor, monitor_target);
}

static gchar*
library_raws_page_real_get_view_empty_message (CheckerboardPage* base)
{
	LibraryRawsPage * self;
	LibraryWindow* window = NULL;
	AppWindow* _tmp0_;
	LibraryWindow* _tmp1_;
	LibraryWindow* _tmp2_;
	LibraryWindow* _tmp3_;
	gchar* _tmp5_;
	gchar* result;
	self = (LibraryRawsPage*) base;
	_tmp0_ = app_window_get_instance ();
	_tmp1_ = IS_LIBRARY_WINDOW (_tmp0_) ? ((LibraryWindow*) _tmp0_) : NULL;
	if (_tmp1_ == NULL) {
		_g_object_unref0 (_tmp0_);
	}
	window = _tmp1_;
	_tmp2_ = window;
	g_warn_if_fail (_tmp2_ != NULL);
	_tmp3_ = window;
	if (_tmp3_ != NULL) {
		LibraryWindow* _tmp4_;
		_tmp4_ = window;
		library_window_toggle_welcome_page (_tmp4_, TRUE, _ ("Add Some Photos"), _ ("No Photos were found in your library."), TRUE);
	}
	_tmp5_ = g_strdup (_ ("No photos/videos"));
	result = _tmp5_;
	_g_object_unref0 (window);
	return result;
}

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

static SearchViewFilter*
library_raws_page_real_get_search_view_filter (CheckerboardPage* base)
{
	LibraryRawsPage * self;
	LibraryRawsPageRawsSearchViewFilter* _tmp0_;
	SearchViewFilter* _tmp1_;
	SearchViewFilter* result;
	self = (LibraryRawsPage*) base;
	_tmp0_ = self->priv->search_filter;
	_tmp1_ = _view_filter_ref0 ((SearchViewFilter*) _tmp0_);
	result = _tmp1_;
	return result;
}

static LibraryRawsPageRawsViewManager*
library_raws_page_raws_view_manager_construct (GType object_type,
                                               LibraryRawsPage* owner)
{
	LibraryRawsPageRawsViewManager* self = NULL;
	g_return_val_if_fail (owner != NULL, NULL);
	self = (LibraryRawsPageRawsViewManager*) collection_view_manager_construct (object_type, (CollectionPage*) owner);
	return self;
}

static LibraryRawsPageRawsViewManager*
library_raws_page_raws_view_manager_new (LibraryRawsPage* owner)
{
	return library_raws_page_raws_view_manager_construct (LIBRARY_RAWS_PAGE_TYPE_RAWS_VIEW_MANAGER, owner);
}

static gboolean
library_raws_page_raws_view_manager_real_include_in_view (ViewManager* base,
                                                          DataSource* source)
{
	LibraryRawsPageRawsViewManager * self;
	Photo* photo = NULL;
	gboolean _tmp0_ = FALSE;
	Photo* _tmp1_;
	gboolean result;
	self = (LibraryRawsPageRawsViewManager*) base;
	g_return_val_if_fail (source != NULL, FALSE);
	photo = IS_PHOTO (source) ? ((Photo*) source) : NULL;
	_tmp1_ = photo;
	if (_tmp1_ != NULL) {
		Photo* _tmp2_;
		_tmp2_ = photo;
		_tmp0_ = photo_get_master_file_format (_tmp2_) == PHOTO_FILE_FORMAT_RAW;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static void
library_raws_page_raws_view_manager_class_init (LibraryRawsPageRawsViewManagerClass * klass,
                                                gpointer klass_data)
{
	library_raws_page_raws_view_manager_parent_class = g_type_class_peek_parent (klass);
	((ViewManagerClass *) klass)->include_in_view = (gboolean (*) (ViewManager*, DataSource*)) library_raws_page_raws_view_manager_real_include_in_view;
}

static void
library_raws_page_raws_view_manager_instance_init (LibraryRawsPageRawsViewManager * self,
                                                   gpointer klass)
{
}

static GType
library_raws_page_raws_view_manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LibraryRawsPageRawsViewManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) library_raws_page_raws_view_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LibraryRawsPageRawsViewManager), 0, (GInstanceInitFunc) library_raws_page_raws_view_manager_instance_init, NULL };
	GType library_raws_page_raws_view_manager_type_id;
	library_raws_page_raws_view_manager_type_id = g_type_register_static (TYPE_COLLECTION_VIEW_MANAGER, "LibraryRawsPageRawsViewManager", &g_define_type_info, 0);
	return library_raws_page_raws_view_manager_type_id;
}

static GType
library_raws_page_raws_view_manager_get_type (void)
{
	static volatile gsize library_raws_page_raws_view_manager_type_id__once = 0;
	if (g_once_init_enter (&library_raws_page_raws_view_manager_type_id__once)) {
		GType library_raws_page_raws_view_manager_type_id;
		library_raws_page_raws_view_manager_type_id = library_raws_page_raws_view_manager_get_type_once ();
		g_once_init_leave (&library_raws_page_raws_view_manager_type_id__once, library_raws_page_raws_view_manager_type_id);
	}
	return library_raws_page_raws_view_manager_type_id__once;
}

static guint
library_raws_page_raws_search_view_filter_real_get_criteria (SearchViewFilter* base)
{
	LibraryRawsPageRawsSearchViewFilter * self;
	guint result;
	self = (LibraryRawsPageRawsSearchViewFilter*) base;
	result = (guint) (SEARCH_FILTER_CRITERIA_TEXT | SEARCH_FILTER_CRITERIA_MEDIA);
	return result;
}

static LibraryRawsPageRawsSearchViewFilter*
library_raws_page_raws_search_view_filter_construct (GType object_type)
{
	LibraryRawsPageRawsSearchViewFilter* self = NULL;
	self = (LibraryRawsPageRawsSearchViewFilter*) collection_page_collection_search_view_filter_construct (object_type);
	return self;
}

static LibraryRawsPageRawsSearchViewFilter*
library_raws_page_raws_search_view_filter_new (void)
{
	return library_raws_page_raws_search_view_filter_construct (LIBRARY_RAWS_PAGE_TYPE_RAWS_SEARCH_VIEW_FILTER);
}

static void
library_raws_page_raws_search_view_filter_class_init (LibraryRawsPageRawsSearchViewFilterClass * klass,
                                                      gpointer klass_data)
{
	library_raws_page_raws_search_view_filter_parent_class = g_type_class_peek_parent (klass);
	((SearchViewFilterClass *) klass)->get_criteria = (guint (*) (SearchViewFilter*)) library_raws_page_raws_search_view_filter_real_get_criteria;
}

static void
library_raws_page_raws_search_view_filter_instance_init (LibraryRawsPageRawsSearchViewFilter * self,
                                                         gpointer klass)
{
}

static GType
library_raws_page_raws_search_view_filter_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LibraryRawsPageRawsSearchViewFilterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) library_raws_page_raws_search_view_filter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LibraryRawsPageRawsSearchViewFilter), 0, (GInstanceInitFunc) library_raws_page_raws_search_view_filter_instance_init, NULL };
	GType library_raws_page_raws_search_view_filter_type_id;
	library_raws_page_raws_search_view_filter_type_id = g_type_register_static (COLLECTION_PAGE_TYPE_COLLECTION_SEARCH_VIEW_FILTER, "LibraryRawsPageRawsSearchViewFilter", &g_define_type_info, 0);
	return library_raws_page_raws_search_view_filter_type_id;
}

static GType
library_raws_page_raws_search_view_filter_get_type (void)
{
	static volatile gsize library_raws_page_raws_search_view_filter_type_id__once = 0;
	if (g_once_init_enter (&library_raws_page_raws_search_view_filter_type_id__once)) {
		GType library_raws_page_raws_search_view_filter_type_id;
		library_raws_page_raws_search_view_filter_type_id = library_raws_page_raws_search_view_filter_get_type_once ();
		g_once_init_leave (&library_raws_page_raws_search_view_filter_type_id__once, library_raws_page_raws_search_view_filter_type_id);
	}
	return library_raws_page_raws_search_view_filter_type_id__once;
}

static void
library_raws_page_class_init (LibraryRawsPageClass * klass,
                              gpointer klass_data)
{
	library_raws_page_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &LibraryRawsPage_private_offset);
	((CheckerboardPageClass *) klass)->get_view_empty_message = (gchar* (*) (CheckerboardPage*)) library_raws_page_real_get_view_empty_message;
	((CheckerboardPageClass *) klass)->get_search_view_filter = (SearchViewFilter* (*) (CheckerboardPage*)) library_raws_page_real_get_search_view_filter;
	G_OBJECT_CLASS (klass)->finalize = library_raws_page_finalize;
}

static void
library_raws_page_instance_init (LibraryRawsPage * self,
                                 gpointer klass)
{
	LibraryRawsPageRawsSearchViewFilter* _tmp0_;
	self->priv = library_raws_page_get_instance_private (self);
	_tmp0_ = library_raws_page_raws_search_view_filter_new ();
	self->priv->search_filter = _tmp0_;
}

static void
library_raws_page_finalize (GObject * obj)
{
	LibraryRawsPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIBRARY_TYPE_RAWS_PAGE, LibraryRawsPage);
	_view_manager_unref0 (self->priv->view_manager);
	_view_filter_unref0 (self->priv->search_filter);
	G_OBJECT_CLASS (library_raws_page_parent_class)->finalize (obj);
}

static GType
library_raws_page_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LibraryRawsPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) library_raws_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LibraryRawsPage), 0, (GInstanceInitFunc) library_raws_page_instance_init, NULL };
	GType library_raws_page_type_id;
	library_raws_page_type_id = g_type_register_static (TYPE_COLLECTION_PAGE, "LibraryRawsPage", &g_define_type_info, 0);
	LibraryRawsPage_private_offset = g_type_add_instance_private (library_raws_page_type_id, sizeof (LibraryRawsPagePrivate));
	return library_raws_page_type_id;
}

GType
library_raws_page_get_type (void)
{
	static volatile gsize library_raws_page_type_id__once = 0;
	if (g_once_init_enter (&library_raws_page_type_id__once)) {
		GType library_raws_page_type_id;
		library_raws_page_type_id = library_raws_page_get_type_once ();
		g_once_init_leave (&library_raws_page_type_id__once, library_raws_page_type_id);
	}
	return library_raws_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;
}

