/* MutesBlocks.c generated by valac 0.56.19, the Vala compiler
 * generated from MutesBlocks.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_MUTES_BLOCKS (tuba_views_mutes_blocks_get_type ())
#define TUBA_VIEWS_MUTES_BLOCKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_MUTES_BLOCKS, TubaViewsMutesBlocks))
#define TUBA_VIEWS_MUTES_BLOCKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_MUTES_BLOCKS, TubaViewsMutesBlocksClass))
#define TUBA_VIEWS_IS_MUTES_BLOCKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_MUTES_BLOCKS))
#define TUBA_VIEWS_IS_MUTES_BLOCKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_MUTES_BLOCKS))
#define TUBA_VIEWS_MUTES_BLOCKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_MUTES_BLOCKS, TubaViewsMutesBlocksClass))

typedef struct _TubaViewsMutesBlocks TubaViewsMutesBlocks;
typedef struct _TubaViewsMutesBlocksClass TubaViewsMutesBlocksClass;
typedef struct _TubaViewsMutesBlocksPrivate TubaViewsMutesBlocksPrivate;

#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;
enum  {
	TUBA_VIEWS_MUTES_BLOCKS_0_PROPERTY,
	TUBA_VIEWS_MUTES_BLOCKS_NUM_PROPERTIES
};
static GParamSpec* tuba_views_mutes_blocks_properties[TUBA_VIEWS_MUTES_BLOCKS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#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_ACCOUNT (tuba_api_account_get_type ())
#define TUBA_API_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccount))
#define TUBA_API_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))
#define TUBA_API_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))

typedef struct _TubaAPIAccount TubaAPIAccount;
typedef struct _TubaAPIAccountClass TubaAPIAccountClass;

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 _TubaViewsMutesBlocks {
	TubaViewsTabbedBase parent_instance;
	TubaViewsMutesBlocksPrivate * priv;
};

struct _TubaViewsMutesBlocksClass {
	TubaViewsTabbedBaseClass parent_class;
};

struct _TubaViewsMutesBlocksPrivate {
	TubaViewsContentBase* mutes;
	TubaViewsContentBase* blocks;
};

static gint TubaViewsMutesBlocks_private_offset;
static gpointer tuba_views_mutes_blocks_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_mutes_blocks_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsMutesBlocks, 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 TubaViewsMutesBlocks* tuba_views_mutes_blocks_new (void);
VALA_EXTERN TubaViewsMutesBlocks* tuba_views_mutes_blocks_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 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_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccount, g_object_unref)
static GObject * tuba_views_mutes_blocks_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties);
VALA_EXTERN void tuba_views_base_set_label (TubaViewsBase* self,
                                const gchar* value);
static void tuba_views_mutes_blocks_finalize (GObject * obj);
static GType tuba_views_mutes_blocks_get_type_once (void);

static inline gpointer
tuba_views_mutes_blocks_get_instance_private (TubaViewsMutesBlocks* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsMutesBlocks_private_offset);
}

TubaViewsMutesBlocks*
tuba_views_mutes_blocks_construct (GType object_type)
{
	TubaViewsMutesBlocks * self = NULL;
	TubaViewsContentBase* _tmp0_;
	TubaViewsContentBase* _tmp1_;
	self = (TubaViewsMutesBlocks*) tuba_views_tabbed_base_construct (object_type);
	_tmp0_ = tuba_views_tabbed_base_add_timeline_tab ((TubaViewsTabbedBase*) self, _ ("Mutes"), "audio-volume-muted-symbolic", "/api/v1/mutes", TUBA_API_TYPE_ACCOUNT, _ ("No Muted Accounts"), NULL, TRUE);
	_g_object_unref0 (self->priv->mutes);
	self->priv->mutes = _tmp0_;
	_tmp1_ = tuba_views_tabbed_base_add_timeline_tab ((TubaViewsTabbedBase*) self, _ ("Blocks"), "tuba-error-symbolic", "/api/v1/blocks", TUBA_API_TYPE_ACCOUNT, _ ("No Blocked Accounts"), NULL, TRUE);
	_g_object_unref0 (self->priv->blocks);
	self->priv->blocks = _tmp1_;
	return self;
}

TubaViewsMutesBlocks*
tuba_views_mutes_blocks_new (void)
{
	return tuba_views_mutes_blocks_construct (TUBA_VIEWS_TYPE_MUTES_BLOCKS);
}

static GObject *
tuba_views_mutes_blocks_constructor (GType type,
                                     guint n_construct_properties,
                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsMutesBlocks * self;
	parent_class = G_OBJECT_CLASS (tuba_views_mutes_blocks_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_MUTES_BLOCKS, TubaViewsMutesBlocks);
	tuba_views_base_set_label ((TubaViewsBase*) self, _ ("Mutes & Blocks"));
	return obj;
}

static void
tuba_views_mutes_blocks_class_init (TubaViewsMutesBlocksClass * klass,
                                    gpointer klass_data)
{
	tuba_views_mutes_blocks_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsMutesBlocks_private_offset);
	G_OBJECT_CLASS (klass)->constructor = tuba_views_mutes_blocks_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_mutes_blocks_finalize;
}

static void
tuba_views_mutes_blocks_instance_init (TubaViewsMutesBlocks * self,
                                       gpointer klass)
{
	self->priv = tuba_views_mutes_blocks_get_instance_private (self);
}

static void
tuba_views_mutes_blocks_finalize (GObject * obj)
{
	TubaViewsMutesBlocks * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_MUTES_BLOCKS, TubaViewsMutesBlocks);
	_g_object_unref0 (self->priv->mutes);
	_g_object_unref0 (self->priv->blocks);
	G_OBJECT_CLASS (tuba_views_mutes_blocks_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_mutes_blocks_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsMutesBlocksClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_mutes_blocks_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsMutesBlocks), 0, (GInstanceInitFunc) tuba_views_mutes_blocks_instance_init, NULL };
	GType tuba_views_mutes_blocks_type_id;
	tuba_views_mutes_blocks_type_id = g_type_register_static (TUBA_VIEWS_TYPE_TABBED_BASE, "TubaViewsMutesBlocks", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsMutesBlocks_private_offset = g_type_add_instance_private (tuba_views_mutes_blocks_type_id, sizeof (TubaViewsMutesBlocksPrivate));
	return tuba_views_mutes_blocks_type_id;
}

GType
tuba_views_mutes_blocks_get_type (void)
{
	static GType tuba_views_mutes_blocks_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_mutes_blocks_type_id__once)) {
		GType tuba_views_mutes_blocks_type_id;
		tuba_views_mutes_blocks_type_id = tuba_views_mutes_blocks_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_mutes_blocks_type_id__once, tuba_views_mutes_blocks_type_id);
	}
	return tuba_views_mutes_blocks_type_id__once;
}

