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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <glib.h>
#include <adwaita.h>
#include <stdlib.h>
#include <string.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_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE (tuba_views_admin_timeline_pagination_timeline_get_type ())
#define TUBA_VIEWS_ADMIN_TIMELINE_PAGINATION_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE, TubaViewsAdminTimelinePaginationTimeline))
#define TUBA_VIEWS_ADMIN_TIMELINE_PAGINATION_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE, TubaViewsAdminTimelinePaginationTimelineClass))
#define TUBA_VIEWS_ADMIN_TIMELINE_IS_PAGINATION_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE))
#define TUBA_VIEWS_ADMIN_TIMELINE_IS_PAGINATION_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE))
#define TUBA_VIEWS_ADMIN_TIMELINE_PAGINATION_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE, TubaViewsAdminTimelinePaginationTimelineClass))

typedef struct _TubaViewsAdminTimelinePaginationTimeline TubaViewsAdminTimelinePaginationTimeline;
typedef struct _TubaViewsAdminTimelinePaginationTimelineClass TubaViewsAdminTimelinePaginationTimelineClass;
typedef struct _TubaViewsAdminTimelinePaginationTimelinePrivate TubaViewsAdminTimelinePaginationTimelinePrivate;

#define TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS (tuba_views_admin_timeline_reports_get_type ())
#define TUBA_VIEWS_ADMIN_TIMELINE_REPORTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS, TubaViewsAdminTimelineReports))
#define TUBA_VIEWS_ADMIN_TIMELINE_REPORTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS, TubaViewsAdminTimelineReportsClass))
#define TUBA_VIEWS_ADMIN_TIMELINE_IS_REPORTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS))
#define TUBA_VIEWS_ADMIN_TIMELINE_IS_REPORTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS))
#define TUBA_VIEWS_ADMIN_TIMELINE_REPORTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS, TubaViewsAdminTimelineReportsClass))

typedef struct _TubaViewsAdminTimelineReports TubaViewsAdminTimelineReports;
typedef struct _TubaViewsAdminTimelineReportsClass TubaViewsAdminTimelineReportsClass;
typedef struct _TubaViewsAdminTimelineReportsPrivate TubaViewsAdminTimelineReportsPrivate;
enum  {
	TUBA_VIEWS_ADMIN_TIMELINE_REPORTS_0_PROPERTY,
	TUBA_VIEWS_ADMIN_TIMELINE_REPORTS_NUM_PROPERTIES
};
static GParamSpec* tuba_views_admin_timeline_reports_properties[TUBA_VIEWS_ADMIN_TIMELINE_REPORTS_NUM_PROPERTIES];

#define TUBA_WIDGETS_ADMIN_TYPE_REPORT (tuba_widgets_admin_report_get_type ())
#define TUBA_WIDGETS_ADMIN_REPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_ADMIN_TYPE_REPORT, TubaWidgetsAdminReport))
#define TUBA_WIDGETS_ADMIN_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_ADMIN_TYPE_REPORT, TubaWidgetsAdminReportClass))
#define TUBA_WIDGETS_ADMIN_IS_REPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_ADMIN_TYPE_REPORT))
#define TUBA_WIDGETS_ADMIN_IS_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_ADMIN_TYPE_REPORT))
#define TUBA_WIDGETS_ADMIN_REPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_ADMIN_TYPE_REPORT, TubaWidgetsAdminReportClass))

typedef struct _TubaWidgetsAdminReport TubaWidgetsAdminReport;
typedef struct _TubaWidgetsAdminReportClass TubaWidgetsAdminReportClass;

#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_ADMIN_TYPE_REPORT (tuba_api_admin_report_get_type ())
#define TUBA_API_ADMIN_REPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_ADMIN_TYPE_REPORT, TubaAPIAdminReport))
#define TUBA_API_ADMIN_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_ADMIN_TYPE_REPORT, TubaAPIAdminReportClass))
#define TUBA_API_ADMIN_IS_REPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_ADMIN_TYPE_REPORT))
#define TUBA_API_ADMIN_IS_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_ADMIN_TYPE_REPORT))
#define TUBA_API_ADMIN_REPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_ADMIN_TYPE_REPORT, TubaAPIAdminReportClass))

typedef struct _TubaAPIAdminReport TubaAPIAdminReport;
typedef struct _TubaAPIAdminReportClass TubaAPIAdminReportClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	TUBA_VIEWS_ADMIN_TIMELINE_REPORTS_ON_OPEN_REPORT_DIALOG_SIGNAL,
	TUBA_VIEWS_ADMIN_TIMELINE_REPORTS_NUM_SIGNALS
};
static guint tuba_views_admin_timeline_reports_signals[TUBA_VIEWS_ADMIN_TIMELINE_REPORTS_NUM_SIGNALS] = {0};

struct _TubaViewsAdminTimelinePaginationTimeline {
	GtkBox parent_instance;
	TubaViewsAdminTimelinePaginationTimelinePrivate * priv;
	GtkListBox* content;
};

struct _TubaViewsAdminTimelinePaginationTimelineClass {
	GtkBoxClass parent_class;
	void (*request) (TubaViewsAdminTimelinePaginationTimeline* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*request_finish) (TubaViewsAdminTimelinePaginationTimeline* self, GAsyncResult* _res_);
	GtkWidget* (*on_create_model_widget) (TubaViewsAdminTimelinePaginationTimeline* self, GObject* obj);
	void (*on_content_item_activated) (TubaViewsAdminTimelinePaginationTimeline* self, GtkListBoxRow* row);
};

struct _TubaViewsAdminTimelineReports {
	TubaViewsAdminTimelinePaginationTimeline parent_instance;
	TubaViewsAdminTimelineReportsPrivate * priv;
};

struct _TubaViewsAdminTimelineReportsClass {
	TubaViewsAdminTimelinePaginationTimelineClass parent_class;
};

static gpointer tuba_views_admin_timeline_reports_parent_class = NULL;

VALA_EXTERN GType tuba_views_admin_timeline_pagination_timeline_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsAdminTimelinePaginationTimeline, g_object_unref)
VALA_EXTERN GType tuba_views_admin_timeline_reports_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsAdminTimelineReports, g_object_unref)
VALA_EXTERN GtkWidget* tuba_views_admin_timeline_pagination_timeline_on_create_model_widget (TubaViewsAdminTimelinePaginationTimeline* self,
                                                                                 GObject* obj);
static GtkWidget* tuba_views_admin_timeline_reports_real_on_create_model_widget (TubaViewsAdminTimelinePaginationTimeline* base,
                                                                          GObject* obj);
VALA_EXTERN GType tuba_widgets_admin_report_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsAdminReport, g_object_unref)
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_admin_report_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAdminReport, g_object_unref)
static void tuba_views_admin_timeline_reports_on_report_activated (TubaViewsAdminTimelineReports* self,
                                                            TubaAPIAdminReport* report);
static void _tuba_views_admin_timeline_reports_on_report_activated_tuba_widgets_admin_report_report_activated (TubaWidgetsAdminReport* _sender,
                                                                                                        TubaAPIAdminReport* report,
                                                                                                        gpointer self);
VALA_EXTERN TubaViewsAdminTimelineReports* tuba_views_admin_timeline_reports_new (void);
VALA_EXTERN TubaViewsAdminTimelineReports* tuba_views_admin_timeline_reports_construct (GType object_type);
VALA_EXTERN TubaViewsAdminTimelinePaginationTimeline* tuba_views_admin_timeline_pagination_timeline_new (void);
VALA_EXTERN TubaViewsAdminTimelinePaginationTimeline* tuba_views_admin_timeline_pagination_timeline_construct (GType object_type);
static GObject * tuba_views_admin_timeline_reports_constructor (GType type,
                                                         guint n_construct_properties,
                                                         GObjectConstructParam * construct_properties);
VALA_EXTERN void tuba_views_admin_timeline_pagination_timeline_set_url (TubaViewsAdminTimelinePaginationTimeline* self,
                                                            const gchar* value);
VALA_EXTERN void tuba_views_admin_timeline_pagination_timeline_set_accepts (TubaViewsAdminTimelinePaginationTimeline* self,
                                                                GType value);
static void tuba_views_admin_timeline_reports_finalize (GObject * obj);
static GType tuba_views_admin_timeline_reports_get_type_once (void);

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

static void
_tuba_views_admin_timeline_reports_on_report_activated_tuba_widgets_admin_report_report_activated (TubaWidgetsAdminReport* _sender,
                                                                                                   TubaAPIAdminReport* report,
                                                                                                   gpointer self)
{
	tuba_views_admin_timeline_reports_on_report_activated ((TubaViewsAdminTimelineReports*) self, report);
}

static GtkWidget*
tuba_views_admin_timeline_reports_real_on_create_model_widget (TubaViewsAdminTimelinePaginationTimeline* base,
                                                               GObject* obj)
{
	TubaViewsAdminTimelineReports * self;
	GtkWidget* widget = NULL;
	GtkWidget* _tmp0_;
	TubaWidgetsAdminReport* action_row = NULL;
	GtkWidget* _tmp1_;
	TubaWidgetsAdminReport* _tmp2_;
	TubaWidgetsAdminReport* _tmp3_;
	GtkWidget* result;
	self = (TubaViewsAdminTimelineReports*) base;
	g_return_val_if_fail (obj != NULL, NULL);
	_tmp0_ = TUBA_VIEWS_ADMIN_TIMELINE_PAGINATION_TIMELINE_CLASS (tuba_views_admin_timeline_reports_parent_class)->on_create_model_widget (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE, TubaViewsAdminTimelinePaginationTimeline), obj);
	widget = _tmp0_;
	_tmp1_ = widget;
	_tmp2_ = _g_object_ref0 (TUBA_WIDGETS_ADMIN_IS_REPORT (_tmp1_) ? ((TubaWidgetsAdminReport*) _tmp1_) : NULL);
	action_row = _tmp2_;
	_tmp3_ = action_row;
	if (_tmp3_ != NULL) {
		TubaWidgetsAdminReport* _tmp4_;
		_tmp4_ = action_row;
		g_signal_connect_object (_tmp4_, "report-activated", (GCallback) _tuba_views_admin_timeline_reports_on_report_activated_tuba_widgets_admin_report_report_activated, self, 0);
	}
	result = widget;
	_g_object_unref0 (action_row);
	return result;
}

static void
tuba_views_admin_timeline_reports_on_report_activated (TubaViewsAdminTimelineReports* self,
                                                       TubaAPIAdminReport* report)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (report != NULL);
	g_signal_emit (self, tuba_views_admin_timeline_reports_signals[TUBA_VIEWS_ADMIN_TIMELINE_REPORTS_ON_OPEN_REPORT_DIALOG_SIGNAL], 0, report);
}

TubaViewsAdminTimelineReports*
tuba_views_admin_timeline_reports_construct (GType object_type)
{
	TubaViewsAdminTimelineReports * self = NULL;
	self = (TubaViewsAdminTimelineReports*) tuba_views_admin_timeline_pagination_timeline_construct (object_type);
	return self;
}

TubaViewsAdminTimelineReports*
tuba_views_admin_timeline_reports_new (void)
{
	return tuba_views_admin_timeline_reports_construct (TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS);
}

static GObject *
tuba_views_admin_timeline_reports_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsAdminTimelineReports * self;
	parent_class = G_OBJECT_CLASS (tuba_views_admin_timeline_reports_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS, TubaViewsAdminTimelineReports);
	tuba_views_admin_timeline_pagination_timeline_set_url ((TubaViewsAdminTimelinePaginationTimeline*) self, "/api/v1/admin/reports");
	tuba_views_admin_timeline_pagination_timeline_set_accepts ((TubaViewsAdminTimelinePaginationTimeline*) self, TUBA_API_ADMIN_TYPE_REPORT);
	return obj;
}

static void
tuba_views_admin_timeline_reports_class_init (TubaViewsAdminTimelineReportsClass * klass,
                                              gpointer klass_data)
{
	tuba_views_admin_timeline_reports_parent_class = g_type_class_peek_parent (klass);
	((TubaViewsAdminTimelinePaginationTimelineClass *) klass)->on_create_model_widget = (GtkWidget* (*) (TubaViewsAdminTimelinePaginationTimeline*, GObject*)) tuba_views_admin_timeline_reports_real_on_create_model_widget;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_admin_timeline_reports_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_admin_timeline_reports_finalize;
	tuba_views_admin_timeline_reports_signals[TUBA_VIEWS_ADMIN_TIMELINE_REPORTS_ON_OPEN_REPORT_DIALOG_SIGNAL] = g_signal_new ("on-open-report-dialog", TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TUBA_API_ADMIN_TYPE_REPORT);
}

static void
tuba_views_admin_timeline_reports_instance_init (TubaViewsAdminTimelineReports * self,
                                                 gpointer klass)
{
}

static void
tuba_views_admin_timeline_reports_finalize (GObject * obj)
{
	TubaViewsAdminTimelineReports * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS, TubaViewsAdminTimelineReports);
	g_debug ("Reports.vala:3: Destroying Reports");
	G_OBJECT_CLASS (tuba_views_admin_timeline_reports_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_admin_timeline_reports_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsAdminTimelineReportsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_admin_timeline_reports_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsAdminTimelineReports), 0, (GInstanceInitFunc) tuba_views_admin_timeline_reports_instance_init, NULL };
	GType tuba_views_admin_timeline_reports_type_id;
	tuba_views_admin_timeline_reports_type_id = g_type_register_static (TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE, "TubaViewsAdminTimelineReports", &g_define_type_info, G_TYPE_FLAG_NONE);
	return tuba_views_admin_timeline_reports_type_id;
}

GType
tuba_views_admin_timeline_reports_get_type (void)
{
	static GType tuba_views_admin_timeline_reports_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_admin_timeline_reports_type_id__once)) {
		GType tuba_views_admin_timeline_reports_type_id;
		tuba_views_admin_timeline_reports_type_id = tuba_views_admin_timeline_reports_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_admin_timeline_reports_type_id__once, tuba_views_admin_timeline_reports_type_id);
	}
	return tuba_views_admin_timeline_reports_type_id__once;
}

