/* Main.c generated by valac 0.56.19, the Vala compiler
 * generated from Main.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 <glib/gi18n-lib.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;

#define TUBA_VIEWS_TYPE_MAIN (tuba_views_main_get_type ())
#define TUBA_VIEWS_MAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_MAIN, TubaViewsMain))
#define TUBA_VIEWS_MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_MAIN, TubaViewsMainClass))
#define TUBA_VIEWS_IS_MAIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_MAIN))
#define TUBA_VIEWS_IS_MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_MAIN))
#define TUBA_VIEWS_MAIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_MAIN, TubaViewsMainClass))

typedef struct _TubaViewsMain TubaViewsMain;
typedef struct _TubaViewsMainClass TubaViewsMainClass;
typedef struct _TubaViewsMainPrivate TubaViewsMainPrivate;

#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_NOTIFICATIONS (tuba_views_notifications_get_type ())
#define TUBA_VIEWS_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_NOTIFICATIONS, TubaViewsNotifications))
#define TUBA_VIEWS_NOTIFICATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_NOTIFICATIONS, TubaViewsNotificationsClass))
#define TUBA_VIEWS_IS_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_NOTIFICATIONS))
#define TUBA_VIEWS_IS_NOTIFICATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_NOTIFICATIONS))
#define TUBA_VIEWS_NOTIFICATIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_NOTIFICATIONS, TubaViewsNotificationsClass))

typedef struct _TubaViewsNotifications TubaViewsNotifications;
typedef struct _TubaViewsNotificationsClass TubaViewsNotificationsClass;
enum  {
	TUBA_VIEWS_MAIN_0_PROPERTY,
	TUBA_VIEWS_MAIN_VISIBLE_CHILD_NAME_PROPERTY,
	TUBA_VIEWS_MAIN_TITLE_WRAPPER_STACK_VISIBLE_PROPERTY,
	TUBA_VIEWS_MAIN_NUM_PROPERTIES
};
static GParamSpec* tuba_views_main_properties[TUBA_VIEWS_MAIN_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TUBA_TYPE_APPLICATION (tuba_application_get_type ())
#define TUBA_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_APPLICATION, TubaApplication))
#define TUBA_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_APPLICATION, TubaApplicationClass))
#define TUBA_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_APPLICATION))
#define TUBA_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_APPLICATION))
#define TUBA_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_APPLICATION, TubaApplicationClass))

typedef struct _TubaApplication TubaApplication;
typedef struct _TubaApplicationClass TubaApplicationClass;

#define TUBA_DIALOGS_TYPE_MAIN_WINDOW (tuba_dialogs_main_window_get_type ())
#define TUBA_DIALOGS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindow))
#define TUBA_DIALOGS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindowClass))
#define TUBA_DIALOGS_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW))
#define TUBA_DIALOGS_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_MAIN_WINDOW))
#define TUBA_DIALOGS_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindowClass))

typedef struct _TubaDialogsMainWindow TubaDialogsMainWindow;
typedef struct _TubaDialogsMainWindowClass TubaDialogsMainWindowClass;
typedef struct _Block68Data Block68Data;
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_DIALOGS_TYPE_SAVEABLE (tuba_dialogs_saveable_get_type ())
#define TUBA_DIALOGS_SAVEABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_SAVEABLE, TubaDialogsSaveable))
#define TUBA_DIALOGS_IS_SAVEABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_SAVEABLE))
#define TUBA_DIALOGS_SAVEABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_DIALOGS_TYPE_SAVEABLE, TubaDialogsSaveableIface))

typedef struct _TubaDialogsSaveable TubaDialogsSaveable;
typedef struct _TubaDialogsSaveableIface TubaDialogsSaveableIface;
typedef struct _TubaDialogsMainWindowPrivate TubaDialogsMainWindowPrivate;

#define TUBA_VIEWS_TYPE_SEARCH (tuba_views_search_get_type ())
#define TUBA_VIEWS_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_SEARCH, TubaViewsSearch))
#define TUBA_VIEWS_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_SEARCH, TubaViewsSearchClass))
#define TUBA_VIEWS_IS_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_SEARCH))
#define TUBA_VIEWS_IS_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_SEARCH))
#define TUBA_VIEWS_SEARCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_SEARCH, TubaViewsSearchClass))

typedef struct _TubaViewsSearch TubaViewsSearch;
typedef struct _TubaViewsSearchClass TubaViewsSearchClass;

#define TUBA_DIALOGS_TYPE_NOTIFICATION_SETTINGS (tuba_dialogs_notification_settings_get_type ())
#define TUBA_DIALOGS_NOTIFICATION_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_NOTIFICATION_SETTINGS, TubaDialogsNotificationSettings))
#define TUBA_DIALOGS_NOTIFICATION_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_NOTIFICATION_SETTINGS, TubaDialogsNotificationSettingsClass))
#define TUBA_DIALOGS_IS_NOTIFICATION_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_NOTIFICATION_SETTINGS))
#define TUBA_DIALOGS_IS_NOTIFICATION_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_NOTIFICATION_SETTINGS))
#define TUBA_DIALOGS_NOTIFICATION_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_NOTIFICATION_SETTINGS, TubaDialogsNotificationSettingsClass))

typedef struct _TubaDialogsNotificationSettings TubaDialogsNotificationSettings;
typedef struct _TubaDialogsNotificationSettingsClass TubaDialogsNotificationSettingsClass;

#define TUBA_VIEWS_TYPE_HOME (tuba_views_home_get_type ())
#define TUBA_VIEWS_HOME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_HOME, TubaViewsHome))
#define TUBA_VIEWS_HOME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_HOME, TubaViewsHomeClass))
#define TUBA_VIEWS_IS_HOME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_HOME))
#define TUBA_VIEWS_IS_HOME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_HOME))
#define TUBA_VIEWS_HOME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_HOME, TubaViewsHomeClass))

typedef struct _TubaViewsHome TubaViewsHome;
typedef struct _TubaViewsHomeClass TubaViewsHomeClass;

#define TUBA_VIEWS_TYPE_CONVERSATIONS (tuba_views_conversations_get_type ())
#define TUBA_VIEWS_CONVERSATIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_CONVERSATIONS, TubaViewsConversations))
#define TUBA_VIEWS_CONVERSATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_CONVERSATIONS, TubaViewsConversationsClass))
#define TUBA_VIEWS_IS_CONVERSATIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_CONVERSATIONS))
#define TUBA_VIEWS_IS_CONVERSATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_CONVERSATIONS))
#define TUBA_VIEWS_CONVERSATIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_CONVERSATIONS, TubaViewsConversationsClass))

typedef struct _TubaViewsConversations TubaViewsConversations;
typedef struct _TubaViewsConversationsClass TubaViewsConversationsClass;

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 _TubaViewsMain {
	TubaViewsTabbedBase parent_instance;
	TubaViewsMainPrivate * priv;
};

struct _TubaViewsMainClass {
	TubaViewsTabbedBaseClass parent_class;
};

struct _TubaViewsMainPrivate {
	TubaViewsNotifications* notification_view;
	GtkButton* notification_settings_button;
	GtkButton* search_button;
	GtkStack* title_wrapper_stack;
};

struct _Block68Data {
	int _ref_count_;
	TubaViewsMain* self;
	GtkToggleButton* sidebar_button;
	gulong main_window_notify;
};

struct _TubaDialogsSaveableIface {
	GTypeInterface parent_iface;
};

struct _TubaDialogsMainWindow {
	AdwApplicationWindow parent_instance;
	TubaDialogsMainWindowPrivate * priv;
	AdwOverlaySplitView* split_view;
	AdwNavigationPage* main_page;
};

struct _TubaDialogsMainWindowClass {
	AdwApplicationWindowClass parent_class;
};

static gint TubaViewsMain_private_offset;
static gpointer tuba_views_main_parent_class = NULL;
VALA_EXTERN TubaApplication* tuba_app;
VALA_EXTERN gboolean tuba_is_rtl;

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 GType tuba_views_main_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsMain, g_object_unref)
VALA_EXTERN GType tuba_views_content_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsContentBase, g_object_unref)
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_notifications_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsNotifications, g_object_unref)
VALA_EXTERN void tuba_views_tabbed_base_change_tab_alt (TubaViewsTabbedBase* self,
                                            gint id);
VALA_EXTERN void tuba_views_tabbed_base_on_view_switched (TubaViewsTabbedBase* self);
VALA_EXTERN void tuba_views_base_build_header (TubaViewsBase* self);
static void tuba_views_main_real_change_tab_alt (TubaViewsTabbedBase* base,
                                          gint id);
VALA_EXTERN GType tuba_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaApplication, g_object_unref)
VALA_EXTERN GType tuba_dialogs_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsMainWindow, g_object_unref)
VALA_EXTERN TubaDialogsMainWindow* tuba_application_get_main_window (TubaApplication* self);
VALA_EXTERN void tuba_dialogs_main_window_set_sidebar_selected_item (TubaDialogsMainWindow* self,
                                                         gint pos);
static void tuba_views_main_real_on_view_switched (TubaViewsTabbedBase* base);
static void tuba_views_main_bind (TubaViewsMain* self);
static void tuba_views_main_real_build_header (TubaViewsBase* base);
static Block68Data* block68_data_ref (Block68Data* _data68_);
static void block68_data_unref (void * _userdata_);
VALA_EXTERN const gchar* tuba_views_base_get_label (TubaViewsBase* self);
static void tuba_views_main_open_search (TubaViewsMain* self);
static void _tuba_views_main_open_search_gtk_button_clicked (GtkButton* _sender,
                                                      gpointer self);
static void tuba_views_main_show_notification_settings (TubaViewsMain* self);
static void _tuba_views_main_show_notification_settings_gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self);
static void __lambda209_ (Block68Data* _data68_);
VALA_EXTERN GType tuba_dialogs_saveable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsSaveable, g_object_unref)
static void ___lambda209__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
VALA_EXTERN TubaViewsBase* tuba_dialogs_main_window_open_view (TubaDialogsMainWindow* self,
                                                   TubaViewsBase* view);
VALA_EXTERN TubaViewsSearch* tuba_views_search_new (void);
VALA_EXTERN TubaViewsSearch* tuba_views_search_construct (GType object_type);
VALA_EXTERN GType tuba_views_search_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsSearch, g_object_unref)
VALA_EXTERN GType tuba_dialogs_notification_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsNotificationSettings, g_object_unref)
VALA_EXTERN TubaDialogsNotificationSettings* tuba_dialogs_notification_settings_new (void);
VALA_EXTERN TubaDialogsNotificationSettings* tuba_dialogs_notification_settings_construct (GType object_type);
static void tuba_views_main_on_filters_changed (TubaViewsMain* self);
static void _tuba_views_main_on_filters_changed_tuba_dialogs_notification_settings_filters_changed (TubaDialogsNotificationSettings* _sender,
                                                                                             gpointer self);
VALA_EXTERN void tuba_views_notifications_filters_changed (TubaViewsNotifications* self,
                                               gboolean refresh);
VALA_EXTERN TubaViewsMain* tuba_views_main_new (void);
VALA_EXTERN TubaViewsMain* tuba_views_main_construct (GType object_type);
VALA_EXTERN TubaViewsTabbedBase* tuba_views_tabbed_base_new (void);
VALA_EXTERN TubaViewsTabbedBase* tuba_views_tabbed_base_construct (GType object_type);
VALA_EXTERN const gchar* tuba_views_main_get_visible_child_name (TubaViewsMain* self);
VALA_EXTERN gboolean tuba_views_main_get_title_wrapper_stack_visible (TubaViewsMain* self);
VALA_EXTERN void tuba_views_main_set_title_wrapper_stack_visible (TubaViewsMain* self,
                                                      gboolean value);
static GObject * tuba_views_main_constructor (GType type,
                                       guint n_construct_properties,
                                       GObjectConstructParam * construct_properties);
VALA_EXTERN void tuba_views_base_set_is_main (TubaViewsBase* self,
                                  gboolean value);
VALA_EXTERN void tuba_views_tabbed_base_add_tab (TubaViewsTabbedBase* self,
                                     TubaViewsBase* view);
VALA_EXTERN TubaViewsHome* tuba_views_home_new (void);
VALA_EXTERN TubaViewsHome* tuba_views_home_construct (GType object_type);
VALA_EXTERN GType tuba_views_home_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsHome, g_object_unref)
VALA_EXTERN TubaViewsNotifications* tuba_views_notifications_new (void);
VALA_EXTERN TubaViewsNotifications* tuba_views_notifications_construct (GType object_type);
VALA_EXTERN TubaViewsConversations* tuba_views_conversations_new (void);
VALA_EXTERN TubaViewsConversations* tuba_views_conversations_construct (GType object_type);
VALA_EXTERN GType tuba_views_conversations_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsConversations, g_object_unref)
static void tuba_views_main_finalize (GObject * obj);
static GType tuba_views_main_get_type_once (void);
static void _vala_tuba_views_main_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec);
static void _vala_tuba_views_main_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_main_get_instance_private (TubaViewsMain* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsMain_private_offset);
}

static void
tuba_views_main_real_change_tab_alt (TubaViewsTabbedBase* base,
                                     gint id)
{
	TubaViewsMain * self;
	TubaApplication* _tmp0_;
	TubaDialogsMainWindow* _tmp1_;
	TubaDialogsMainWindow* _tmp2_;
	self = (TubaViewsMain*) base;
	TUBA_VIEWS_TABBED_BASE_CLASS (tuba_views_main_parent_class)->change_tab_alt (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBase), id);
	_tmp0_ = tuba_app;
	_tmp1_ = tuba_application_get_main_window (_tmp0_);
	_tmp2_ = _tmp1_;
	tuba_dialogs_main_window_set_sidebar_selected_item (_tmp2_, id - 1);
}

static void
tuba_views_main_real_on_view_switched (TubaViewsTabbedBase* base)
{
	TubaViewsMain * self;
	gboolean is_notifications = FALSE;
	AdwViewStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkButton* _tmp3_;
	self = (TubaViewsMain*) base;
	TUBA_VIEWS_TABBED_BASE_CLASS (tuba_views_main_parent_class)->on_view_switched (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBase));
	_tmp0_ = ((TubaViewsTabbedBase*) self)->stack;
	_tmp1_ = adw_view_stack_get_visible_child (_tmp0_);
	_tmp2_ = _tmp1_;
	is_notifications = (TUBA_VIEWS_IS_NOTIFICATIONS (_tmp2_) ? ((TubaViewsNotifications*) _tmp2_) : NULL) != NULL;
	_tmp3_ = self->priv->notification_settings_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp3_, is_notifications);
}

static void
tuba_views_main_bind (TubaViewsMain* self)
{
	TubaApplication* _tmp0_;
	GtkButton* _tmp1_;
	TubaApplication* _tmp2_;
	AdwViewSwitcherBar* _tmp3_;
	TubaApplication* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_app;
	_tmp1_ = self->priv->search_button;
	g_object_bind_property_with_closures ((GObject*) _tmp0_, "is-mobile", (GObject*) _tmp1_, "visible", 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)));
	_tmp2_ = tuba_app;
	_tmp3_ = ((TubaViewsTabbedBase*) self)->switcher_bar;
	g_object_bind_property_with_closures ((GObject*) _tmp2_, "is-mobile", (GObject*) _tmp3_, "visible", 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)));
	_tmp4_ = tuba_app;
	g_object_bind_property_with_closures ((GObject*) _tmp4_, "is-mobile", (GObject*) self, "title-wrapper-stack-visible", 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)));
}

static Block68Data*
block68_data_ref (Block68Data* _data68_)
{
	g_atomic_int_inc (&_data68_->_ref_count_);
	return _data68_;
}

static void
block68_data_unref (void * _userdata_)
{
	Block68Data* _data68_;
	_data68_ = (Block68Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data68_->_ref_count_)) {
		TubaViewsMain* self;
		self = _data68_->self;
		_g_object_unref0 (_data68_->sidebar_button);
		_g_object_unref0 (self);
		g_slice_free (Block68Data, _data68_);
	}
}

static void
_tuba_views_main_open_search_gtk_button_clicked (GtkButton* _sender,
                                                 gpointer self)
{
	tuba_views_main_open_search ((TubaViewsMain*) self);
}

static void
_tuba_views_main_show_notification_settings_gtk_button_clicked (GtkButton* _sender,
                                                                gpointer self)
{
	tuba_views_main_show_notification_settings ((TubaViewsMain*) self);
}

static void
__lambda209_ (Block68Data* _data68_)
{
	TubaViewsMain* self;
	TubaApplication* _tmp0_;
	TubaDialogsMainWindow* _tmp1_;
	TubaDialogsMainWindow* _tmp2_;
	TubaApplication* _tmp4_;
	TubaDialogsMainWindow* _tmp5_;
	TubaDialogsMainWindow* _tmp6_;
	AdwOverlaySplitView* _tmp7_;
	GtkToggleButton* _tmp8_;
	TubaApplication* _tmp9_;
	TubaDialogsMainWindow* _tmp10_;
	TubaDialogsMainWindow* _tmp11_;
	AdwOverlaySplitView* _tmp12_;
	GtkToggleButton* _tmp13_;
	TubaApplication* _tmp14_;
	self = _data68_->self;
	_tmp0_ = tuba_app;
	_tmp1_ = tuba_application_get_main_window (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == NULL) {
		GtkToggleButton* _tmp3_;
		_tmp3_ = _data68_->sidebar_button;
		gtk_widget_hide ((GtkWidget*) _tmp3_);
		return;
	}
	_tmp4_ = tuba_app;
	_tmp5_ = tuba_application_get_main_window (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_->split_view;
	_tmp8_ = _data68_->sidebar_button;
	g_object_bind_property_with_closures ((GObject*) _tmp7_, "collapsed", (GObject*) _tmp8_, "visible", 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)));
	_tmp9_ = tuba_app;
	_tmp10_ = tuba_application_get_main_window (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = _tmp11_->split_view;
	_tmp13_ = _data68_->sidebar_button;
	g_object_bind_property_with_closures ((GObject*) _tmp12_, "show-sidebar", (GObject*) _tmp13_, "active", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp14_ = tuba_app;
	g_signal_handler_disconnect ((GObject*) _tmp14_, _data68_->main_window_notify);
}

static void
___lambda209__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda209_ (self);
}

static void
tuba_views_main_real_build_header (TubaViewsBase* base)
{
	TubaViewsMain * self;
	Block68Data* _data68_;
	AdwHeaderBar* _tmp0_;
	GtkStack* _tmp1_;
	GtkStack* _tmp2_;
	GtkStack* _tmp3_;
	AdwWindowTitle* title_header = NULL;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	AdwWindowTitle* _tmp6_;
	AdwWindowTitle* _tmp7_;
	GtkStack* _tmp8_;
	AdwWindowTitle* _tmp9_;
	AdwHeaderBar* _tmp10_;
	GtkStack* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	GtkButton* _tmp14_ = NULL;
	GtkButton* _tmp15_;
	AdwHeaderBar* _tmp16_;
	GtkButton* _tmp17_;
	gchar* _tmp18_;
	gchar** _tmp19_;
	gchar* _tmp20_;
	GtkButton* _tmp21_ = NULL;
	GtkButton* _tmp22_;
	AdwHeaderBar* _tmp23_;
	GtkButton* _tmp24_;
	gchar* _tmp25_;
	GtkToggleButton* _tmp26_ = NULL;
	AdwHeaderBar* _tmp27_;
	GtkToggleButton* _tmp28_;
	const gchar* _tmp29_ = NULL;
	GtkToggleButton* _tmp30_;
	TubaApplication* _tmp31_;
	gulong _tmp32_;
	self = (TubaViewsMain*) base;
	_data68_ = g_slice_new0 (Block68Data);
	_data68_->_ref_count_ = 1;
	_data68_->self = g_object_ref (self);
	TUBA_VIEWS_BASE_CLASS (tuba_views_main_parent_class)->build_header ((TubaViewsBase*) G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBase));
	_tmp0_ = ((TubaViewsBase*) self)->header;
	adw_header_bar_set_title_widget (_tmp0_, NULL);
	_tmp1_ = (GtkStack*) gtk_stack_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->title_wrapper_stack);
	self->priv->title_wrapper_stack = _tmp1_;
	_tmp2_ = self->priv->title_wrapper_stack;
	_tmp3_ = ((TubaViewsTabbedBase*) self)->title_stack;
	gtk_stack_add_named (_tmp2_, (GtkWidget*) _tmp3_, "stack");
	_tmp4_ = tuba_views_base_get_label ((TubaViewsBase*) self);
	_tmp5_ = _tmp4_;
	_tmp6_ = (AdwWindowTitle*) adw_window_title_new (_tmp5_, "");
	g_object_ref_sink (_tmp6_);
	title_header = _tmp6_;
	_tmp7_ = title_header;
	g_object_bind_property_with_closures ((GObject*) self, "label", (GObject*) _tmp7_, "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)));
	_tmp8_ = self->priv->title_wrapper_stack;
	_tmp9_ = title_header;
	gtk_stack_add_named (_tmp8_, (GtkWidget*) _tmp9_, "title");
	_tmp10_ = ((TubaViewsBase*) self)->header;
	_tmp11_ = self->priv->title_wrapper_stack;
	adw_header_bar_set_title_widget (_tmp10_, (GtkWidget*) _tmp11_);
	_tmp12_ = g_strdup ("tuba-loupe-large-symbolic");
	_tmp13_ = g_strdup (_ ("Search"));
	_tmp14_ = (GtkButton*) gtk_button_new ();
	gtk_button_set_icon_name (_tmp14_, _tmp12_);
	_g_free0 (_tmp12_);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp14_, _tmp13_);
	_g_free0 (_tmp13_);
	g_object_ref_sink (_tmp14_);
	_g_object_unref0 (self->priv->search_button);
	self->priv->search_button = _tmp14_;
	_tmp15_ = self->priv->search_button;
	g_signal_connect_object (_tmp15_, "clicked", (GCallback) _tuba_views_main_open_search_gtk_button_clicked, self, 0);
	_tmp16_ = ((TubaViewsBase*) self)->header;
	_tmp17_ = self->priv->search_button;
	adw_header_bar_pack_end (_tmp16_, (GtkWidget*) _tmp17_);
	_tmp18_ = g_strdup ("flat");
	_tmp19_ = g_new0 (gchar*, 1 + 1);
	_tmp19_[0] = _tmp18_;
	_tmp20_ = g_strdup (_ ("Filter"));
	_tmp21_ = (GtkButton*) gtk_button_new_from_icon_name ("tuba-funnel-symbolic");
	gtk_widget_set_css_classes ((GtkWidget*) _tmp21_, _tmp19_);
	_tmp19_ = (_vala_array_free (_tmp19_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp21_, _tmp20_);
	_g_free0 (_tmp20_);
	gtk_widget_set_visible ((GtkWidget*) _tmp21_, FALSE);
	g_object_ref_sink (_tmp21_);
	_g_object_unref0 (self->priv->notification_settings_button);
	self->priv->notification_settings_button = _tmp21_;
	_tmp22_ = self->priv->notification_settings_button;
	g_signal_connect_object (_tmp22_, "clicked", (GCallback) _tuba_views_main_show_notification_settings_gtk_button_clicked, self, 0);
	_tmp23_ = ((TubaViewsBase*) self)->header;
	_tmp24_ = self->priv->notification_settings_button;
	adw_header_bar_pack_end (_tmp23_, (GtkWidget*) _tmp24_);
	_tmp25_ = g_strdup (_ ("Open Sidebar"));
	_tmp26_ = (GtkToggleButton*) gtk_toggle_button_new ();
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp26_, _tmp25_);
	_g_free0 (_tmp25_);
	g_object_ref_sink (_tmp26_);
	_data68_->sidebar_button = _tmp26_;
	_tmp27_ = ((TubaViewsBase*) self)->header;
	_tmp28_ = _data68_->sidebar_button;
	adw_header_bar_pack_start (_tmp27_, (GtkWidget*) _tmp28_);
	if (tuba_is_rtl) {
		_tmp29_ = "tuba-dock-right-symbolic";
	} else {
		_tmp29_ = "tuba-dock-left-symbolic";
	}
	_tmp30_ = _data68_->sidebar_button;
	gtk_button_set_icon_name ((GtkButton*) _tmp30_, _tmp29_);
	tuba_views_main_bind (self);
	_data68_->main_window_notify = (gulong) 0;
	_tmp31_ = tuba_app;
	_tmp32_ = g_signal_connect_data ((GObject*) _tmp31_, "notify::main-window", (GCallback) ___lambda209__g_object_notify, block68_data_ref (_data68_), (GClosureNotify) block68_data_unref, 0);
	_data68_->main_window_notify = _tmp32_;
	_g_object_unref0 (title_header);
	block68_data_unref (_data68_);
	_data68_ = NULL;
}

static void
tuba_views_main_open_search (TubaViewsMain* self)
{
	TubaApplication* _tmp0_;
	TubaDialogsMainWindow* _tmp1_;
	TubaDialogsMainWindow* _tmp2_;
	TubaViewsSearch* _tmp3_;
	TubaViewsSearch* _tmp4_;
	TubaViewsBase* _tmp5_;
	TubaViewsBase* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_app;
	_tmp1_ = tuba_application_get_main_window (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = tuba_views_search_new ();
	g_object_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	_tmp5_ = tuba_dialogs_main_window_open_view (_tmp2_, (TubaViewsBase*) _tmp4_);
	_tmp6_ = _tmp5_;
	_g_object_unref0 (_tmp6_);
	_g_object_unref0 (_tmp4_);
}

static void
_tuba_views_main_on_filters_changed_tuba_dialogs_notification_settings_filters_changed (TubaDialogsNotificationSettings* _sender,
                                                                                        gpointer self)
{
	tuba_views_main_on_filters_changed ((TubaViewsMain*) self);
}

static void
tuba_views_main_show_notification_settings (TubaViewsMain* self)
{
	TubaDialogsNotificationSettings* notification_settings = NULL;
	TubaDialogsNotificationSettings* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_dialogs_notification_settings_new ();
	g_object_ref_sink (_tmp0_);
	notification_settings = _tmp0_;
	g_signal_connect_object (notification_settings, "filters-changed", (GCallback) _tuba_views_main_on_filters_changed_tuba_dialogs_notification_settings_filters_changed, self, 0);
	adw_dialog_present ((AdwDialog*) notification_settings, (GtkWidget*) self);
	_g_object_unref0 (notification_settings);
}

static void
tuba_views_main_on_filters_changed (TubaViewsMain* self)
{
	TubaViewsNotifications* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->notification_view;
	tuba_views_notifications_filters_changed (_tmp0_, TRUE);
}

TubaViewsMain*
tuba_views_main_construct (GType object_type)
{
	TubaViewsMain * self = NULL;
	self = (TubaViewsMain*) tuba_views_tabbed_base_construct (object_type);
	return self;
}

TubaViewsMain*
tuba_views_main_new (void)
{
	return tuba_views_main_construct (TUBA_VIEWS_TYPE_MAIN);
}

const gchar*
tuba_views_main_get_visible_child_name (TubaViewsMain* self)
{
	const gchar* result;
	AdwViewStack* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = ((TubaViewsTabbedBase*) self)->stack;
	_tmp1_ = adw_view_stack_get_visible_child_name (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

gboolean
tuba_views_main_get_title_wrapper_stack_visible (TubaViewsMain* self)
{
	gboolean result;
	GtkStack* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->title_wrapper_stack;
	_tmp1_ = gtk_stack_get_visible_child_name (_tmp0_);
	_tmp2_ = _tmp1_;
	result = g_strcmp0 (_tmp2_, "title") == 0;
	return result;
}

void
tuba_views_main_set_title_wrapper_stack_visible (TubaViewsMain* self,
                                                 gboolean value)
{
	const gchar* _tmp0_ = NULL;
	GtkStack* _tmp1_;
	g_return_if_fail (self != NULL);
	if (value) {
		_tmp0_ = "stack";
	} else {
		_tmp0_ = "title";
	}
	_tmp1_ = self->priv->title_wrapper_stack;
	gtk_stack_set_visible_child_name (_tmp1_, _tmp0_);
	g_object_notify_by_pspec ((GObject *) self, tuba_views_main_properties[TUBA_VIEWS_MAIN_TITLE_WRAPPER_STACK_VISIBLE_PROPERTY]);
}

static GObject *
tuba_views_main_constructor (GType type,
                             guint n_construct_properties,
                             GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsMain * self;
	TubaViewsHome* _tmp0_;
	TubaViewsHome* _tmp1_;
	TubaViewsNotifications* _tmp2_;
	TubaViewsNotifications* _tmp3_;
	TubaViewsConversations* _tmp4_;
	TubaViewsConversations* _tmp5_;
	parent_class = G_OBJECT_CLASS (tuba_views_main_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_MAIN, TubaViewsMain);
	tuba_views_base_set_is_main ((TubaViewsBase*) self, TRUE);
	_tmp0_ = tuba_views_home_new ();
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	tuba_views_tabbed_base_add_tab ((TubaViewsTabbedBase*) self, (TubaViewsBase*) _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = tuba_views_notifications_new ();
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->notification_view);
	self->priv->notification_view = _tmp2_;
	_tmp3_ = self->priv->notification_view;
	tuba_views_tabbed_base_add_tab ((TubaViewsTabbedBase*) self, (TubaViewsBase*) _tmp3_);
	_tmp4_ = tuba_views_conversations_new ();
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	tuba_views_tabbed_base_add_tab ((TubaViewsTabbedBase*) self, (TubaViewsBase*) _tmp5_);
	_g_object_unref0 (_tmp5_);
	return obj;
}

static void
tuba_views_main_class_init (TubaViewsMainClass * klass,
                            gpointer klass_data)
{
	tuba_views_main_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsMain_private_offset);
	((TubaViewsTabbedBaseClass *) klass)->change_tab_alt = (void (*) (TubaViewsTabbedBase*, gint)) tuba_views_main_real_change_tab_alt;
	((TubaViewsTabbedBaseClass *) klass)->on_view_switched = (void (*) (TubaViewsTabbedBase*)) tuba_views_main_real_on_view_switched;
	((TubaViewsBaseClass *) klass)->build_header = (void (*) (TubaViewsBase*)) tuba_views_main_real_build_header;
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_views_main_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_views_main_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_main_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_main_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_MAIN_VISIBLE_CHILD_NAME_PROPERTY, tuba_views_main_properties[TUBA_VIEWS_MAIN_VISIBLE_CHILD_NAME_PROPERTY] = g_param_spec_string ("visible-child-name", "visible-child-name", "visible-child-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_MAIN_TITLE_WRAPPER_STACK_VISIBLE_PROPERTY, tuba_views_main_properties[TUBA_VIEWS_MAIN_TITLE_WRAPPER_STACK_VISIBLE_PROPERTY] = g_param_spec_boolean ("title-wrapper-stack-visible", "title-wrapper-stack-visible", "title-wrapper-stack-visible", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tuba_views_main_instance_init (TubaViewsMain * self,
                               gpointer klass)
{
	self->priv = tuba_views_main_get_instance_private (self);
}

static void
tuba_views_main_finalize (GObject * obj)
{
	TubaViewsMain * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_MAIN, TubaViewsMain);
	_g_object_unref0 (self->priv->notification_view);
	_g_object_unref0 (self->priv->notification_settings_button);
	_g_object_unref0 (self->priv->search_button);
	_g_object_unref0 (self->priv->title_wrapper_stack);
	G_OBJECT_CLASS (tuba_views_main_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_main_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsMainClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_main_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsMain), 0, (GInstanceInitFunc) tuba_views_main_instance_init, NULL };
	GType tuba_views_main_type_id;
	tuba_views_main_type_id = g_type_register_static (TUBA_VIEWS_TYPE_TABBED_BASE, "TubaViewsMain", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsMain_private_offset = g_type_add_instance_private (tuba_views_main_type_id, sizeof (TubaViewsMainPrivate));
	return tuba_views_main_type_id;
}

GType
tuba_views_main_get_type (void)
{
	static GType tuba_views_main_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_main_type_id__once)) {
		GType tuba_views_main_type_id;
		tuba_views_main_type_id = tuba_views_main_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_main_type_id__once, tuba_views_main_type_id);
	}
	return tuba_views_main_type_id__once;
}

static void
_vala_tuba_views_main_get_property (GObject * object,
                                    guint property_id,
                                    GValue * value,
                                    GParamSpec * pspec)
{
	TubaViewsMain * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_TYPE_MAIN, TubaViewsMain);
	switch (property_id) {
		case TUBA_VIEWS_MAIN_VISIBLE_CHILD_NAME_PROPERTY:
		g_value_set_string (value, tuba_views_main_get_visible_child_name (self));
		break;
		case TUBA_VIEWS_MAIN_TITLE_WRAPPER_STACK_VISIBLE_PROPERTY:
		g_value_set_boolean (value, tuba_views_main_get_title_wrapper_stack_visible (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_views_main_set_property (GObject * object,
                                    guint property_id,
                                    const GValue * value,
                                    GParamSpec * pspec)
{
	TubaViewsMain * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_TYPE_MAIN, TubaViewsMain);
	switch (property_id) {
		case TUBA_VIEWS_MAIN_TITLE_WRAPPER_STACK_VISIBLE_PROPERTY:
		tuba_views_main_set_title_wrapper_stack_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);
}

