/* Explore.c generated by valac 0.56.19, the Vala compiler
 * generated from Explore.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_EXPLORE (tuba_views_explore_get_type ())
#define TUBA_VIEWS_EXPLORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_EXPLORE, TubaViewsExplore))
#define TUBA_VIEWS_EXPLORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_EXPLORE, TubaViewsExploreClass))
#define TUBA_VIEWS_IS_EXPLORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_EXPLORE))
#define TUBA_VIEWS_IS_EXPLORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_EXPLORE))
#define TUBA_VIEWS_EXPLORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_EXPLORE, TubaViewsExploreClass))

typedef struct _TubaViewsExplore TubaViewsExplore;
typedef struct _TubaViewsExploreClass TubaViewsExploreClass;
typedef struct _TubaViewsExplorePrivate TubaViewsExplorePrivate;
enum  {
	TUBA_VIEWS_EXPLORE_0_PROPERTY,
	TUBA_VIEWS_EXPLORE_NUM_PROPERTIES
};
static GParamSpec* tuba_views_explore_properties[TUBA_VIEWS_EXPLORE_NUM_PROPERTIES];

#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_TYPE_ENTITY (tuba_entity_get_type ())
#define TUBA_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ENTITY, TubaEntity))
#define TUBA_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ENTITY, TubaEntityClass))
#define TUBA_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ENTITY))
#define TUBA_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ENTITY))
#define TUBA_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ENTITY, TubaEntityClass))

typedef struct _TubaEntity TubaEntity;
typedef struct _TubaEntityClass TubaEntityClass;

#define TUBA_API_TYPE_STATUS (tuba_api_status_get_type ())
#define TUBA_API_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_STATUS, TubaAPIStatus))
#define TUBA_API_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_STATUS, TubaAPIStatusClass))
#define TUBA_API_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_STATUS))
#define TUBA_API_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_STATUS))
#define TUBA_API_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_STATUS, TubaAPIStatusClass))

typedef struct _TubaAPIStatus TubaAPIStatus;
typedef struct _TubaAPIStatusClass TubaAPIStatusClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TUBA_API_TYPE_TAG (tuba_api_tag_get_type ())
#define TUBA_API_TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_TAG, TubaAPITag))
#define TUBA_API_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_TAG, TubaAPITagClass))
#define TUBA_API_IS_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_TAG))
#define TUBA_API_IS_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_TAG))
#define TUBA_API_TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_TAG, TubaAPITagClass))

typedef struct _TubaAPITag TubaAPITag;
typedef struct _TubaAPITagClass TubaAPITagClass;

#define TUBA_API_TYPE_PREVIEW_CARD (tuba_api_preview_card_get_type ())
#define TUBA_API_PREVIEW_CARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_PREVIEW_CARD, TubaAPIPreviewCard))
#define TUBA_API_PREVIEW_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_PREVIEW_CARD, TubaAPIPreviewCardClass))
#define TUBA_API_IS_PREVIEW_CARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_PREVIEW_CARD))
#define TUBA_API_IS_PREVIEW_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_PREVIEW_CARD))
#define TUBA_API_PREVIEW_CARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_PREVIEW_CARD, TubaAPIPreviewCardClass))

typedef struct _TubaAPIPreviewCard TubaAPIPreviewCard;
typedef struct _TubaAPIPreviewCardClass TubaAPIPreviewCardClass;

#define TUBA_API_TYPE_SUGGESTION (tuba_api_suggestion_get_type ())
#define TUBA_API_SUGGESTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_SUGGESTION, TubaAPISuggestion))
#define TUBA_API_SUGGESTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_SUGGESTION, TubaAPISuggestionClass))
#define TUBA_API_IS_SUGGESTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_SUGGESTION))
#define TUBA_API_IS_SUGGESTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_SUGGESTION))
#define TUBA_API_SUGGESTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_SUGGESTION, TubaAPISuggestionClass))

typedef struct _TubaAPISuggestion TubaAPISuggestion;
typedef struct _TubaAPISuggestionClass TubaAPISuggestionClass;

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 _TubaViewsExplore {
	TubaViewsTabbedBase parent_instance;
	TubaViewsExplorePrivate * priv;
};

struct _TubaViewsExploreClass {
	TubaViewsTabbedBaseClass parent_class;
};

static gpointer tuba_views_explore_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 GType tuba_views_explore_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsExplore, g_object_unref)
VALA_EXTERN TubaViewsExplore* tuba_views_explore_new (void);
VALA_EXTERN TubaViewsExplore* tuba_views_explore_construct (GType object_type);
VALA_EXTERN TubaViewsTabbedBase* tuba_views_tabbed_base_new (void);
VALA_EXTERN TubaViewsTabbedBase* tuba_views_tabbed_base_construct (GType object_type);
static GObject * tuba_views_explore_constructor (GType type,
                                          guint n_construct_properties,
                                          GObjectConstructParam * construct_properties);
VALA_EXTERN void tuba_views_base_set_label (TubaViewsBase* self,
                                const gchar* value);
VALA_EXTERN void tuba_views_base_set_uid (TubaViewsBase* self,
                              gint value);
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_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_entity_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaEntity, g_object_unref)
VALA_EXTERN GType tuba_api_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIStatus, g_object_unref)
VALA_EXTERN GType tuba_api_tag_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPITag, g_object_unref)
VALA_EXTERN GType tuba_api_preview_card_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIPreviewCard, g_object_unref)
VALA_EXTERN GType tuba_api_suggestion_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPISuggestion, g_object_unref)
static GType tuba_views_explore_get_type_once (void);

TubaViewsExplore*
tuba_views_explore_construct (GType object_type)
{
	TubaViewsExplore * self = NULL;
	self = (TubaViewsExplore*) tuba_views_tabbed_base_construct (object_type);
	return self;
}

TubaViewsExplore*
tuba_views_explore_new (void)
{
	return tuba_views_explore_construct (TUBA_VIEWS_TYPE_EXPLORE);
}

static GObject *
tuba_views_explore_constructor (GType type,
                                guint n_construct_properties,
                                GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsExplore * self;
	TubaViewsContentBase* _tmp0_;
	TubaViewsContentBase* _tmp1_;
	TubaViewsContentBase* _tmp2_;
	TubaViewsContentBase* _tmp3_;
	TubaViewsContentBase* _tmp4_;
	TubaViewsContentBase* _tmp5_;
	TubaViewsContentBase* _tmp6_;
	TubaViewsContentBase* _tmp7_;
	parent_class = G_OBJECT_CLASS (tuba_views_explore_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_EXPLORE, TubaViewsExplore);
	tuba_views_base_set_label ((TubaViewsBase*) self, _ ("Explore"));
	tuba_views_base_set_uid ((TubaViewsBase*) self, 1);
	_tmp0_ = tuba_views_tabbed_base_add_timeline_tab ((TubaViewsTabbedBase*) self, _ ("Posts"), "tuba-chat-symbolic", "/api/v1/trends/statuses", TUBA_API_TYPE_STATUS, NULL, NULL, FALSE);
	_tmp1_ = _tmp0_;
	_g_object_unref0 (_tmp1_);
	_tmp2_ = tuba_views_tabbed_base_add_timeline_tab ((TubaViewsTabbedBase*) self, _ ("Hashtags"), "tuba-hashtag-symbolic", "/api/v1/trends/tags", TUBA_API_TYPE_TAG, _ ("No Hashtags"), NULL, FALSE);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (_tmp3_);
	_tmp4_ = tuba_views_tabbed_base_add_timeline_tab ((TubaViewsTabbedBase*) self, _ ("News"), "tuba-newspaper-symbolic", "/api/v1/trends/links", TUBA_API_TYPE_PREVIEW_CARD, _ ("No News"), NULL, FALSE);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp5_);
	_tmp6_ = tuba_views_tabbed_base_add_timeline_tab ((TubaViewsTabbedBase*) self, _ ("For You"), "tuba-people-symbolic", "/api/v2/suggestions", TUBA_API_TYPE_SUGGESTION, _ ("No Suggestions"), NULL, FALSE);
	_tmp7_ = _tmp6_;
	_g_object_unref0 (_tmp7_);
	return obj;
}

static void
tuba_views_explore_class_init (TubaViewsExploreClass * klass,
                               gpointer klass_data)
{
	tuba_views_explore_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->constructor = tuba_views_explore_constructor;
}

static void
tuba_views_explore_instance_init (TubaViewsExplore * self,
                                  gpointer klass)
{
}

 G_GNUC_NO_INLINE static GType
tuba_views_explore_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsExploreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_explore_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsExplore), 0, (GInstanceInitFunc) tuba_views_explore_instance_init, NULL };
	GType tuba_views_explore_type_id;
	tuba_views_explore_type_id = g_type_register_static (TUBA_VIEWS_TYPE_TABBED_BASE, "TubaViewsExplore", &g_define_type_info, G_TYPE_FLAG_NONE);
	return tuba_views_explore_type_id;
}

GType
tuba_views_explore_get_type (void)
{
	static GType tuba_views_explore_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_explore_type_id__once)) {
		GType tuba_views_explore_type_id;
		tuba_views_explore_type_id = tuba_views_explore_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_explore_type_id__once, tuba_views_explore_type_id);
	}
	return tuba_views_explore_type_id__once;
}

