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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <adwaita.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_WIDGETS_TYPE_REACT_BUTTON (tuba_widgets_react_button_get_type ())
#define TUBA_WIDGETS_REACT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_REACT_BUTTON, TubaWidgetsReactButton))
#define TUBA_WIDGETS_REACT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_REACT_BUTTON, TubaWidgetsReactButtonClass))
#define TUBA_WIDGETS_IS_REACT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_REACT_BUTTON))
#define TUBA_WIDGETS_IS_REACT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_REACT_BUTTON))
#define TUBA_WIDGETS_REACT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_REACT_BUTTON, TubaWidgetsReactButtonClass))

typedef struct _TubaWidgetsReactButton TubaWidgetsReactButton;
typedef struct _TubaWidgetsReactButtonClass TubaWidgetsReactButtonClass;
typedef struct _TubaWidgetsReactButtonPrivate TubaWidgetsReactButtonPrivate;
enum  {
	TUBA_WIDGETS_REACT_BUTTON_0_PROPERTY,
	TUBA_WIDGETS_REACT_BUTTON_SHORTCODE_PROPERTY,
	TUBA_WIDGETS_REACT_BUTTON_HAS_REACTED_PROPERTY,
	TUBA_WIDGETS_REACT_BUTTON_REACTIONS_PROPERTY,
	TUBA_WIDGETS_REACT_BUTTON_NUM_PROPERTIES
};
static GParamSpec* tuba_widgets_react_button_properties[TUBA_WIDGETS_REACT_BUTTON_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (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_EMOJI_REACTION (tuba_api_emoji_reaction_get_type ())
#define TUBA_API_EMOJI_REACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_EMOJI_REACTION, TubaAPIEmojiReaction))
#define TUBA_API_EMOJI_REACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_EMOJI_REACTION, TubaAPIEmojiReactionClass))
#define TUBA_API_IS_EMOJI_REACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_EMOJI_REACTION))
#define TUBA_API_IS_EMOJI_REACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_EMOJI_REACTION))
#define TUBA_API_EMOJI_REACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_EMOJI_REACTION, TubaAPIEmojiReactionClass))

typedef struct _TubaAPIEmojiReaction TubaAPIEmojiReaction;
typedef struct _TubaAPIEmojiReactionClass TubaAPIEmojiReactionClass;

#define TUBA_WIDGETS_TYPE_EMOJI (tuba_widgets_emoji_get_type ())
#define TUBA_WIDGETS_EMOJI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_EMOJI, TubaWidgetsEmoji))
#define TUBA_WIDGETS_EMOJI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_EMOJI, TubaWidgetsEmojiClass))
#define TUBA_WIDGETS_IS_EMOJI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_EMOJI))
#define TUBA_WIDGETS_IS_EMOJI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_EMOJI))
#define TUBA_WIDGETS_EMOJI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_EMOJI, TubaWidgetsEmojiClass))

typedef struct _TubaWidgetsEmoji TubaWidgetsEmoji;
typedef struct _TubaWidgetsEmojiClass TubaWidgetsEmojiClass;
enum  {
	TUBA_WIDGETS_REACT_BUTTON_REACTION_TOGGLED_SIGNAL,
	TUBA_WIDGETS_REACT_BUTTON_REMOVED_SIGNAL,
	TUBA_WIDGETS_REACT_BUTTON_NUM_SIGNALS
};
static guint tuba_widgets_react_button_signals[TUBA_WIDGETS_REACT_BUTTON_NUM_SIGNALS] = {0};

struct _TubaWidgetsReactButton {
	GtkButton parent_instance;
	TubaWidgetsReactButtonPrivate * priv;
};

struct _TubaWidgetsReactButtonClass {
	GtkButtonClass parent_class;
};

struct _TubaWidgetsReactButtonPrivate {
	GtkLabel* reactions_label;
	gchar* _shortcode;
	gboolean _has_reacted;
	gint64 _reactions;
};

static gint TubaWidgetsReactButton_private_offset;
static gpointer tuba_widgets_react_button_parent_class = NULL;

VALA_EXTERN GType tuba_widgets_react_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsReactButton, 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_emoji_reaction_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIEmojiReaction, g_object_unref)
VALA_EXTERN TubaWidgetsReactButton* tuba_widgets_react_button_new (TubaAPIEmojiReaction* reaction);
VALA_EXTERN TubaWidgetsReactButton* tuba_widgets_react_button_construct (GType object_type,
                                                             TubaAPIEmojiReaction* reaction);
VALA_EXTERN const gchar* tuba_api_emoji_reaction_get_name (TubaAPIEmojiReaction* self);
static void tuba_widgets_react_button_set_shortcode (TubaWidgetsReactButton* self,
                                              const gchar* value);
VALA_EXTERN const gchar* tuba_api_emoji_reaction_get_url (TubaAPIEmojiReaction* self);
VALA_EXTERN TubaWidgetsEmoji* tuba_widgets_emoji_new (const gchar* emoji_url,
                                          const gchar* t_shortcode);
VALA_EXTERN TubaWidgetsEmoji* tuba_widgets_emoji_construct (GType object_type,
                                                const gchar* emoji_url,
                                                const gchar* t_shortcode);
VALA_EXTERN GType tuba_widgets_emoji_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsEmoji, g_object_unref)
VALA_EXTERN void tuba_widgets_react_button_update_reaction (TubaWidgetsReactButton* self,
                                                TubaAPIEmojiReaction* reaction);
static void tuba_widgets_react_button_on_clicked (TubaWidgetsReactButton* self);
static void _tuba_widgets_react_button_on_clicked_gtk_button_clicked (GtkButton* _sender,
                                                               gpointer self);
VALA_EXTERN gint64 tuba_api_emoji_reaction_get_count (TubaAPIEmojiReaction* self);
static void tuba_widgets_react_button_update_button_props (TubaWidgetsReactButton* self,
                                                    gboolean reacted);
VALA_EXTERN gboolean tuba_api_emoji_reaction_get_me (TubaAPIEmojiReaction* self);
VALA_EXTERN void tuba_widgets_react_button_set_reactions (TubaWidgetsReactButton* self,
                                              gint64 value);
VALA_EXTERN void tuba_widgets_react_button_update_reacted (TubaWidgetsReactButton* self,
                                               gboolean reacted);
VALA_EXTERN gint64 tuba_widgets_react_button_get_reactions (TubaWidgetsReactButton* self);
VALA_EXTERN const gchar* tuba_widgets_react_button_get_shortcode (TubaWidgetsReactButton* self);
VALA_EXTERN gboolean tuba_widgets_react_button_get_has_reacted (TubaWidgetsReactButton* self);
VALA_EXTERN void tuba_widgets_react_button_set_has_reacted (TubaWidgetsReactButton* self,
                                                gboolean value);
static void tuba_widgets_react_button_finalize (GObject * obj);
static GType tuba_widgets_react_button_get_type_once (void);
static void _vala_tuba_widgets_react_button_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec);
static void _vala_tuba_widgets_react_button_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec);

static inline gpointer
tuba_widgets_react_button_get_instance_private (TubaWidgetsReactButton* self)
{
	return G_STRUCT_MEMBER_P (self, TubaWidgetsReactButton_private_offset);
}

static void
_tuba_widgets_react_button_on_clicked_gtk_button_clicked (GtkButton* _sender,
                                                          gpointer self)
{
	tuba_widgets_react_button_on_clicked ((TubaWidgetsReactButton*) self);
}

TubaWidgetsReactButton*
tuba_widgets_react_button_construct (GType object_type,
                                     TubaAPIEmojiReaction* reaction)
{
	TubaWidgetsReactButton * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	GtkBox* badge = NULL;
	GtkBox* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	GtkLabel* _tmp19_;
	GtkBox* _tmp20_;
	GtkLabel* _tmp21_;
	GtkBox* _tmp22_;
	g_return_val_if_fail (reaction != NULL, NULL);
	self = (TubaWidgetsReactButton*) g_object_new (object_type, NULL);
	_tmp0_ = tuba_api_emoji_reaction_get_name (reaction);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup_printf (_ ("React with %s"), _tmp1_);
	_tmp3_ = _tmp2_;
	gtk_widget_set_tooltip_text ((GtkWidget*) self, _tmp3_);
	_g_free0 (_tmp3_);
	_tmp4_ = tuba_api_emoji_reaction_get_name (reaction);
	_tmp5_ = _tmp4_;
	tuba_widgets_react_button_set_shortcode (self, _tmp5_);
	_tmp6_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp6_);
	badge = _tmp6_;
	_tmp7_ = tuba_api_emoji_reaction_get_url (reaction);
	_tmp8_ = _tmp7_;
	if (_tmp8_ != NULL) {
		GtkBox* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		TubaWidgetsEmoji* _tmp12_;
		TubaWidgetsEmoji* _tmp13_;
		_tmp9_ = badge;
		_tmp10_ = tuba_api_emoji_reaction_get_url (reaction);
		_tmp11_ = _tmp10_;
		_tmp12_ = tuba_widgets_emoji_new (_tmp11_, NULL);
		g_object_ref_sink (_tmp12_);
		_tmp13_ = _tmp12_;
		gtk_box_append (_tmp9_, (GtkWidget*) _tmp13_);
		_g_object_unref0 (_tmp13_);
	} else {
		GtkBox* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		GtkLabel* _tmp17_;
		GtkLabel* _tmp18_;
		_tmp14_ = badge;
		_tmp15_ = tuba_api_emoji_reaction_get_name (reaction);
		_tmp16_ = _tmp15_;
		_tmp17_ = (GtkLabel*) gtk_label_new (_tmp16_);
		g_object_ref_sink (_tmp17_);
		_tmp18_ = _tmp17_;
		gtk_box_append (_tmp14_, (GtkWidget*) _tmp18_);
		_g_object_unref0 (_tmp18_);
	}
	_tmp19_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp19_);
	_g_object_unref0 (self->priv->reactions_label);
	self->priv->reactions_label = _tmp19_;
	_tmp20_ = badge;
	_tmp21_ = self->priv->reactions_label;
	gtk_box_append (_tmp20_, (GtkWidget*) _tmp21_);
	_tmp22_ = badge;
	gtk_button_set_child ((GtkButton*) self, (GtkWidget*) _tmp22_);
	tuba_widgets_react_button_update_reaction (self, reaction);
	g_signal_connect_object ((GtkButton*) self, "clicked", (GCallback) _tuba_widgets_react_button_on_clicked_gtk_button_clicked, self, 0);
	_g_object_unref0 (badge);
	return self;
}

TubaWidgetsReactButton*
tuba_widgets_react_button_new (TubaAPIEmojiReaction* reaction)
{
	return tuba_widgets_react_button_construct (TUBA_WIDGETS_TYPE_REACT_BUTTON, reaction);
}

void
tuba_widgets_react_button_update_reaction (TubaWidgetsReactButton* self,
                                           TubaAPIEmojiReaction* reaction)
{
	gint64 _tmp0_;
	gint64 _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gint64 _tmp4_;
	gint64 _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (reaction != NULL);
	_tmp0_ = tuba_api_emoji_reaction_get_count (reaction);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == ((gint64) 0)) {
		g_signal_emit (self, tuba_widgets_react_button_signals[TUBA_WIDGETS_REACT_BUTTON_REMOVED_SIGNAL], 0);
	}
	_tmp2_ = tuba_api_emoji_reaction_get_me (reaction);
	_tmp3_ = _tmp2_;
	tuba_widgets_react_button_update_button_props (self, _tmp3_);
	_tmp4_ = tuba_api_emoji_reaction_get_count (reaction);
	_tmp5_ = _tmp4_;
	tuba_widgets_react_button_set_reactions (self, _tmp5_);
}

void
tuba_widgets_react_button_update_reacted (TubaWidgetsReactButton* self,
                                          gboolean reacted)
{
	gint64 _tmp4_;
	gint64 _tmp5_;
	g_return_if_fail (self != NULL);
	if (reacted) {
		gint64 _tmp0_;
		gint64 _tmp1_;
		_tmp0_ = tuba_widgets_react_button_get_reactions (self);
		_tmp1_ = _tmp0_;
		tuba_widgets_react_button_set_reactions (self, _tmp1_ + 1);
	} else {
		gint64 _tmp2_;
		gint64 _tmp3_;
		_tmp2_ = tuba_widgets_react_button_get_reactions (self);
		_tmp3_ = _tmp2_;
		tuba_widgets_react_button_set_reactions (self, _tmp3_ - 1);
	}
	_tmp4_ = tuba_widgets_react_button_get_reactions (self);
	_tmp5_ = _tmp4_;
	if (_tmp5_ == ((gint64) 0)) {
		g_signal_emit (self, tuba_widgets_react_button_signals[TUBA_WIDGETS_REACT_BUTTON_REMOVED_SIGNAL], 0);
	}
	tuba_widgets_react_button_update_button_props (self, reacted);
}

static void
tuba_widgets_react_button_update_button_props (TubaWidgetsReactButton* self,
                                               gboolean reacted)
{
	g_return_if_fail (self != NULL);
	if (reacted) {
		gtk_widget_add_css_class ((GtkWidget*) self, "accent");
		gtk_accessible_update_state ((GtkAccessible*) self, GTK_ACCESSIBLE_STATE_PRESSED, GTK_ACCESSIBLE_TRISTATE_TRUE, -1, -1);
	} else {
		gtk_widget_remove_css_class ((GtkWidget*) self, "accent");
		gtk_accessible_update_state ((GtkAccessible*) self, GTK_ACCESSIBLE_STATE_PRESSED, GTK_ACCESSIBLE_TRISTATE_FALSE, -1, -1);
	}
	self->priv->_has_reacted = reacted;
}

static void
tuba_widgets_react_button_on_clicked (TubaWidgetsReactButton* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tuba_widgets_react_button_signals[TUBA_WIDGETS_REACT_BUTTON_REACTION_TOGGLED_SIGNAL], 0);
}

const gchar*
tuba_widgets_react_button_get_shortcode (TubaWidgetsReactButton* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_shortcode;
	result = _tmp0_;
	return result;
}

static void
tuba_widgets_react_button_set_shortcode (TubaWidgetsReactButton* self,
                                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_widgets_react_button_get_shortcode (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_shortcode);
		self->priv->_shortcode = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_widgets_react_button_properties[TUBA_WIDGETS_REACT_BUTTON_SHORTCODE_PROPERTY]);
	}
}

gboolean
tuba_widgets_react_button_get_has_reacted (TubaWidgetsReactButton* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_has_reacted;
	return result;
}

void
tuba_widgets_react_button_set_has_reacted (TubaWidgetsReactButton* self,
                                           gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_has_reacted = value;
	tuba_widgets_react_button_update_reacted (self, value);
	g_object_notify_by_pspec ((GObject *) self, tuba_widgets_react_button_properties[TUBA_WIDGETS_REACT_BUTTON_HAS_REACTED_PROPERTY]);
}

gint64
tuba_widgets_react_button_get_reactions (TubaWidgetsReactButton* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, -1LL);
	result = self->priv->_reactions;
	return result;
}

void
tuba_widgets_react_button_set_reactions (TubaWidgetsReactButton* self,
                                         gint64 value)
{
	GtkLabel* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	self->priv->_reactions = value;
	_tmp0_ = self->priv->reactions_label;
	_tmp1_ = g_strdup_printf ("%" G_GINT64_FORMAT, value);
	_tmp2_ = _tmp1_;
	gtk_label_set_label (_tmp0_, _tmp2_);
	_g_free0 (_tmp2_);
	g_object_notify_by_pspec ((GObject *) self, tuba_widgets_react_button_properties[TUBA_WIDGETS_REACT_BUTTON_REACTIONS_PROPERTY]);
}

static void
tuba_widgets_react_button_class_init (TubaWidgetsReactButtonClass * klass,
                                      gpointer klass_data)
{
	tuba_widgets_react_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaWidgetsReactButton_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_widgets_react_button_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_widgets_react_button_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_widgets_react_button_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_REACT_BUTTON_SHORTCODE_PROPERTY, tuba_widgets_react_button_properties[TUBA_WIDGETS_REACT_BUTTON_SHORTCODE_PROPERTY] = g_param_spec_string ("shortcode", "shortcode", "shortcode", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_REACT_BUTTON_HAS_REACTED_PROPERTY, tuba_widgets_react_button_properties[TUBA_WIDGETS_REACT_BUTTON_HAS_REACTED_PROPERTY] = g_param_spec_boolean ("has-reacted", "has-reacted", "has-reacted", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_REACT_BUTTON_REACTIONS_PROPERTY, tuba_widgets_react_button_properties[TUBA_WIDGETS_REACT_BUTTON_REACTIONS_PROPERTY] = g_param_spec_int64 ("reactions", "reactions", "reactions", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	tuba_widgets_react_button_signals[TUBA_WIDGETS_REACT_BUTTON_REACTION_TOGGLED_SIGNAL] = g_signal_new ("reaction-toggled", TUBA_WIDGETS_TYPE_REACT_BUTTON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	tuba_widgets_react_button_signals[TUBA_WIDGETS_REACT_BUTTON_REMOVED_SIGNAL] = g_signal_new ("removed", TUBA_WIDGETS_TYPE_REACT_BUTTON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_set_accessible_role (GTK_WIDGET_CLASS (klass), GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON);
}

static void
tuba_widgets_react_button_instance_init (TubaWidgetsReactButton * self,
                                         gpointer klass)
{
	self->priv = tuba_widgets_react_button_get_instance_private (self);
	self->priv->_has_reacted = FALSE;
	self->priv->_reactions = (gint64) 0;
}

static void
tuba_widgets_react_button_finalize (GObject * obj)
{
	TubaWidgetsReactButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_WIDGETS_TYPE_REACT_BUTTON, TubaWidgetsReactButton);
	_g_object_unref0 (self->priv->reactions_label);
	_g_free0 (self->priv->_shortcode);
	G_OBJECT_CLASS (tuba_widgets_react_button_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_widgets_react_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaWidgetsReactButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_widgets_react_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaWidgetsReactButton), 0, (GInstanceInitFunc) tuba_widgets_react_button_instance_init, NULL };
	GType tuba_widgets_react_button_type_id;
	tuba_widgets_react_button_type_id = g_type_register_static (gtk_button_get_type (), "TubaWidgetsReactButton", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaWidgetsReactButton_private_offset = g_type_add_instance_private (tuba_widgets_react_button_type_id, sizeof (TubaWidgetsReactButtonPrivate));
	return tuba_widgets_react_button_type_id;
}

GType
tuba_widgets_react_button_get_type (void)
{
	static GType tuba_widgets_react_button_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_widgets_react_button_type_id__once)) {
		GType tuba_widgets_react_button_type_id;
		tuba_widgets_react_button_type_id = tuba_widgets_react_button_get_type_once ();
		g_once_init_leave_pointer (&tuba_widgets_react_button_type_id__once, tuba_widgets_react_button_type_id);
	}
	return tuba_widgets_react_button_type_id__once;
}

static void
_vala_tuba_widgets_react_button_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec)
{
	TubaWidgetsReactButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_WIDGETS_TYPE_REACT_BUTTON, TubaWidgetsReactButton);
	switch (property_id) {
		case TUBA_WIDGETS_REACT_BUTTON_SHORTCODE_PROPERTY:
		g_value_set_string (value, tuba_widgets_react_button_get_shortcode (self));
		break;
		case TUBA_WIDGETS_REACT_BUTTON_HAS_REACTED_PROPERTY:
		g_value_set_boolean (value, tuba_widgets_react_button_get_has_reacted (self));
		break;
		case TUBA_WIDGETS_REACT_BUTTON_REACTIONS_PROPERTY:
		g_value_set_int64 (value, tuba_widgets_react_button_get_reactions (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_widgets_react_button_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec)
{
	TubaWidgetsReactButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_WIDGETS_TYPE_REACT_BUTTON, TubaWidgetsReactButton);
	switch (property_id) {
		case TUBA_WIDGETS_REACT_BUTTON_SHORTCODE_PROPERTY:
		tuba_widgets_react_button_set_shortcode (self, g_value_get_string (value));
		break;
		case TUBA_WIDGETS_REACT_BUTTON_HAS_REACTED_PROPERTY:
		tuba_widgets_react_button_set_has_reacted (self, g_value_get_boolean (value));
		break;
		case TUBA_WIDGETS_REACT_BUTTON_REACTIONS_PROPERTY:
		tuba_widgets_react_button_set_reactions (self, g_value_get_int64 (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

