/* base-view.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from base-view.vala, do not modify */

/*
  This file is part of GNOME Taquin

  GNOME Taquin is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  GNOME Taquin 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 GNOME Taquin.  If not, see <https://www.gnu.org/licenses/>.
*/

#include <gtk/gtk.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TYPE_ADAPTATIVE_WIDGET (adaptative_widget_get_type ())
#define ADAPTATIVE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADAPTATIVE_WIDGET, AdaptativeWidget))
#define IS_ADAPTATIVE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADAPTATIVE_WIDGET))
#define ADAPTATIVE_WIDGET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_ADAPTATIVE_WIDGET, AdaptativeWidgetIface))

typedef struct _AdaptativeWidget AdaptativeWidget;
typedef struct _AdaptativeWidgetIface AdaptativeWidgetIface;
typedef enum  {
	ADAPTATIVE_WIDGET_WINDOW_SIZE_START_SIZE,
	ADAPTATIVE_WIDGET_WINDOW_SIZE_USUAL_SIZE,
	ADAPTATIVE_WIDGET_WINDOW_SIZE_QUITE_THIN,
	ADAPTATIVE_WIDGET_WINDOW_SIZE_PHONE_VERT,
	ADAPTATIVE_WIDGET_WINDOW_SIZE_PHONE_HZTL,
	ADAPTATIVE_WIDGET_WINDOW_SIZE_PHONE_BOTH,
	ADAPTATIVE_WIDGET_WINDOW_SIZE_EXTRA_THIN,
	ADAPTATIVE_WIDGET_WINDOW_SIZE_EXTRA_FLAT
} AdaptativeWidgetWindowSize;

#define ADAPTATIVE_WIDGET_TYPE_WINDOW_SIZE (adaptative_widget_window_size_get_type ())

#define TYPE_BASE_VIEW (base_view_get_type ())
#define BASE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BASE_VIEW, BaseView))
#define BASE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BASE_VIEW, BaseViewClass))
#define IS_BASE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BASE_VIEW))
#define IS_BASE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BASE_VIEW))
#define BASE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BASE_VIEW, BaseViewClass))

typedef struct _BaseView BaseView;
typedef struct _BaseViewClass BaseViewClass;
typedef struct _BaseViewPrivate BaseViewPrivate;

#define TYPE_OVERLAYED_LIST (overlayed_list_get_type ())
#define OVERLAYED_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_OVERLAYED_LIST, OverlayedList))
#define OVERLAYED_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_OVERLAYED_LIST, OverlayedListClass))
#define IS_OVERLAYED_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_OVERLAYED_LIST))
#define IS_OVERLAYED_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_OVERLAYED_LIST))
#define OVERLAYED_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_OVERLAYED_LIST, OverlayedListClass))

typedef struct _OverlayedList OverlayedList;
typedef struct _OverlayedListClass OverlayedListClass;

#define TYPE_ABOUT_LIST (about_list_get_type ())
#define ABOUT_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ABOUT_LIST, AboutList))
#define ABOUT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ABOUT_LIST, AboutListClass))
#define IS_ABOUT_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ABOUT_LIST))
#define IS_ABOUT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ABOUT_LIST))
#define ABOUT_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ABOUT_LIST, AboutListClass))

typedef struct _AboutList AboutList;
typedef struct _AboutListClass AboutListClass;

#define TYPE_NOTIFICATIONS_REVEALER (notifications_revealer_get_type ())
#define NOTIFICATIONS_REVEALER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTIFICATIONS_REVEALER, NotificationsRevealer))
#define NOTIFICATIONS_REVEALER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTIFICATIONS_REVEALER, NotificationsRevealerClass))
#define IS_NOTIFICATIONS_REVEALER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTIFICATIONS_REVEALER))
#define IS_NOTIFICATIONS_REVEALER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTIFICATIONS_REVEALER))
#define NOTIFICATIONS_REVEALER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTIFICATIONS_REVEALER, NotificationsRevealerClass))

typedef struct _NotificationsRevealer NotificationsRevealer;
typedef struct _NotificationsRevealerClass NotificationsRevealerClass;
enum  {
	BASE_VIEW_0_PROPERTY,
	BASE_VIEW_SAVED_WINDOW_SIZE_PROPERTY,
	BASE_VIEW_IN_WINDOW_ABOUT_PROPERTY,
	BASE_VIEW_NUM_PROPERTIES
};
static GParamSpec* base_view_properties[BASE_VIEW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _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 _AdaptativeWidgetIface {
	GTypeInterface parent_iface;
	void (*set_window_size) (AdaptativeWidget* self, AdaptativeWidgetWindowSize new_size);
};

struct _BaseView {
	GtkStack parent_instance;
	BaseViewPrivate * priv;
	GtkGrid* main_grid;
};

struct _BaseViewClass {
	GtkStackClass parent_class;
	gboolean (*handle_copy_text) (BaseView* self, gchar** copy_text);
	void (*close_popovers) (BaseView* self);
	void (*set_window_size) (BaseView* self, AdaptativeWidgetWindowSize new_size);
	void (*show_default_view) (BaseView* self);
	gboolean (*is_in_in_window_mode) (BaseView* self);
};

struct _BaseViewPrivate {
	AdaptativeWidgetWindowSize _saved_window_size;
	gboolean _in_window_about;
	gboolean about_list_created;
	AboutList* about_list;
	GtkOverlay* notifications_overlay;
	gboolean notifications_revealer_created;
	NotificationsRevealer* notifications_revealer;
};

static gint BaseView_private_offset;
static gpointer base_view_parent_class = NULL;
static AdaptativeWidgetIface * base_view_adaptative_widget_parent_iface = NULL;

VALA_EXTERN GType adaptative_widget_window_size_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType adaptative_widget_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AdaptativeWidget, g_object_unref)
VALA_EXTERN GType base_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BaseView, g_object_unref)
VALA_EXTERN GType overlayed_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OverlayedList, g_object_unref)
VALA_EXTERN GType about_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AboutList, g_object_unref)
VALA_EXTERN GType notifications_revealer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (NotificationsRevealer, g_object_unref)
VALA_EXTERN gboolean base_view_handle_copy_text (BaseView* self,
                                     gchar** copy_text);
VALA_EXTERN void base_view_close_popovers (BaseView* self);
VALA_EXTERN void base_view_set_window_size (BaseView* self,
                                AdaptativeWidgetWindowSize new_size);
VALA_EXTERN void base_view_show_default_view (BaseView* self);
VALA_EXTERN gboolean base_view_is_in_in_window_mode (BaseView* self);
static gboolean base_view_real_handle_copy_text (BaseView* self,
                                          gchar** copy_text);
VALA_EXTERN gboolean base_view_get_in_window_about (BaseView* self);
VALA_EXTERN gboolean overlayed_list_handle_copy_text (OverlayedList* self,
                                          gchar** copy_text);
VALA_EXTERN gboolean base_window_no_copy_text (gchar** copy_text);
static void base_view_real_close_popovers (BaseView* self);
static void base_view_real_set_window_size (BaseView* self,
                                     AdaptativeWidgetWindowSize new_size);
static void base_view_set_saved_window_size (BaseView* self,
                                      AdaptativeWidgetWindowSize value);
VALA_EXTERN void adaptative_widget_set_window_size (AdaptativeWidget* self,
                                        AdaptativeWidgetWindowSize new_size);
static void base_view_real_show_default_view (BaseView* self);
static void base_view_set_in_window_about (BaseView* self,
                                    gboolean value);
static gboolean base_view_real_is_in_in_window_mode (BaseView* self);
VALA_EXTERN void base_view_create_about_list (BaseView* self,
                                  gchar*** artists,
                                  gint* artists_length1,
                                  gchar*** authors,
                                  gint* authors_length1,
                                  gchar** comments,
                                  gchar** copyright,
                                  gchar*** documenters,
                                  gint* documenters_length1,
                                  gchar** logo_icon_name,
                                  gchar** program_name,
                                  gchar** translator_credits,
                                  gchar** version,
                                  gchar** website,
                                  gchar** website_label);
VALA_EXTERN AboutList* about_list_new (gboolean needs_shadows,
                           gboolean big_placeholder,
                           gchar*** artists,
                           gint* artists_length1,
                           gchar*** authors,
                           gint* authors_length1,
                           gchar** comments,
                           gchar** copyright,
                           gchar*** documenters,
                           gint* documenters_length1,
                           gchar** logo_icon_name,
                           gchar** program_name,
                           gchar** translator_credits,
                           gchar** version,
                           gchar** website,
                           gchar** website_label);
VALA_EXTERN AboutList* about_list_construct (GType object_type,
                                 gboolean needs_shadows,
                                 gboolean big_placeholder,
                                 gchar*** artists,
                                 gint* artists_length1,
                                 gchar*** authors,
                                 gint* authors_length1,
                                 gchar** comments,
                                 gchar** copyright,
                                 gchar*** documenters,
                                 gint* documenters_length1,
                                 gchar** logo_icon_name,
                                 gchar** program_name,
                                 gchar** translator_credits,
                                 gchar** version,
                                 gchar** website,
                                 gchar** website_label);
VALA_EXTERN AdaptativeWidgetWindowSize base_view_get_saved_window_size (BaseView* self);
VALA_EXTERN void base_view_show_about_view (BaseView* self);
VALA_EXTERN void overlayed_list_reset (OverlayedList* self);
static void base_view_create_notifications_revealer (BaseView* self);
VALA_EXTERN NotificationsRevealer* notifications_revealer_new (void);
VALA_EXTERN NotificationsRevealer* notifications_revealer_construct (GType object_type);
VALA_EXTERN void base_view_show_notification (BaseView* self,
                                  const gchar* notification);
VALA_EXTERN void notifications_revealer_show_notification (NotificationsRevealer* self,
                                               const gchar* notification);
VALA_EXTERN void base_view_hide_notification (BaseView* self);
VALA_EXTERN void notifications_revealer_hide_notification (NotificationsRevealer* self);
VALA_EXTERN BaseView* base_view_new (void);
VALA_EXTERN BaseView* base_view_construct (GType object_type);
static void base_view_finalize (GObject * obj);
static GType base_view_get_type_once (void);
static void _vala_base_view_get_property (GObject * object,
                                   guint property_id,
                                   GValue * value,
                                   GParamSpec * pspec);
static void _vala_base_view_set_property (GObject * object,
                                   guint property_id,
                                   const GValue * value,
                                   GParamSpec * pspec);

static inline gpointer
base_view_get_instance_private (BaseView* self)
{
	return G_STRUCT_MEMBER_P (self, BaseView_private_offset);
}

static gboolean
base_view_real_handle_copy_text (BaseView* self,
                                 gchar** copy_text)
{
	gchar* _vala_copy_text = NULL;
	gboolean _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_in_window_about;
	if (_tmp0_) {
		AboutList* _tmp1_;
		gchar* _tmp2_ = NULL;
		gboolean _tmp3_;
		_tmp1_ = self->priv->about_list;
		_tmp3_ = overlayed_list_handle_copy_text ((OverlayedList*) _tmp1_, &_tmp2_);
		_g_free0 (_vala_copy_text);
		_vala_copy_text = _tmp2_;
		result = _tmp3_;
		if (copy_text) {
			*copy_text = _vala_copy_text;
		} else {
			_g_free0 (_vala_copy_text);
		}
		return result;
	} else {
		gchar* _tmp4_ = NULL;
		gboolean _tmp5_;
		_tmp5_ = base_window_no_copy_text (&_tmp4_);
		_g_free0 (_vala_copy_text);
		_vala_copy_text = _tmp4_;
		result = _tmp5_;
		if (copy_text) {
			*copy_text = _vala_copy_text;
		} else {
			_g_free0 (_vala_copy_text);
		}
		return result;
	}
}

gboolean
base_view_handle_copy_text (BaseView* self,
                            gchar** copy_text)
{
	BaseViewClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = BASE_VIEW_GET_CLASS (self);
	if (_klass_->handle_copy_text) {
		return _klass_->handle_copy_text (self, copy_text);
	}
	return FALSE;
}

static void
base_view_real_close_popovers (BaseView* self)
{
}

void
base_view_close_popovers (BaseView* self)
{
	BaseViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BASE_VIEW_GET_CLASS (self);
	if (_klass_->close_popovers) {
		_klass_->close_popovers (self);
	}
}

static void
base_view_real_set_window_size (BaseView* self,
                                AdaptativeWidgetWindowSize new_size)
{
	base_view_set_saved_window_size (self, new_size);
	if (self->priv->about_list_created) {
		AboutList* _tmp0_;
		_tmp0_ = self->priv->about_list;
		adaptative_widget_set_window_size ((AdaptativeWidget*) _tmp0_, new_size);
	}
	if (self->priv->notifications_revealer_created) {
		NotificationsRevealer* _tmp1_;
		_tmp1_ = self->priv->notifications_revealer;
		adaptative_widget_set_window_size ((AdaptativeWidget*) _tmp1_, new_size);
	}
}

void
base_view_set_window_size (BaseView* self,
                           AdaptativeWidgetWindowSize new_size)
{
	BaseViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BASE_VIEW_GET_CLASS (self);
	if (_klass_->set_window_size) {
		_klass_->set_window_size (self, new_size);
	}
}

static void
base_view_real_show_default_view (BaseView* self)
{
	gboolean _tmp0_;
	_tmp0_ = self->priv->_in_window_about;
	if (_tmp0_) {
		GtkOverlay* _tmp1_;
		base_view_set_in_window_about (self, FALSE);
		_tmp1_ = self->priv->notifications_overlay;
		gtk_stack_set_visible_child ((GtkStack*) self, (GtkWidget*) _tmp1_);
	} else {
		g_assert_not_reached ();
	}
}

void
base_view_show_default_view (BaseView* self)
{
	BaseViewClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BASE_VIEW_GET_CLASS (self);
	if (_klass_->show_default_view) {
		_klass_->show_default_view (self);
	}
}

static gboolean
base_view_real_is_in_in_window_mode (BaseView* self)
{
	gboolean _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_in_window_about;
	result = _tmp0_;
	return result;
}

gboolean
base_view_is_in_in_window_mode (BaseView* self)
{
	BaseViewClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = BASE_VIEW_GET_CLASS (self);
	if (_klass_->is_in_in_window_mode) {
		return _klass_->is_in_in_window_mode (self);
	}
	return FALSE;
}

void
base_view_create_about_list (BaseView* self,
                             gchar*** artists,
                             gint* artists_length1,
                             gchar*** authors,
                             gint* authors_length1,
                             gchar** comments,
                             gchar** copyright,
                             gchar*** documenters,
                             gint* documenters_length1,
                             gchar** logo_icon_name,
                             gchar** program_name,
                             gchar** translator_credits,
                             gchar** version,
                             gchar** website,
                             gchar** website_label)
{
	AboutList* _tmp0_;
	AboutList* _tmp1_;
	AdaptativeWidgetWindowSize _tmp2_;
	AboutList* _tmp3_;
	AboutList* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (*comments != NULL);
	g_return_if_fail (*copyright != NULL);
	g_return_if_fail (*logo_icon_name != NULL);
	g_return_if_fail (*program_name != NULL);
	g_return_if_fail (*translator_credits != NULL);
	g_return_if_fail (*version != NULL);
	g_return_if_fail (*website != NULL);
	g_return_if_fail (*website_label != NULL);
	_tmp0_ = about_list_new (FALSE, TRUE, artists, artists_length1, authors, authors_length1, comments, copyright, documenters, documenters_length1, logo_icon_name, program_name, translator_credits, version, website, website_label);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->about_list);
	self->priv->about_list = _tmp0_;
	_tmp1_ = self->priv->about_list;
	_tmp2_ = self->priv->_saved_window_size;
	adaptative_widget_set_window_size ((AdaptativeWidget*) _tmp1_, _tmp2_);
	_tmp3_ = self->priv->about_list;
	gtk_widget_show ((GtkWidget*) _tmp3_);
	_tmp4_ = self->priv->about_list;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp4_);
	self->priv->about_list_created = TRUE;
}

void
base_view_show_about_view (BaseView* self)
{
	gboolean _tmp0_;
	AboutList* _tmp1_;
	AboutList* _tmp2_;
	g_return_if_fail (self != NULL);
	_vala_return_if_fail (self->priv->about_list_created == TRUE, "about_list_created == true");
	_tmp0_ = self->priv->_in_window_about;
	_vala_return_if_fail (_tmp0_ == FALSE, "in_window_about == false");
	_tmp1_ = self->priv->about_list;
	overlayed_list_reset ((OverlayedList*) _tmp1_);
	_tmp2_ = self->priv->about_list;
	gtk_stack_set_visible_child ((GtkStack*) self, (GtkWidget*) _tmp2_);
	base_view_set_in_window_about (self, TRUE);
}

static void
base_view_create_notifications_revealer (BaseView* self)
{
	NotificationsRevealer* _tmp0_;
	NotificationsRevealer* _tmp1_;
	AdaptativeWidgetWindowSize _tmp2_;
	NotificationsRevealer* _tmp3_;
	GtkOverlay* _tmp4_;
	NotificationsRevealer* _tmp5_;
	GtkOverlay* _tmp6_;
	NotificationsRevealer* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = notifications_revealer_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->notifications_revealer);
	self->priv->notifications_revealer = _tmp0_;
	_tmp1_ = self->priv->notifications_revealer;
	_tmp2_ = self->priv->_saved_window_size;
	adaptative_widget_set_window_size ((AdaptativeWidget*) _tmp1_, _tmp2_);
	_tmp3_ = self->priv->notifications_revealer;
	gtk_widget_show ((GtkWidget*) _tmp3_);
	_tmp4_ = self->priv->notifications_overlay;
	_tmp5_ = self->priv->notifications_revealer;
	gtk_overlay_add_overlay (_tmp4_, (GtkWidget*) _tmp5_);
	_tmp6_ = self->priv->notifications_overlay;
	_tmp7_ = self->priv->notifications_revealer;
	gtk_overlay_set_overlay_pass_through (_tmp6_, (GtkWidget*) _tmp7_, TRUE);
	self->priv->notifications_revealer_created = TRUE;
}

void
base_view_show_notification (BaseView* self,
                             const gchar* notification)
{
	NotificationsRevealer* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (notification != NULL);
	if (!self->priv->notifications_revealer_created) {
		base_view_create_notifications_revealer (self);
	}
	_tmp0_ = self->priv->notifications_revealer;
	notifications_revealer_show_notification (_tmp0_, notification);
}

void
base_view_hide_notification (BaseView* self)
{
	NotificationsRevealer* _tmp0_;
	g_return_if_fail (self != NULL);
	if (!self->priv->notifications_revealer_created) {
		return;
	}
	_tmp0_ = self->priv->notifications_revealer;
	notifications_revealer_hide_notification (_tmp0_);
}

BaseView*
base_view_construct (GType object_type)
{
	BaseView * self = NULL;
	self = (BaseView*) g_object_new (object_type, NULL);
	return self;
}

BaseView*
base_view_new (void)
{
	return base_view_construct (TYPE_BASE_VIEW);
}

AdaptativeWidgetWindowSize
base_view_get_saved_window_size (BaseView* self)
{
	AdaptativeWidgetWindowSize result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_saved_window_size;
	return result;
}

static void
base_view_set_saved_window_size (BaseView* self,
                                 AdaptativeWidgetWindowSize value)
{
	AdaptativeWidgetWindowSize old_value;
	g_return_if_fail (self != NULL);
	old_value = base_view_get_saved_window_size (self);
	if (old_value != value) {
		self->priv->_saved_window_size = value;
		g_object_notify_by_pspec ((GObject *) self, base_view_properties[BASE_VIEW_SAVED_WINDOW_SIZE_PROPERTY]);
	}
}

gboolean
base_view_get_in_window_about (BaseView* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_in_window_about;
	return result;
}

static void
base_view_set_in_window_about (BaseView* self,
                               gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = base_view_get_in_window_about (self);
	if (old_value != value) {
		self->priv->_in_window_about = value;
		g_object_notify_by_pspec ((GObject *) self, base_view_properties[BASE_VIEW_IN_WINDOW_ABOUT_PROPERTY]);
	}
}

static void
base_view_class_init (BaseViewClass * klass,
                      gpointer klass_data)
{
	base_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BaseView_private_offset);
	((BaseViewClass *) klass)->handle_copy_text = (gboolean (*) (BaseView*, gchar**)) base_view_real_handle_copy_text;
	((BaseViewClass *) klass)->close_popovers = (void (*) (BaseView*)) base_view_real_close_popovers;
	((BaseViewClass *) klass)->set_window_size = (void (*) (BaseView*, AdaptativeWidgetWindowSize)) base_view_real_set_window_size;
	((BaseViewClass *) klass)->show_default_view = (void (*) (BaseView*)) base_view_real_show_default_view;
	((BaseViewClass *) klass)->is_in_in_window_mode = (gboolean (*) (BaseView*)) base_view_real_is_in_in_window_mode;
	G_OBJECT_CLASS (klass)->get_property = _vala_base_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_base_view_set_property;
	G_OBJECT_CLASS (klass)->finalize = base_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BASE_VIEW_SAVED_WINDOW_SIZE_PROPERTY, base_view_properties[BASE_VIEW_SAVED_WINDOW_SIZE_PROPERTY] = g_param_spec_enum ("saved-window-size", "saved-window-size", "saved-window-size", ADAPTATIVE_WIDGET_TYPE_WINDOW_SIZE, ADAPTATIVE_WIDGET_WINDOW_SIZE_START_SIZE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BASE_VIEW_IN_WINDOW_ABOUT_PROPERTY, base_view_properties[BASE_VIEW_IN_WINDOW_ABOUT_PROPERTY] = g_param_spec_boolean ("in-window-about", "in-window-about", "in-window-about", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Taquin/ui/base-view.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "main_grid", FALSE, G_STRUCT_OFFSET (BaseView, main_grid));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "notifications_overlay", FALSE, BaseView_private_offset + G_STRUCT_OFFSET (BaseViewPrivate, notifications_overlay));
}

static void
base_view_adaptative_widget_interface_init (AdaptativeWidgetIface * iface,
                                            gpointer iface_data)
{
	base_view_adaptative_widget_parent_iface = g_type_interface_peek_parent (iface);
	iface->set_window_size = (void (*) (AdaptativeWidget*, AdaptativeWidgetWindowSize)) base_view_set_window_size;
}

static void
base_view_instance_init (BaseView * self,
                         gpointer klass)
{
	self->priv = base_view_get_instance_private (self);
	self->priv->_saved_window_size = ADAPTATIVE_WIDGET_WINDOW_SIZE_START_SIZE;
	self->priv->_in_window_about = FALSE;
	self->priv->about_list_created = FALSE;
	self->priv->notifications_revealer_created = FALSE;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
base_view_finalize (GObject * obj)
{
	BaseView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BASE_VIEW, BaseView);
	_g_object_unref0 (self->priv->about_list);
	_g_object_unref0 (self->priv->notifications_revealer);
	G_OBJECT_CLASS (base_view_parent_class)->finalize (obj);
}

static GType
base_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BaseViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) base_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BaseView), 0, (GInstanceInitFunc) base_view_instance_init, NULL };
	static const GInterfaceInfo adaptative_widget_info = { (GInterfaceInitFunc) base_view_adaptative_widget_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType base_view_type_id;
	base_view_type_id = g_type_register_static (gtk_stack_get_type (), "BaseView", &g_define_type_info, 0);
	g_type_add_interface_static (base_view_type_id, TYPE_ADAPTATIVE_WIDGET, &adaptative_widget_info);
	BaseView_private_offset = g_type_add_instance_private (base_view_type_id, sizeof (BaseViewPrivate));
	return base_view_type_id;
}

GType
base_view_get_type (void)
{
	static volatile gsize base_view_type_id__once = 0;
	if (g_once_init_enter (&base_view_type_id__once)) {
		GType base_view_type_id;
		base_view_type_id = base_view_get_type_once ();
		g_once_init_leave (&base_view_type_id__once, base_view_type_id);
	}
	return base_view_type_id__once;
}

static void
_vala_base_view_get_property (GObject * object,
                              guint property_id,
                              GValue * value,
                              GParamSpec * pspec)
{
	BaseView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_BASE_VIEW, BaseView);
	switch (property_id) {
		case BASE_VIEW_SAVED_WINDOW_SIZE_PROPERTY:
		g_value_set_enum (value, base_view_get_saved_window_size (self));
		break;
		case BASE_VIEW_IN_WINDOW_ABOUT_PROPERTY:
		g_value_set_boolean (value, base_view_get_in_window_about (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_base_view_set_property (GObject * object,
                              guint property_id,
                              const GValue * value,
                              GParamSpec * pspec)
{
	BaseView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_BASE_VIEW, BaseView);
	switch (property_id) {
		case BASE_VIEW_SAVED_WINDOW_SIZE_PROPERTY:
		base_view_set_saved_window_size (self, g_value_get_enum (value));
		break;
		case BASE_VIEW_IN_WINDOW_ABOUT_PROPERTY:
		base_view_set_in_window_about (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

