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

#include <adwaita.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <float.h>
#include <math.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 TUBA_VIEWS_TYPE_BASE (tuba_views_base_get_type ())
#define TUBA_VIEWS_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_BASE, TubaViewsBase))
#define TUBA_VIEWS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_BASE, TubaViewsBaseClass))
#define TUBA_VIEWS_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_BASE))
#define TUBA_VIEWS_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_BASE))
#define TUBA_VIEWS_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_BASE, TubaViewsBaseClass))

typedef struct _TubaViewsBase TubaViewsBase;
typedef struct _TubaViewsBaseClass TubaViewsBaseClass;
typedef struct _TubaViewsBasePrivate TubaViewsBasePrivate;

#define TUBA_VIEWS_TYPE_TABBED_BASE (tuba_views_tabbed_base_get_type ())
#define TUBA_VIEWS_TABBED_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBase))
#define TUBA_VIEWS_TABBED_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBaseClass))
#define TUBA_VIEWS_IS_TABBED_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_TABBED_BASE))
#define TUBA_VIEWS_IS_TABBED_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_TABBED_BASE))
#define TUBA_VIEWS_TABBED_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBaseClass))

typedef struct _TubaViewsTabbedBase TubaViewsTabbedBase;
typedef struct _TubaViewsTabbedBaseClass TubaViewsTabbedBaseClass;
typedef struct _TubaViewsTabbedBasePrivate TubaViewsTabbedBasePrivate;
enum  {
	TUBA_VIEWS_TABBED_BASE_0_PROPERTY,
	TUBA_VIEWS_TABBED_BASE_TITLE_STACK_PAGE_VISIBLE_PROPERTY,
	TUBA_VIEWS_TABBED_BASE_NUM_PROPERTIES
};
static GParamSpec* tuba_views_tabbed_base_properties[TUBA_VIEWS_TABBED_BASE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)))
#define _adw_breakpoint_condition_free0(var) ((var == NULL) ? NULL : (var = (adw_breakpoint_condition_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_VIEWS_TYPE_CONTENT_BASE (tuba_views_content_base_get_type ())
#define TUBA_VIEWS_CONTENT_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBase))
#define TUBA_VIEWS_CONTENT_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBaseClass))
#define TUBA_VIEWS_IS_CONTENT_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE))
#define TUBA_VIEWS_IS_CONTENT_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_CONTENT_BASE))
#define TUBA_VIEWS_CONTENT_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBaseClass))

typedef struct _TubaViewsContentBase TubaViewsContentBase;
typedef struct _TubaViewsContentBaseClass TubaViewsContentBaseClass;

#define TUBA_VIEWS_TYPE_TIMELINE (tuba_views_timeline_get_type ())
#define TUBA_VIEWS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline))
#define TUBA_VIEWS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimelineClass))
#define TUBA_VIEWS_IS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_TIMELINE))
#define TUBA_VIEWS_IS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_TIMELINE))
#define TUBA_VIEWS_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimelineClass))

typedef struct _TubaViewsTimeline TubaViewsTimeline;
typedef struct _TubaViewsTimelineClass TubaViewsTimelineClass;

#define TUBA_VIEWS_TYPE_ACCOUNTS (tuba_views_accounts_get_type ())
#define TUBA_VIEWS_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_ACCOUNTS, TubaViewsAccounts))
#define TUBA_VIEWS_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_ACCOUNTS, TubaViewsAccountsClass))
#define TUBA_VIEWS_IS_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_ACCOUNTS))
#define TUBA_VIEWS_IS_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_ACCOUNTS))
#define TUBA_VIEWS_ACCOUNTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_ACCOUNTS, TubaViewsAccountsClass))

typedef struct _TubaViewsAccounts TubaViewsAccounts;
typedef struct _TubaViewsAccountsClass TubaViewsAccountsClass;
typedef void (*TubaViewsTabbedBaseTabCB) (TubaViewsContentBase* tab, gpointer user_data);

#define TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE (tuba_views_base_status_message_get_type ())
#define TUBA_VIEWS_BASE_STATUS_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE, TubaViewsBaseStatusMessage))
#define TUBA_VIEWS_BASE_STATUS_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE, TubaViewsBaseStatusMessageClass))
#define TUBA_VIEWS_BASE_IS_STATUS_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE))
#define TUBA_VIEWS_BASE_IS_STATUS_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE))
#define TUBA_VIEWS_BASE_STATUS_MESSAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE, TubaViewsBaseStatusMessageClass))

typedef struct _TubaViewsBaseStatusMessage TubaViewsBaseStatusMessage;
typedef struct _TubaViewsBaseStatusMessageClass TubaViewsBaseStatusMessageClass;

struct _TubaViewsBase {
	AdwBreakpointBin parent_instance;
	TubaViewsBasePrivate * priv;
	AdwHeaderBar* header;
	AdwToolbarView* toolbar_view;
	GtkScrolledWindow* scrolled;
	GtkOverlay* scrolled_overlay;
	GtkRevealer* scroll_to_top_rev;
	GtkButton* scroll_to_top;
	GtkStack* states;
	AdwClamp* content_box;
	GtkButton* status_button;
};

struct _TubaViewsBaseClass {
	AdwBreakpointBinClass parent_class;
	void (*scroll_page) (TubaViewsBase* self, gboolean up);
	void (*unbind_listboxes) (TubaViewsBase* self);
	void (*build_actions) (TubaViewsBase* self);
	void (*build_header) (TubaViewsBase* self);
	void (*clear) (TubaViewsBase* self);
	void (*on_shown) (TubaViewsBase* self);
	void (*on_hidden) (TubaViewsBase* self);
	void (*on_content_changed) (TubaViewsBase* self);
	void (*on_error) (TubaViewsBase* self, gint32 code, const gchar* reason);
};

struct _TubaViewsTabbedBase {
	TubaViewsBase parent_instance;
	TubaViewsTabbedBasePrivate * priv;
	AdwViewSwitcher* switcher;
	AdwViewSwitcherBar* switcher_bar;
	AdwViewStack* stack;
	GtkStack* title_stack;
};

struct _TubaViewsTabbedBaseClass {
	TubaViewsBaseClass parent_class;
	void (*change_tab_alt) (TubaViewsTabbedBase* self, gint id);
	void (*on_view_switched) (TubaViewsTabbedBase* self);
	gboolean (*get_title_stack_page_visible) (TubaViewsTabbedBase* self);
	void (*set_title_stack_page_visible) (TubaViewsTabbedBase* self, gboolean value);
};

struct _TubaViewsTabbedBasePrivate {
	gint id_counter;
	TubaViewsBase* last_view;
	TubaViewsBase** views;
	gint views_length1;
	gint _views_size_;
};

static gint TubaViewsTabbedBase_private_offset;
static gpointer tuba_views_tabbed_base_parent_class = NULL;

VALA_EXTERN GType tuba_views_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsBase, g_object_unref)
VALA_EXTERN GType tuba_views_tabbed_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsTabbedBase, g_object_unref)
VALA_EXTERN void tuba_views_base_unbind_listboxes (TubaViewsBase* self);
VALA_EXTERN void tuba_views_base_build_header (TubaViewsBase* self);
VALA_EXTERN void tuba_views_tabbed_base_change_tab_alt (TubaViewsTabbedBase* self,
                                            gint id);
VALA_EXTERN void tuba_views_base_clear (TubaViewsBase* self);
VALA_EXTERN void tuba_views_base_on_content_changed (TubaViewsBase* self);
VALA_EXTERN void tuba_views_base_scroll_page (TubaViewsBase* self,
                                  gboolean up);
VALA_EXTERN void tuba_views_tabbed_base_on_view_switched (TubaViewsTabbedBase* self);
VALA_EXTERN gboolean tuba_views_tabbed_base_get_title_stack_page_visible (TubaViewsTabbedBase* self);
VALA_EXTERN void tuba_views_tabbed_base_set_title_stack_page_visible (TubaViewsTabbedBase* self,
                                                          gboolean value);
VALA_EXTERN void tuba_views_tabbed_base_change_page_to_named (TubaViewsTabbedBase* self,
                                                  const gchar* page_name);
static void tuba_views_tabbed_base_real_unbind_listboxes (TubaViewsBase* base);
static void tuba_views_tabbed_base_real_build_header (TubaViewsBase* base);
VALA_EXTERN const gchar* tuba_views_base_get_label (TubaViewsBase* self);
VALA_EXTERN void tuba_views_base_set_small (TubaViewsBase* self,
                                gboolean value);
static void _vala_GValue_free (GValue* self);
VALA_EXTERN void tuba_views_tabbed_base_add_tab (TubaViewsTabbedBase* self,
                                     TubaViewsBase* view);
static void _vala_array_add113 (TubaViewsBase** * array,
                         gint* length,
                         gint* size,
                         TubaViewsBase* value);
static void tuba_views_tabbed_base_change_tab_cb (TubaViewsTabbedBase* self,
                                           const gchar* name,
                                           GVariant* parameter);
static void tuba_views_tabbed_base_real_change_tab_alt (TubaViewsTabbedBase* self,
                                                 gint id);
VALA_EXTERN GType tuba_views_content_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsContentBase, g_object_unref)
VALA_EXTERN TubaViewsContentBase* tuba_views_tabbed_base_add_list_tab (TubaViewsTabbedBase* self,
                                                           const gchar* label,
                                                           const gchar* icon,
                                                           const gchar* empty_state_title);
VALA_EXTERN TubaViewsContentBase* tuba_views_content_base_new (void);
VALA_EXTERN TubaViewsContentBase* tuba_views_content_base_construct (GType object_type);
VALA_EXTERN void tuba_views_base_set_label (TubaViewsBase* self,
                                const gchar* value);
VALA_EXTERN void tuba_views_base_set_icon (TubaViewsBase* self,
                               const gchar* value);
VALA_EXTERN void tuba_views_base_set_empty_state_title (TubaViewsBase* self,
                                            const gchar* value);
VALA_EXTERN TubaViewsContentBase* tuba_views_tabbed_base_add_timeline_tab (TubaViewsTabbedBase* self,
                                                               const gchar* label,
                                                               const gchar* icon,
                                                               const gchar* url,
                                                               GType accepts,
                                                               const gchar* empty_state_title,
                                                               const gchar* empty_state_icon,
                                                               gboolean use_rows);
VALA_EXTERN GType tuba_views_timeline_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsTimeline, g_object_unref)
VALA_EXTERN GType tuba_views_accounts_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsAccounts, g_object_unref)
VALA_EXTERN TubaViewsAccounts* tuba_views_accounts_new_prefilled (const gchar* url,
                                                      const gchar* label,
                                                      const gchar* icon,
                                                      gboolean use_rows);
VALA_EXTERN TubaViewsAccounts* tuba_views_accounts_construct_prefilled (GType object_type,
                                                            const gchar* url,
                                                            const gchar* label,
                                                            const gchar* icon,
                                                            gboolean use_rows);
VALA_EXTERN void tuba_views_timeline_set_accepts (TubaViewsTimeline* self,
                                      GType value);
VALA_EXTERN void tuba_views_base_set_empty_timeline_icon (TubaViewsBase* self,
                                              const gchar* value);
VALA_EXTERN void tuba_views_tabbed_base_foreach_tab (TubaViewsTabbedBase* self,
                                         TubaViewsTabbedBaseTabCB cb,
                                         gpointer cb_target);
static void tuba_views_tabbed_base_real_clear (TubaViewsBase* base);
static void __lambda120_ (TubaViewsTabbedBase* self,
                   TubaViewsContentBase* tab);
static void ___lambda120__tuba_views_tabbed_base_tab_cb (TubaViewsContentBase* tab,
                                                  gpointer self);
static void tuba_views_tabbed_base_real_on_content_changed (TubaViewsBase* base);
static void __lambda121_ (TubaViewsTabbedBase* self,
                   TubaViewsContentBase* tab);
static void ___lambda121__tuba_views_tabbed_base_tab_cb (TubaViewsContentBase* tab,
                                                  gpointer self);
VALA_EXTERN GType tuba_views_base_status_message_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsBaseStatusMessage, g_object_unref)
VALA_EXTERN void tuba_views_base_set_base_status (TubaViewsBase* self,
                                      TubaViewsBaseStatusMessage* value);
static void tuba_views_tabbed_base_real_scroll_page (TubaViewsBase* base,
                                              gboolean up);
static void tuba_views_tabbed_base_real_on_view_switched (TubaViewsTabbedBase* self);
VALA_EXTERN void tuba_views_base_set_current (TubaViewsBase* self,
                                  gboolean value);
VALA_EXTERN TubaViewsTabbedBase* tuba_views_tabbed_base_new (void);
VALA_EXTERN TubaViewsTabbedBase* tuba_views_tabbed_base_construct (GType object_type);
VALA_EXTERN TubaViewsBase* tuba_views_base_new (void);
VALA_EXTERN TubaViewsBase* tuba_views_base_construct (GType object_type);
static GObject * tuba_views_tabbed_base_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties);
static void _tuba_views_tabbed_base_on_view_switched_g_object_notify (GObject* _sender,
                                                               GParamSpec* pspec,
                                                               gpointer self);
static void tuba_views_tabbed_base_finalize (GObject * obj);
static GType tuba_views_tabbed_base_get_type_once (void);
static void _vala_tuba_views_tabbed_base_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_tuba_views_tabbed_base_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
tuba_views_tabbed_base_get_instance_private (TubaViewsTabbedBase* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsTabbedBase_private_offset);
}

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

void
tuba_views_tabbed_base_change_page_to_named (TubaViewsTabbedBase* self,
                                             const gchar* page_name)
{
	AdwViewStack* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (page_name != NULL);
	_tmp0_ = self->stack;
	adw_view_stack_set_visible_child_name (_tmp0_, page_name);
}

static void
tuba_views_tabbed_base_real_unbind_listboxes (TubaViewsBase* base)
{
	TubaViewsTabbedBase * self;
	TubaViewsBase** _tmp0_;
	gint _tmp0__length1;
	self = (TubaViewsTabbedBase*) base;
	_tmp0_ = self->priv->views;
	_tmp0__length1 = self->priv->views_length1;
	{
		TubaViewsBase** tab_collection = NULL;
		gint tab_collection_length1 = 0;
		gint _tab_collection_size_ = 0;
		gint tab_it = 0;
		tab_collection = _tmp0_;
		tab_collection_length1 = _tmp0__length1;
		for (tab_it = 0; tab_it < tab_collection_length1; tab_it = tab_it + 1) {
			TubaViewsBase* _tmp1_;
			TubaViewsBase* tab = NULL;
			_tmp1_ = _g_object_ref0 (tab_collection[tab_it]);
			tab = _tmp1_;
			{
				TubaViewsBase* _tmp2_;
				_tmp2_ = tab;
				tuba_views_base_unbind_listboxes (_tmp2_);
				_g_object_unref0 (tab);
			}
		}
	}
	TUBA_VIEWS_BASE_CLASS (tuba_views_tabbed_base_parent_class)->unbind_listboxes (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_BASE, TubaViewsBase));
}

static void
_vala_GValue_free (GValue* self)
{
	g_boxed_free (G_TYPE_VALUE, self);
}

static void
tuba_views_tabbed_base_real_build_header (TubaViewsBase* base)
{
	TubaViewsTabbedBase * self;
	GtkStack* _tmp0_ = NULL;
	AdwHeaderBar* _tmp1_;
	GtkStack* _tmp2_;
	AdwViewSwitcher* _tmp3_ = NULL;
	GtkStack* _tmp4_;
	AdwViewSwitcher* _tmp5_;
	AdwViewSwitcherBar* _tmp6_;
	AdwToolbarView* _tmp7_;
	AdwViewSwitcherBar* _tmp8_;
	AdwWindowTitle* title_header = NULL;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	AdwWindowTitle* _tmp11_;
	AdwWindowTitle* _tmp12_;
	GtkStack* _tmp13_;
	AdwWindowTitle* _tmp14_;
	AdwBreakpointCondition* condition = NULL;
	AdwBreakpointCondition* _tmp15_;
	AdwBreakpoint* _tmp16_;
	AdwBreakpoint* _tmp17_;
	AdwBreakpoint* breakpoint = NULL;
	AdwBreakpointCondition* _tmp20_;
	AdwBreakpoint* _tmp21_;
	GValue* _tmp22_ = NULL;
	AdwViewSwitcherBar* _tmp23_;
	GValue* _tmp24_ = NULL;
	AdwBreakpoint* _tmp25_;
	self = (TubaViewsTabbedBase*) base;
	_tmp0_ = (GtkStack*) gtk_stack_new ();
	gtk_stack_set_hhomogeneous (_tmp0_, FALSE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->title_stack);
	self->title_stack = _tmp0_;
	_tmp1_ = ((TubaViewsBase*) self)->header;
	_tmp2_ = self->title_stack;
	adw_header_bar_set_title_widget (_tmp1_, (GtkWidget*) _tmp2_);
	_tmp3_ = (AdwViewSwitcher*) adw_view_switcher_new ();
	adw_view_switcher_set_policy (_tmp3_, ADW_VIEW_SWITCHER_POLICY_WIDE);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->switcher);
	self->switcher = _tmp3_;
	_tmp4_ = self->title_stack;
	_tmp5_ = self->switcher;
	gtk_stack_add_named (_tmp4_, (GtkWidget*) _tmp5_, "switcher");
	_tmp6_ = (AdwViewSwitcherBar*) adw_view_switcher_bar_new ();
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->switcher_bar);
	self->switcher_bar = _tmp6_;
	_tmp7_ = ((TubaViewsBase*) self)->toolbar_view;
	_tmp8_ = self->switcher_bar;
	adw_toolbar_view_add_bottom_bar (_tmp7_, (GtkWidget*) _tmp8_);
	_tmp9_ = tuba_views_base_get_label ((TubaViewsBase*) self);
	_tmp10_ = _tmp9_;
	_tmp11_ = (AdwWindowTitle*) adw_window_title_new (_tmp10_, "");
	g_object_ref_sink (_tmp11_);
	title_header = _tmp11_;
	_tmp12_ = title_header;
	g_object_bind_property_with_closures ((GObject*) self, "label", (GObject*) _tmp12_, "title", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp13_ = self->title_stack;
	_tmp14_ = title_header;
	gtk_stack_add_named (_tmp13_, (GtkWidget*) _tmp14_, "title");
	tuba_views_tabbed_base_set_title_stack_page_visible (self, FALSE);
	_tmp15_ = adw_breakpoint_condition_new_length (ADW_BREAKPOINT_CONDITION_MAX_WIDTH, (gdouble) 550, ADW_LENGTH_UNIT_SP);
	condition = _tmp15_;
	_tmp16_ = adw_breakpoint_bin_get_current_breakpoint ((AdwBreakpointBin*) self);
	_tmp17_ = _tmp16_;
	if (_tmp17_ != NULL) {
		AdwBreakpoint* _tmp18_;
		AdwBreakpoint* _tmp19_;
		_tmp18_ = adw_breakpoint_bin_get_current_breakpoint ((AdwBreakpointBin*) self);
		_tmp19_ = _tmp18_;
		adw_breakpoint_bin_remove_breakpoint ((AdwBreakpointBin*) self, _tmp19_);
	}
	tuba_views_base_set_small ((TubaViewsBase*) self, TRUE);
	_tmp20_ = condition;
	condition = NULL;
	_tmp21_ = adw_breakpoint_new (_tmp20_);
	breakpoint = _tmp21_;
	_tmp22_ = g_new0 (GValue, 1);
	g_value_init (_tmp22_, G_TYPE_BOOLEAN);
	g_value_set_boolean (_tmp22_, TRUE);
	adw_breakpoint_add_setter (breakpoint, (GObject*) self, "title-stack-page-visible", _tmp22_);
	__vala_GValue_free0 (_tmp22_);
	_tmp23_ = self->switcher_bar;
	_tmp24_ = g_new0 (GValue, 1);
	g_value_init (_tmp24_, G_TYPE_BOOLEAN);
	g_value_set_boolean (_tmp24_, TRUE);
	adw_breakpoint_add_setter (breakpoint, (GObject*) _tmp23_, "reveal", _tmp24_);
	__vala_GValue_free0 (_tmp24_);
	_tmp25_ = _g_object_ref0 (breakpoint);
	adw_breakpoint_bin_add_breakpoint ((AdwBreakpointBin*) self, _tmp25_);
	_g_object_unref0 (breakpoint);
	_adw_breakpoint_condition_free0 (condition);
	_g_object_unref0 (title_header);
}

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

void
tuba_views_tabbed_base_add_tab (TubaViewsTabbedBase* self,
                                TubaViewsBase* view)
{
	gint _tmp0_;
	TubaViewsBase* _tmp1_;
	AdwViewStackPage* page = NULL;
	AdwViewStack* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	AdwViewStackPage* _tmp7_;
	AdwViewStackPage* _tmp8_;
	AdwViewStackPage* _tmp9_;
	AdwHeaderBar* _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (view != NULL);
	_tmp0_ = self->priv->id_counter;
	self->priv->id_counter = _tmp0_ + 1;
	_tmp1_ = _g_object_ref0 (view);
	_vala_array_add113 (&self->priv->views, &self->priv->views_length1, &self->priv->_views_size_, _tmp1_);
	_tmp2_ = self->stack;
	_tmp3_ = g_strdup_printf ("%i", self->priv->id_counter);
	_tmp4_ = _tmp3_;
	_tmp5_ = tuba_views_base_get_label (view);
	_tmp6_ = _tmp5_;
	_tmp7_ = adw_view_stack_add_titled (_tmp2_, (GtkWidget*) view, _tmp4_, _tmp6_);
	_tmp8_ = _g_object_ref0 (_tmp7_);
	_tmp9_ = _tmp8_;
	_g_free0 (_tmp4_);
	page = _tmp9_;
	g_object_bind_property_with_closures ((GObject*) view, "icon", (GObject*) page, "icon-name", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	g_object_bind_property_with_closures ((GObject*) view, "needs-attention", (GObject*) page, "needs-attention", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	g_object_bind_property_with_closures ((GObject*) view, "badge-number", (GObject*) page, "badge-number", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp10_ = view->header;
	gtk_widget_hide ((GtkWidget*) _tmp10_);
	_g_object_unref0 (page);
}

static void
tuba_views_tabbed_base_change_tab_cb (TubaViewsTabbedBase* self,
                                      const gchar* name,
                                      GVariant* parameter)
{
	gint page_id = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	if (parameter == NULL) {
		return;
	}
	page_id = (gint) g_variant_get_int32 (parameter);
	if (page_id > self->priv->id_counter) {
		return;
	}
	tuba_views_tabbed_base_change_tab_alt (self, page_id);
}

static void
tuba_views_tabbed_base_real_change_tab_alt (TubaViewsTabbedBase* self,
                                            gint id)
{
	AdwViewStack* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	_tmp0_ = self->stack;
	_tmp1_ = g_strdup_printf ("%i", id);
	_tmp2_ = _tmp1_;
	adw_view_stack_set_visible_child_name (_tmp0_, _tmp2_);
	_g_free0 (_tmp2_);
}

void
tuba_views_tabbed_base_change_tab_alt (TubaViewsTabbedBase* self,
                                       gint id)
{
	TubaViewsTabbedBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_VIEWS_TABBED_BASE_GET_CLASS (self);
	if (_klass_->change_tab_alt) {
		_klass_->change_tab_alt (self, id);
	}
}

TubaViewsContentBase*
tuba_views_tabbed_base_add_list_tab (TubaViewsTabbedBase* self,
                                     const gchar* label,
                                     const gchar* icon,
                                     const gchar* empty_state_title)
{
	TubaViewsContentBase* tab = NULL;
	TubaViewsContentBase* _tmp0_;
	TubaViewsContentBase* _tmp1_;
	TubaViewsContentBase* _tmp2_;
	TubaViewsContentBase* _tmp4_;
	TubaViewsContentBase* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (label != NULL, NULL);
	g_return_val_if_fail (icon != NULL, NULL);
	_tmp0_ = tuba_views_content_base_new ();
	g_object_ref_sink (_tmp0_);
	tab = _tmp0_;
	_tmp1_ = tab;
	tuba_views_base_set_label ((TubaViewsBase*) _tmp1_, label);
	_tmp2_ = tab;
	tuba_views_base_set_icon ((TubaViewsBase*) _tmp2_, icon);
	if (empty_state_title != NULL) {
		TubaViewsContentBase* _tmp3_;
		_tmp3_ = tab;
		tuba_views_base_set_empty_state_title ((TubaViewsBase*) _tmp3_, empty_state_title);
	}
	_tmp4_ = tab;
	tuba_views_tabbed_base_add_tab (self, (TubaViewsBase*) _tmp4_);
	result = tab;
	return result;
}

TubaViewsContentBase*
tuba_views_tabbed_base_add_timeline_tab (TubaViewsTabbedBase* self,
                                         const gchar* label,
                                         const gchar* icon,
                                         const gchar* url,
                                         GType accepts,
                                         const gchar* empty_state_title,
                                         const gchar* empty_state_icon,
                                         gboolean use_rows)
{
	TubaViewsAccounts* tab = NULL;
	TubaViewsAccounts* _tmp0_ = NULL;
	TubaViewsAccounts* _tmp1_;
	TubaViewsAccounts* _tmp2_;
	TubaViewsAccounts* _tmp5_;
	TubaViewsContentBase* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (label != NULL, NULL);
	g_return_val_if_fail (icon != NULL, NULL);
	g_return_val_if_fail (url != NULL, NULL);
	_tmp0_ = tuba_views_accounts_new_prefilled (url, label, icon, use_rows);
	tuba_views_timeline_set_accepts ((TubaViewsTimeline*) _tmp0_, accepts);
	g_object_ref_sink (_tmp0_);
	tab = _tmp0_;
	_tmp1_ = tab;
	tuba_views_base_set_label ((TubaViewsBase*) _tmp1_, label);
	_tmp2_ = tab;
	tuba_views_base_set_icon ((TubaViewsBase*) _tmp2_, icon);
	if (empty_state_icon != NULL) {
		TubaViewsAccounts* _tmp3_;
		_tmp3_ = tab;
		tuba_views_base_set_empty_timeline_icon ((TubaViewsBase*) _tmp3_, empty_state_icon);
	}
	if (empty_state_title != NULL) {
		TubaViewsAccounts* _tmp4_;
		_tmp4_ = tab;
		tuba_views_base_set_empty_state_title ((TubaViewsBase*) _tmp4_, empty_state_title);
	}
	_tmp5_ = tab;
	tuba_views_tabbed_base_add_tab (self, (TubaViewsBase*) _tmp5_);
	result = (TubaViewsContentBase*) tab;
	return result;
}

void
tuba_views_tabbed_base_foreach_tab (TubaViewsTabbedBase* self,
                                    TubaViewsTabbedBaseTabCB cb,
                                    gpointer cb_target)
{
	GtkWidget* w = NULL;
	AdwViewStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->stack;
	_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	w = _tmp2_;
	while (TRUE) {
		GtkWidget* _tmp3_;
		TubaViewsContentBase* tab = NULL;
		GtkWidget* _tmp4_;
		TubaViewsContentBase* _tmp5_;
		TubaViewsContentBase* _tmp6_;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp10_;
		_tmp3_ = w;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = w;
		_tmp5_ = _g_object_ref0 (TUBA_VIEWS_IS_CONTENT_BASE (_tmp4_) ? ((TubaViewsContentBase*) _tmp4_) : NULL);
		tab = _tmp5_;
		_tmp6_ = tab;
		if (_tmp6_ != NULL) {
			TubaViewsContentBase* _tmp7_;
			_tmp7_ = tab;
			cb (_tmp7_, cb_target);
		}
		_tmp8_ = w;
		_tmp9_ = gtk_widget_get_next_sibling (_tmp8_);
		_tmp10_ = _g_object_ref0 (_tmp9_);
		_g_object_unref0 (w);
		w = _tmp10_;
		_g_object_unref0 (tab);
	}
	_g_object_unref0 (w);
}

static void
__lambda120_ (TubaViewsTabbedBase* self,
              TubaViewsContentBase* tab)
{
	g_return_if_fail (tab != NULL);
	tuba_views_base_clear ((TubaViewsBase*) tab);
}

static void
___lambda120__tuba_views_tabbed_base_tab_cb (TubaViewsContentBase* tab,
                                             gpointer self)
{
	__lambda120_ ((TubaViewsTabbedBase*) self, tab);
}

static void
tuba_views_tabbed_base_real_clear (TubaViewsBase* base)
{
	TubaViewsTabbedBase * self;
	self = (TubaViewsTabbedBase*) base;
	tuba_views_tabbed_base_foreach_tab (self, ___lambda120__tuba_views_tabbed_base_tab_cb, self);
	tuba_views_base_on_content_changed ((TubaViewsBase*) self);
}

static void
__lambda121_ (TubaViewsTabbedBase* self,
              TubaViewsContentBase* tab)
{
	g_return_if_fail (tab != NULL);
	tuba_views_base_on_content_changed ((TubaViewsBase*) tab);
}

static void
___lambda121__tuba_views_tabbed_base_tab_cb (TubaViewsContentBase* tab,
                                             gpointer self)
{
	__lambda121_ ((TubaViewsTabbedBase*) self, tab);
}

static void
tuba_views_tabbed_base_real_on_content_changed (TubaViewsBase* base)
{
	TubaViewsTabbedBase * self;
	self = (TubaViewsTabbedBase*) base;
	tuba_views_tabbed_base_foreach_tab (self, ___lambda121__tuba_views_tabbed_base_tab_cb, self);
	tuba_views_base_set_base_status ((TubaViewsBase*) self, NULL);
}

static void
tuba_views_tabbed_base_real_scroll_page (TubaViewsBase* base,
                                         gboolean up)
{
	TubaViewsTabbedBase * self;
	TubaViewsBase* c_scrolled = NULL;
	AdwViewStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	TubaViewsBase* _tmp3_;
	TubaViewsBase* _tmp4_;
	self = (TubaViewsTabbedBase*) base;
	_tmp0_ = self->stack;
	_tmp1_ = adw_view_stack_get_visible_child (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (TUBA_VIEWS_IS_BASE (_tmp2_) ? ((TubaViewsBase*) _tmp2_) : NULL);
	c_scrolled = _tmp3_;
	_tmp4_ = c_scrolled;
	if (_tmp4_ != NULL) {
		TubaViewsBase* _tmp5_;
		_tmp5_ = c_scrolled;
		tuba_views_base_scroll_page (_tmp5_, up);
	}
	_g_object_unref0 (c_scrolled);
}

static void
tuba_views_tabbed_base_real_on_view_switched (TubaViewsTabbedBase* self)
{
	TubaViewsBase* view = NULL;
	AdwViewStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	TubaViewsBase* _tmp3_;
	TubaViewsBase* _tmp4_;
	TubaViewsBase* _tmp6_;
	TubaViewsBase* _tmp11_;
	TubaViewsBase* _tmp12_;
	_tmp0_ = self->stack;
	_tmp1_ = adw_view_stack_get_visible_child (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (TUBA_VIEWS_IS_BASE (_tmp2_) ? ((TubaViewsBase*) _tmp2_) : NULL);
	view = _tmp3_;
	_tmp4_ = self->priv->last_view;
	if (_tmp4_ != NULL) {
		TubaViewsBase* _tmp5_;
		_tmp5_ = self->priv->last_view;
		tuba_views_base_set_current (_tmp5_, FALSE);
	}
	_tmp6_ = view;
	if (_tmp6_ != NULL) {
		TubaViewsBase* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		TubaViewsBase* _tmp10_;
		_tmp7_ = view;
		_tmp8_ = tuba_views_base_get_label (_tmp7_);
		_tmp9_ = _tmp8_;
		tuba_views_base_set_label ((TubaViewsBase*) self, _tmp9_);
		_tmp10_ = view;
		tuba_views_base_set_current (_tmp10_, TRUE);
	}
	_tmp11_ = view;
	_tmp12_ = _g_object_ref0 (_tmp11_);
	_g_object_unref0 (self->priv->last_view);
	self->priv->last_view = _tmp12_;
	_g_object_unref0 (view);
}

void
tuba_views_tabbed_base_on_view_switched (TubaViewsTabbedBase* self)
{
	TubaViewsTabbedBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_VIEWS_TABBED_BASE_GET_CLASS (self);
	if (_klass_->on_view_switched) {
		_klass_->on_view_switched (self);
	}
}

TubaViewsTabbedBase*
tuba_views_tabbed_base_construct (GType object_type)
{
	TubaViewsTabbedBase * self = NULL;
	self = (TubaViewsTabbedBase*) tuba_views_base_construct (object_type);
	return self;
}

TubaViewsTabbedBase*
tuba_views_tabbed_base_new (void)
{
	return tuba_views_tabbed_base_construct (TUBA_VIEWS_TYPE_TABBED_BASE);
}

gboolean
tuba_views_tabbed_base_get_title_stack_page_visible (TubaViewsTabbedBase* self)
{
	TubaViewsTabbedBaseClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = TUBA_VIEWS_TABBED_BASE_GET_CLASS (self);
	if (_klass_->get_title_stack_page_visible) {
		return _klass_->get_title_stack_page_visible (self);
	}
	return FALSE;
}

static gboolean
tuba_views_tabbed_base_real_get_title_stack_page_visible (TubaViewsTabbedBase* base)
{
	gboolean result;
	TubaViewsTabbedBase* self;
	GtkStack* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	self = base;
	_tmp0_ = self->title_stack;
	_tmp1_ = gtk_stack_get_visible_child_name (_tmp0_);
	_tmp2_ = _tmp1_;
	result = g_strcmp0 (_tmp2_, "title") == 0;
	return result;
}

void
tuba_views_tabbed_base_set_title_stack_page_visible (TubaViewsTabbedBase* self,
                                                     gboolean value)
{
	TubaViewsTabbedBaseClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_VIEWS_TABBED_BASE_GET_CLASS (self);
	if (_klass_->set_title_stack_page_visible) {
		_klass_->set_title_stack_page_visible (self, value);
	}
}

static void
tuba_views_tabbed_base_real_set_title_stack_page_visible (TubaViewsTabbedBase* base,
                                                          gboolean value)
{
	TubaViewsTabbedBase* self;
	const gchar* _tmp0_ = NULL;
	GtkStack* _tmp1_;
	self = base;
	if (value) {
		_tmp0_ = "title";
	} else {
		_tmp0_ = "switcher";
	}
	_tmp1_ = self->title_stack;
	gtk_stack_set_visible_child_name (_tmp1_, _tmp0_);
	g_object_notify_by_pspec ((GObject *) self, tuba_views_tabbed_base_properties[TUBA_VIEWS_TABBED_BASE_TITLE_STACK_PAGE_VISIBLE_PROPERTY]);
}

static void
_tuba_views_tabbed_base_on_view_switched_g_object_notify (GObject* _sender,
                                                          GParamSpec* pspec,
                                                          gpointer self)
{
	tuba_views_tabbed_base_on_view_switched ((TubaViewsTabbedBase*) self);
}

static GObject *
tuba_views_tabbed_base_constructor (GType type,
                                    guint n_construct_properties,
                                    GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsTabbedBase * self;
	GtkOverlay* _tmp0_;
	GtkBox* scrolled_overlay_box = NULL;
	GtkOverlay* _tmp1_;
	GtkWidget* _tmp2_;
	GtkBox* _tmp3_;
	GtkBox* _tmp4_;
	AdwToolbarView* _tmp7_;
	GtkStack* _tmp8_;
	AdwViewStack* _tmp9_ = NULL;
	AdwViewStack* _tmp10_;
	GtkStack* _tmp11_;
	GtkScrolledWindow* _tmp12_;
	GtkStack* _tmp13_;
	AdwViewStack* _tmp14_;
	AdwViewSwitcherBar* _tmp15_;
	AdwViewSwitcher* _tmp16_;
	AdwViewStack* _tmp17_;
	GtkShortcutController* shortcutscontroller = NULL;
	GtkShortcutController* _tmp18_;
	GtkShortcutController* _tmp19_;
	GtkEventController* _tmp20_;
	parent_class = G_OBJECT_CLASS (tuba_views_tabbed_base_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBase);
	tuba_views_base_set_base_status ((TubaViewsBase*) self, NULL);
	_tmp0_ = ((TubaViewsBase*) self)->scrolled_overlay;
	gtk_overlay_set_child (_tmp0_, NULL);
	_tmp1_ = ((TubaViewsBase*) self)->scrolled_overlay;
	_tmp2_ = gtk_widget_get_parent ((GtkWidget*) _tmp1_);
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, gtk_box_get_type ()) ? ((GtkBox*) _tmp2_) : NULL);
	scrolled_overlay_box = _tmp3_;
	_tmp4_ = scrolled_overlay_box;
	if (_tmp4_ != NULL) {
		GtkBox* _tmp5_;
		GtkOverlay* _tmp6_;
		_tmp5_ = scrolled_overlay_box;
		_tmp6_ = ((TubaViewsBase*) self)->scrolled_overlay;
		gtk_box_remove (_tmp5_, (GtkWidget*) _tmp6_);
	}
	_tmp7_ = ((TubaViewsBase*) self)->toolbar_view;
	_tmp8_ = ((TubaViewsBase*) self)->states;
	adw_toolbar_view_set_content (_tmp7_, (GtkWidget*) _tmp8_);
	_tmp9_ = (AdwViewStack*) adw_view_stack_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp9_, TRUE);
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->stack);
	self->stack = _tmp9_;
	_tmp10_ = self->stack;
	g_signal_connect_object ((GObject*) _tmp10_, "notify::visible-child", (GCallback) _tuba_views_tabbed_base_on_view_switched_g_object_notify, self, 0);
	_tmp11_ = ((TubaViewsBase*) self)->states;
	_tmp12_ = ((TubaViewsBase*) self)->scrolled;
	gtk_stack_remove (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = ((TubaViewsBase*) self)->states;
	_tmp14_ = self->stack;
	gtk_stack_add_named (_tmp13_, (GtkWidget*) _tmp14_, "content");
	_tmp15_ = self->switcher_bar;
	_tmp16_ = self->switcher;
	_tmp17_ = self->stack;
	adw_view_switcher_set_stack (_tmp16_, _tmp17_);
	adw_view_switcher_bar_set_stack (_tmp15_, _tmp17_);
	_tmp18_ = (GtkShortcutController*) gtk_shortcut_controller_new ();
	shortcutscontroller = _tmp18_;
	_tmp19_ = shortcutscontroller;
	_tmp20_ = _g_object_ref0 ((GtkEventController*) _tmp19_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp20_);
	gtk_widget_class_install_action (G_TYPE_INSTANCE_GET_CLASS (self, gtk_widget_get_type (), GtkWidgetClass), "tabbedview.change-tab", "i", (GtkWidgetActionActivateFunc) tuba_views_tabbed_base_change_tab_cb);
	{
		gint i = 0;
		i = 1;
		{
			gboolean _tmp21_ = FALSE;
			_tmp21_ = TRUE;
			while (TRUE) {
				GtkShortcutController* _tmp23_;
				gchar* _tmp24_;
				gchar* _tmp25_;
				gchar* _tmp26_;
				gchar* _tmp27_;
				GtkShortcutTrigger* _tmp28_;
				GtkNamedAction* _tmp29_;
				GtkShortcut* _tmp30_;
				if (!_tmp21_) {
					gint _tmp22_;
					_tmp22_ = i;
					i = _tmp22_ + 1;
				}
				_tmp21_ = FALSE;
				if (!(i < 10)) {
					break;
				}
				_tmp23_ = shortcutscontroller;
				_tmp24_ = g_strdup_printf ("%i", i);
				_tmp25_ = _tmp24_;
				_tmp26_ = g_strconcat ("<Alt>", _tmp25_, NULL);
				_tmp27_ = _tmp26_;
				_tmp28_ = gtk_shortcut_trigger_parse_string (_tmp27_);
				_tmp29_ = (GtkNamedAction*) gtk_named_action_new ("tabbedview.change-tab");
				_tmp30_ = gtk_shortcut_new_with_arguments (_tmp28_, (GtkShortcutAction*) _tmp29_, "i", i, NULL);
				gtk_shortcut_controller_add_shortcut (_tmp23_, _tmp30_);
				_g_free0 (_tmp27_);
				_g_free0 (_tmp25_);
			}
		}
	}
	_g_object_unref0 (shortcutscontroller);
	_g_object_unref0 (scrolled_overlay_box);
	return obj;
}

static void
tuba_views_tabbed_base_class_init (TubaViewsTabbedBaseClass * klass,
                                   gpointer klass_data)
{
	tuba_views_tabbed_base_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsTabbedBase_private_offset);
	((TubaViewsBaseClass *) klass)->unbind_listboxes = (void (*) (TubaViewsBase*)) tuba_views_tabbed_base_real_unbind_listboxes;
	((TubaViewsBaseClass *) klass)->build_header = (void (*) (TubaViewsBase*)) tuba_views_tabbed_base_real_build_header;
	((TubaViewsTabbedBaseClass *) klass)->change_tab_alt = (void (*) (TubaViewsTabbedBase*, gint)) tuba_views_tabbed_base_real_change_tab_alt;
	((TubaViewsBaseClass *) klass)->clear = (void (*) (TubaViewsBase*)) tuba_views_tabbed_base_real_clear;
	((TubaViewsBaseClass *) klass)->on_content_changed = (void (*) (TubaViewsBase*)) tuba_views_tabbed_base_real_on_content_changed;
	((TubaViewsBaseClass *) klass)->scroll_page = (void (*) (TubaViewsBase*, gboolean)) tuba_views_tabbed_base_real_scroll_page;
	((TubaViewsTabbedBaseClass *) klass)->on_view_switched = (void (*) (TubaViewsTabbedBase*)) tuba_views_tabbed_base_real_on_view_switched;
	TUBA_VIEWS_TABBED_BASE_CLASS (klass)->get_title_stack_page_visible = (gboolean (*) (TubaViewsTabbedBase*)) tuba_views_tabbed_base_real_get_title_stack_page_visible;
	TUBA_VIEWS_TABBED_BASE_CLASS (klass)->set_title_stack_page_visible = (void (*) (TubaViewsTabbedBase*, gboolean)) tuba_views_tabbed_base_real_set_title_stack_page_visible;
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_views_tabbed_base_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_views_tabbed_base_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_tabbed_base_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_tabbed_base_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_TABBED_BASE_TITLE_STACK_PAGE_VISIBLE_PROPERTY, tuba_views_tabbed_base_properties[TUBA_VIEWS_TABBED_BASE_TITLE_STACK_PAGE_VISIBLE_PROPERTY] = g_param_spec_boolean ("title-stack-page-visible", "title-stack-page-visible", "title-stack-page-visible", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tuba_views_tabbed_base_instance_init (TubaViewsTabbedBase * self,
                                      gpointer klass)
{
	TubaViewsBase** _tmp0_;
	self->priv = tuba_views_tabbed_base_get_instance_private (self);
	self->priv->id_counter = 0;
	self->priv->last_view = NULL;
	_tmp0_ = g_new0 (TubaViewsBase*, 0 + 1);
	self->priv->views = _tmp0_;
	self->priv->views_length1 = 0;
	self->priv->_views_size_ = self->priv->views_length1;
}

static void
tuba_views_tabbed_base_finalize (GObject * obj)
{
	TubaViewsTabbedBase * self;
	TubaViewsBase** _tmp0_;
	gint _tmp0__length1;
	TubaViewsBase** _tmp4_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBase);
	g_debug ("TabbedBase.vala:53: Destroying TabbedBase");
	_tmp0_ = self->priv->views;
	_tmp0__length1 = self->priv->views_length1;
	{
		TubaViewsBase** tab_collection = NULL;
		gint tab_collection_length1 = 0;
		gint _tab_collection_size_ = 0;
		gint tab_it = 0;
		tab_collection = _tmp0_;
		tab_collection_length1 = _tmp0__length1;
		for (tab_it = 0; tab_it < tab_collection_length1; tab_it = tab_it + 1) {
			TubaViewsBase* _tmp1_;
			TubaViewsBase* tab = NULL;
			_tmp1_ = _g_object_ref0 (tab_collection[tab_it]);
			tab = _tmp1_;
			{
				AdwViewStack* _tmp2_;
				TubaViewsBase* _tmp3_;
				_tmp2_ = self->stack;
				_tmp3_ = tab;
				adw_view_stack_remove (_tmp2_, (GtkWidget*) _tmp3_);
				_g_object_unref0 (tab);
			}
		}
	}
	_tmp4_ = g_new0 (TubaViewsBase*, 0 + 1);
	self->priv->views = (_vala_array_free (self->priv->views, self->priv->views_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->views = _tmp4_;
	self->priv->views_length1 = 0;
	self->priv->_views_size_ = self->priv->views_length1;
	_g_object_unref0 (self->switcher);
	_g_object_unref0 (self->switcher_bar);
	_g_object_unref0 (self->stack);
	_g_object_unref0 (self->title_stack);
	_g_object_unref0 (self->priv->last_view);
	self->priv->views = (_vala_array_free (self->priv->views, self->priv->views_length1, (GDestroyNotify) g_object_unref), NULL);
	G_OBJECT_CLASS (tuba_views_tabbed_base_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_tabbed_base_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsTabbedBaseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_tabbed_base_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsTabbedBase), 0, (GInstanceInitFunc) tuba_views_tabbed_base_instance_init, NULL };
	GType tuba_views_tabbed_base_type_id;
	tuba_views_tabbed_base_type_id = g_type_register_static (TUBA_VIEWS_TYPE_BASE, "TubaViewsTabbedBase", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsTabbedBase_private_offset = g_type_add_instance_private (tuba_views_tabbed_base_type_id, sizeof (TubaViewsTabbedBasePrivate));
	return tuba_views_tabbed_base_type_id;
}

GType
tuba_views_tabbed_base_get_type (void)
{
	static GType tuba_views_tabbed_base_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_tabbed_base_type_id__once)) {
		GType tuba_views_tabbed_base_type_id;
		tuba_views_tabbed_base_type_id = tuba_views_tabbed_base_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_tabbed_base_type_id__once, tuba_views_tabbed_base_type_id);
	}
	return tuba_views_tabbed_base_type_id__once;
}

static void
_vala_tuba_views_tabbed_base_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	TubaViewsTabbedBase * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBase);
	switch (property_id) {
		case TUBA_VIEWS_TABBED_BASE_TITLE_STACK_PAGE_VISIBLE_PROPERTY:
		g_value_set_boolean (value, tuba_views_tabbed_base_get_title_stack_page_visible (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_views_tabbed_base_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	TubaViewsTabbedBase * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBase);
	switch (property_id) {
		case TUBA_VIEWS_TABBED_BASE_TITLE_STACK_PAGE_VISIBLE_PROPERTY:
		tuba_views_tabbed_base_set_title_stack_page_visible (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

