/* load-more-row.c generated by valac 0.56.19, the Vala compiler
 * generated from load-more-row.vala, do not modify */

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.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 PROTON_PLUS_WIDGETS_TYPE_LOAD_MORE_ROW (proton_plus_widgets_load_more_row_get_type ())
#define PROTON_PLUS_WIDGETS_LOAD_MORE_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_LOAD_MORE_ROW, ProtonPlusWidgetsLoadMoreRow))
#define PROTON_PLUS_WIDGETS_LOAD_MORE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_LOAD_MORE_ROW, ProtonPlusWidgetsLoadMoreRowClass))
#define PROTON_PLUS_WIDGETS_IS_LOAD_MORE_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_LOAD_MORE_ROW))
#define PROTON_PLUS_WIDGETS_IS_LOAD_MORE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_LOAD_MORE_ROW))
#define PROTON_PLUS_WIDGETS_LOAD_MORE_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_LOAD_MORE_ROW, ProtonPlusWidgetsLoadMoreRowClass))

typedef struct _ProtonPlusWidgetsLoadMoreRow ProtonPlusWidgetsLoadMoreRow;
typedef struct _ProtonPlusWidgetsLoadMoreRowClass ProtonPlusWidgetsLoadMoreRowClass;
typedef struct _ProtonPlusWidgetsLoadMoreRowPrivate ProtonPlusWidgetsLoadMoreRowPrivate;
enum  {
	PROTON_PLUS_WIDGETS_LOAD_MORE_ROW_0_PROPERTY,
	PROTON_PLUS_WIDGETS_LOAD_MORE_ROW_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_load_more_row_properties[PROTON_PLUS_WIDGETS_LOAD_MORE_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _ProtonPlusWidgetsLoadMoreRow {
	AdwActionRow parent_instance;
	ProtonPlusWidgetsLoadMoreRowPrivate * priv;
};

struct _ProtonPlusWidgetsLoadMoreRowClass {
	AdwActionRowClass parent_class;
};

struct _ProtonPlusWidgetsLoadMoreRowPrivate {
	GtkButton* _load_button;
	GtkBox* _suffix_box;
};

static gint ProtonPlusWidgetsLoadMoreRow_private_offset;
static gpointer proton_plus_widgets_load_more_row_parent_class = NULL;

VALA_EXTERN GType proton_plus_widgets_load_more_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsLoadMoreRow, g_object_unref)
VALA_EXTERN ProtonPlusWidgetsLoadMoreRow* proton_plus_widgets_load_more_row_new (void);
VALA_EXTERN ProtonPlusWidgetsLoadMoreRow* proton_plus_widgets_load_more_row_construct (GType object_type);
static GtkButton* proton_plus_widgets_load_more_row_get_load_button (ProtonPlusWidgetsLoadMoreRow* self);
static void proton_plus_widgets_load_more_row_set_load_button (ProtonPlusWidgetsLoadMoreRow* self,
                                                        GtkButton* value);
static GtkBox* proton_plus_widgets_load_more_row_get_suffix_box (ProtonPlusWidgetsLoadMoreRow* self);
static void proton_plus_widgets_load_more_row_set_suffix_box (ProtonPlusWidgetsLoadMoreRow* self,
                                                       GtkBox* value);
static GObject * proton_plus_widgets_load_more_row_constructor (GType type,
                                                         guint n_construct_properties,
                                                         GObjectConstructParam * construct_properties);
static void _proton_plus_widgets_load_more_row___lambda20_ (ProtonPlusWidgetsLoadMoreRow* self);
static void __proton_plus_widgets_load_more_row___lambda20__gtk_button_clicked (GtkButton* _sender,
                                                                         gpointer self);
static void proton_plus_widgets_load_more_row_finalize (GObject * obj);
static GType proton_plus_widgets_load_more_row_get_type_once (void);
static void _vala_proton_plus_widgets_load_more_row_get_property (GObject * object,
                                                           guint property_id,
                                                           GValue * value,
                                                           GParamSpec * pspec);
static void _vala_proton_plus_widgets_load_more_row_set_property (GObject * object,
                                                           guint property_id,
                                                           const GValue * value,
                                                           GParamSpec * pspec);

static inline gpointer
proton_plus_widgets_load_more_row_get_instance_private (ProtonPlusWidgetsLoadMoreRow* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsLoadMoreRow_private_offset);
}

ProtonPlusWidgetsLoadMoreRow*
proton_plus_widgets_load_more_row_construct (GType object_type)
{
	ProtonPlusWidgetsLoadMoreRow * self = NULL;
	self = (ProtonPlusWidgetsLoadMoreRow*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusWidgetsLoadMoreRow*
proton_plus_widgets_load_more_row_new (void)
{
	return proton_plus_widgets_load_more_row_construct (PROTON_PLUS_WIDGETS_TYPE_LOAD_MORE_ROW);
}

static GtkButton*
proton_plus_widgets_load_more_row_get_load_button (ProtonPlusWidgetsLoadMoreRow* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_load_button;
	result = _tmp0_;
	return result;
}

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

static void
proton_plus_widgets_load_more_row_set_load_button (ProtonPlusWidgetsLoadMoreRow* self,
                                                   GtkButton* value)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_load_button);
	self->priv->_load_button = _tmp0_;
}

static GtkBox*
proton_plus_widgets_load_more_row_get_suffix_box (ProtonPlusWidgetsLoadMoreRow* self)
{
	GtkBox* result;
	GtkBox* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_suffix_box;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_load_more_row_set_suffix_box (ProtonPlusWidgetsLoadMoreRow* self,
                                                  GtkBox* value)
{
	GtkBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_suffix_box);
	self->priv->_suffix_box = _tmp0_;
}

static void
_proton_plus_widgets_load_more_row___lambda20_ (ProtonPlusWidgetsLoadMoreRow* self)
{
	g_signal_emit_by_name ((AdwActionRow*) self, "activated");
}

static void
__proton_plus_widgets_load_more_row___lambda20__gtk_button_clicked (GtkButton* _sender,
                                                                    gpointer self)
{
	_proton_plus_widgets_load_more_row___lambda20_ ((ProtonPlusWidgetsLoadMoreRow*) self);
}

static GObject *
proton_plus_widgets_load_more_row_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ProtonPlusWidgetsLoadMoreRow * self;
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
	GtkButton* _tmp4_;
	GtkBox* _tmp5_;
	GtkBox* _tmp6_;
	GtkBox* _tmp7_;
	GtkBox* _tmp8_;
	GtkBox* _tmp9_;
	GtkButton* _tmp10_;
	GtkBox* _tmp11_;
	parent_class = G_OBJECT_CLASS (proton_plus_widgets_load_more_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TYPE_LOAD_MORE_ROW, ProtonPlusWidgetsLoadMoreRow);
	_tmp0_ = (GtkButton*) gtk_button_new_from_icon_name ("dots-symbolic");
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	proton_plus_widgets_load_more_row_set_load_button (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = self->priv->_load_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp2_, _ ("Load more"));
	_tmp3_ = self->priv->_load_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp3_, "flat");
	_tmp4_ = self->priv->_load_button;
	g_signal_connect_object (_tmp4_, "clicked", (GCallback) __proton_plus_widgets_load_more_row___lambda20__gtk_button_clicked, self, 0);
	_tmp5_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp5_);
	_tmp6_ = _tmp5_;
	proton_plus_widgets_load_more_row_set_suffix_box (self, _tmp6_);
	_g_object_unref0 (_tmp6_);
	_tmp7_ = self->priv->_suffix_box;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp7_, 10);
	_tmp8_ = self->priv->_suffix_box;
	gtk_widget_set_valign ((GtkWidget*) _tmp8_, GTK_ALIGN_CENTER);
	_tmp9_ = self->priv->_suffix_box;
	_tmp10_ = self->priv->_load_button;
	gtk_box_append (_tmp9_, (GtkWidget*) _tmp10_);
	adw_preferences_row_set_title ((AdwPreferencesRow*) self, _ ("Load more"));
	_tmp11_ = self->priv->_suffix_box;
	adw_action_row_add_suffix ((AdwActionRow*) self, (GtkWidget*) _tmp11_);
	return obj;
}

static void
proton_plus_widgets_load_more_row_class_init (ProtonPlusWidgetsLoadMoreRowClass * klass,
                                              gpointer klass_data)
{
	proton_plus_widgets_load_more_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsLoadMoreRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_load_more_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_load_more_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = proton_plus_widgets_load_more_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_load_more_row_finalize;
}

static void
proton_plus_widgets_load_more_row_instance_init (ProtonPlusWidgetsLoadMoreRow * self,
                                                 gpointer klass)
{
	self->priv = proton_plus_widgets_load_more_row_get_instance_private (self);
}

static void
proton_plus_widgets_load_more_row_finalize (GObject * obj)
{
	ProtonPlusWidgetsLoadMoreRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TYPE_LOAD_MORE_ROW, ProtonPlusWidgetsLoadMoreRow);
	_g_object_unref0 (self->priv->_load_button);
	_g_object_unref0 (self->priv->_suffix_box);
	G_OBJECT_CLASS (proton_plus_widgets_load_more_row_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_load_more_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsLoadMoreRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_load_more_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsLoadMoreRow), 0, (GInstanceInitFunc) proton_plus_widgets_load_more_row_instance_init, NULL };
	GType proton_plus_widgets_load_more_row_type_id;
	proton_plus_widgets_load_more_row_type_id = g_type_register_static (adw_action_row_get_type (), "ProtonPlusWidgetsLoadMoreRow", &g_define_type_info, 0);
	ProtonPlusWidgetsLoadMoreRow_private_offset = g_type_add_instance_private (proton_plus_widgets_load_more_row_type_id, sizeof (ProtonPlusWidgetsLoadMoreRowPrivate));
	return proton_plus_widgets_load_more_row_type_id;
}

GType
proton_plus_widgets_load_more_row_get_type (void)
{
	static volatile gsize proton_plus_widgets_load_more_row_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_load_more_row_type_id__once)) {
		GType proton_plus_widgets_load_more_row_type_id;
		proton_plus_widgets_load_more_row_type_id = proton_plus_widgets_load_more_row_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_load_more_row_type_id__once, proton_plus_widgets_load_more_row_type_id);
	}
	return proton_plus_widgets_load_more_row_type_id__once;
}

static void
_vala_proton_plus_widgets_load_more_row_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec)
{
	ProtonPlusWidgetsLoadMoreRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TYPE_LOAD_MORE_ROW, ProtonPlusWidgetsLoadMoreRow);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_load_more_row_set_property (GObject * object,
                                                      guint property_id,
                                                      const GValue * value,
                                                      GParamSpec * pspec)
{
	ProtonPlusWidgetsLoadMoreRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TYPE_LOAD_MORE_ROW, ProtonPlusWidgetsLoadMoreRow);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

