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

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

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

#define TUBA_TYPE_BASIC_WIDGETIZABLE (tuba_basic_widgetizable_get_type ())
#define TUBA_BASIC_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_BASIC_WIDGETIZABLE, TubaBasicWidgetizable))
#define TUBA_IS_BASIC_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_BASIC_WIDGETIZABLE))
#define TUBA_BASIC_WIDGETIZABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_BASIC_WIDGETIZABLE, TubaBasicWidgetizableIface))

typedef struct _TubaBasicWidgetizable TubaBasicWidgetizable;
typedef struct _TubaBasicWidgetizableIface TubaBasicWidgetizableIface;

#define TUBA_TYPE_WIDGETIZABLE (tuba_widgetizable_get_type ())
#define TUBA_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_WIDGETIZABLE, TubaWidgetizable))
#define TUBA_IS_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_WIDGETIZABLE))
#define TUBA_WIDGETIZABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_WIDGETIZABLE, TubaWidgetizableIface))

typedef struct _TubaWidgetizable TubaWidgetizable;
typedef struct _TubaWidgetizableIface TubaWidgetizableIface;

#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;

#define TUBA_TYPE_INSTANCE_ACCOUNT (tuba_instance_account_get_type ())
#define TUBA_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccount))
#define TUBA_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))
#define TUBA_IS_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_IS_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_INSTANCE_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))

typedef struct _TubaInstanceAccount TubaInstanceAccount;
typedef struct _TubaInstanceAccountClass TubaInstanceAccountClass;

struct _TubaBasicWidgetizableIface {
	GTypeInterface parent_iface;
	GtkWidget* (*to_widget) (TubaBasicWidgetizable* self);
};

struct _TubaWidgetizableIface {
	GTypeInterface parent_iface;
	GtkWidget* (*to_widget) (TubaWidgetizable* self);
	void (*open) (TubaWidgetizable* self);
	void (*resolve_open) (TubaWidgetizable* self, TubaInstanceAccount* account);
};

VALA_EXTERN GType tuba_basic_widgetizable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaBasicWidgetizable, g_object_unref)
VALA_EXTERN GtkWidget* tuba_basic_widgetizable_to_widget (TubaBasicWidgetizable* self);
static GtkWidget* tuba_basic_widgetizable_real_to_widget (TubaBasicWidgetizable* self);
static GType tuba_basic_widgetizable_get_type_once (void);
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)
VALA_EXTERN GType tuba_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccount, g_object_unref)
VALA_EXTERN GType tuba_widgetizable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetizable, g_object_unref)
VALA_EXTERN GtkWidget* tuba_widgetizable_to_widget (TubaWidgetizable* self);
static GtkWidget* tuba_widgetizable_real_to_widget (TubaWidgetizable* self);
VALA_EXTERN void tuba_widgetizable_open (TubaWidgetizable* self);
static void tuba_widgetizable_real_open (TubaWidgetizable* self);
VALA_EXTERN void tuba_widgetizable_resolve_open (TubaWidgetizable* self,
                                     TubaInstanceAccount* account);
static void tuba_widgetizable_real_resolve_open (TubaWidgetizable* self,
                                          TubaInstanceAccount* account);
static GType tuba_widgetizable_get_type_once (void);

static GtkWidget*
tuba_basic_widgetizable_real_to_widget (TubaBasicWidgetizable* self)
{
	g_assert_not_reached ();
}

GtkWidget*
tuba_basic_widgetizable_to_widget (TubaBasicWidgetizable* self)
{
	TubaBasicWidgetizableIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = TUBA_BASIC_WIDGETIZABLE_GET_INTERFACE (self);
	if (_iface_->to_widget) {
		return _iface_->to_widget (self);
	}
	return NULL;
}

static void
tuba_basic_widgetizable_default_init (TubaBasicWidgetizableIface * iface,
                                      gpointer iface_data)
{
	iface->to_widget = tuba_basic_widgetizable_real_to_widget;
}

 G_GNUC_NO_INLINE static GType
tuba_basic_widgetizable_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaBasicWidgetizableIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_basic_widgetizable_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType tuba_basic_widgetizable_type_id;
	tuba_basic_widgetizable_type_id = g_type_register_static (G_TYPE_INTERFACE, "TubaBasicWidgetizable", &g_define_type_info, G_TYPE_FLAG_NONE);
	g_type_interface_add_prerequisite (tuba_basic_widgetizable_type_id, G_TYPE_OBJECT);
	return tuba_basic_widgetizable_type_id;
}

GType
tuba_basic_widgetizable_get_type (void)
{
	static GType tuba_basic_widgetizable_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_basic_widgetizable_type_id__once)) {
		GType tuba_basic_widgetizable_type_id;
		tuba_basic_widgetizable_type_id = tuba_basic_widgetizable_get_type_once ();
		g_once_init_leave_pointer (&tuba_basic_widgetizable_type_id__once, tuba_basic_widgetizable_type_id);
	}
	return tuba_basic_widgetizable_type_id__once;
}

static GtkWidget*
tuba_widgetizable_real_to_widget (TubaWidgetizable* self)
{
	g_assert_not_reached ();
}

GtkWidget*
tuba_widgetizable_to_widget (TubaWidgetizable* self)
{
	TubaWidgetizableIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = TUBA_WIDGETIZABLE_GET_INTERFACE (self);
	if (_iface_->to_widget) {
		return _iface_->to_widget (self);
	}
	return NULL;
}

static void
tuba_widgetizable_real_open (TubaWidgetizable* self)
{
	g_warning ("Widgetizable.vala:13: Widgetizable didn't provide a way to open it!");
}

void
tuba_widgetizable_open (TubaWidgetizable* self)
{
	TubaWidgetizableIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = TUBA_WIDGETIZABLE_GET_INTERFACE (self);
	if (_iface_->open) {
		_iface_->open (self);
	}
}

static void
tuba_widgetizable_real_resolve_open (TubaWidgetizable* self,
                                     TubaInstanceAccount* account)
{
	g_return_if_fail (account != NULL);
	tuba_widgetizable_open (self);
}

void
tuba_widgetizable_resolve_open (TubaWidgetizable* self,
                                TubaInstanceAccount* account)
{
	TubaWidgetizableIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = TUBA_WIDGETIZABLE_GET_INTERFACE (self);
	if (_iface_->resolve_open) {
		_iface_->resolve_open (self, account);
	}
}

static void
tuba_widgetizable_default_init (TubaWidgetizableIface * iface,
                                gpointer iface_data)
{
	iface->to_widget = tuba_widgetizable_real_to_widget;
	iface->open = tuba_widgetizable_real_open;
	iface->resolve_open = tuba_widgetizable_real_resolve_open;
}

 G_GNUC_NO_INLINE static GType
tuba_widgetizable_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaWidgetizableIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_widgetizable_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType tuba_widgetizable_type_id;
	tuba_widgetizable_type_id = g_type_register_static (G_TYPE_INTERFACE, "TubaWidgetizable", &g_define_type_info, G_TYPE_FLAG_NONE);
	g_type_interface_add_prerequisite (tuba_widgetizable_type_id, G_TYPE_OBJECT);
	return tuba_widgetizable_type_id;
}

GType
tuba_widgetizable_get_type (void)
{
	static GType tuba_widgetizable_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_widgetizable_type_id__once)) {
		GType tuba_widgetizable_type_id;
		tuba_widgetizable_type_id = tuba_widgetizable_get_type_once ();
		g_once_init_leave_pointer (&tuba_widgetizable_type_id__once, tuba_widgetizable_type_id);
	}
	return tuba_widgetizable_type_id__once;
}

