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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <adwaita.h>
#include <stdlib.h>
#include <string.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_WIDGETS_TYPE_STATUS_ACTION_BUTTON (tuba_widgets_status_action_button_get_type ())
#define TUBA_WIDGETS_STATUS_ACTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButton))
#define TUBA_WIDGETS_STATUS_ACTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButtonClass))
#define TUBA_WIDGETS_IS_STATUS_ACTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON))
#define TUBA_WIDGETS_IS_STATUS_ACTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON))
#define TUBA_WIDGETS_STATUS_ACTION_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButtonClass))

typedef struct _TubaWidgetsStatusActionButton TubaWidgetsStatusActionButton;
typedef struct _TubaWidgetsStatusActionButtonClass TubaWidgetsStatusActionButtonClass;
typedef struct _TubaWidgetsStatusActionButtonPrivate TubaWidgetsStatusActionButtonPrivate;
enum  {
	TUBA_WIDGETS_STATUS_ACTION_BUTTON_0_PROPERTY,
	TUBA_WIDGETS_STATUS_ACTION_BUTTON_CONTENT_PROPERTY,
	TUBA_WIDGETS_STATUS_ACTION_BUTTON_DEFAULT_ICON_NAME_PROPERTY,
	TUBA_WIDGETS_STATUS_ACTION_BUTTON_ACTIVE_ICON_NAME_PROPERTY,
	TUBA_WIDGETS_STATUS_ACTION_BUTTON_WORKING_PROPERTY,
	TUBA_WIDGETS_STATUS_ACTION_BUTTON_SHOW_COUNTS_PROPERTY,
	TUBA_WIDGETS_STATUS_ACTION_BUTTON_SMALLER_PROPERTY,
	TUBA_WIDGETS_STATUS_ACTION_BUTTON_AMOUNT_PROPERTY,
	TUBA_WIDGETS_STATUS_ACTION_BUTTON_ACTIVE_PROPERTY,
	TUBA_WIDGETS_STATUS_ACTION_BUTTON_NUM_PROPERTIES
};
static GParamSpec* tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_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))

struct _TubaWidgetsStatusActionButton {
	GtkButton parent_instance;
	TubaWidgetsStatusActionButtonPrivate * priv;
};

struct _TubaWidgetsStatusActionButtonClass {
	GtkButtonClass parent_class;
};

struct _TubaWidgetsStatusActionButtonPrivate {
	AdwButtonContent* _content;
	gchar* _default_icon_name;
	gchar* _active_icon_name;
	gboolean _working;
	gboolean _show_counts;
	gboolean _smaller;
	gint64 _amount;
	gboolean _active;
};

static gint TubaWidgetsStatusActionButton_private_offset;
static gpointer tuba_widgets_status_action_button_parent_class = NULL;

VALA_EXTERN GType tuba_widgets_status_action_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsStatusActionButton, g_object_unref)
static void tuba_widgets_status_action_button_update_button_style (TubaWidgetsStatusActionButton* self,
                                                            gboolean value);
VALA_EXTERN const gchar* tuba_widgets_status_action_button_get_active_icon_name (TubaWidgetsStatusActionButton* self);
VALA_EXTERN const gchar* tuba_widgets_status_action_button_get_default_icon_name (TubaWidgetsStatusActionButton* self);
VALA_EXTERN AdwButtonContent* tuba_widgets_status_action_button_get_content (TubaWidgetsStatusActionButton* self);
static void tuba_widgets_status_action_button_update_button_content (TubaWidgetsStatusActionButton* self,
                                                              gint64 new_value);
VALA_EXTERN gboolean tuba_widgets_status_action_button_get_show_counts (TubaWidgetsStatusActionButton* self);
VALA_EXTERN gchar* tuba_utils_units_shorten (gint64 unit);
VALA_EXTERN gboolean tuba_widgets_status_action_button_get_smaller (TubaWidgetsStatusActionButton* self);
VALA_EXTERN void tuba_widgets_status_action_button_block_clicked (TubaWidgetsStatusActionButton* self);
static void tuba_widgets_status_action_button_set_working (TubaWidgetsStatusActionButton* self,
                                                    gboolean value);
VALA_EXTERN void tuba_widgets_status_action_button_unblock_clicked (TubaWidgetsStatusActionButton* self);
VALA_EXTERN TubaWidgetsStatusActionButton* tuba_widgets_status_action_button_new_with_icon_name (const gchar* icon_name);
VALA_EXTERN TubaWidgetsStatusActionButton* tuba_widgets_status_action_button_construct_with_icon_name (GType object_type,
                                                                                           const gchar* icon_name);
VALA_EXTERN TubaWidgetsStatusActionButton* tuba_widgets_status_action_button_new (void);
VALA_EXTERN TubaWidgetsStatusActionButton* tuba_widgets_status_action_button_construct (GType object_type);
VALA_EXTERN void tuba_widgets_status_action_button_set_content (TubaWidgetsStatusActionButton* self,
                                                    AdwButtonContent* value);
VALA_EXTERN void tuba_widgets_status_action_button_set_default_icon_name (TubaWidgetsStatusActionButton* self,
                                                              const gchar* value);
VALA_EXTERN gboolean tuba_widgets_status_action_button_get_active (TubaWidgetsStatusActionButton* self);
VALA_EXTERN void tuba_widgets_status_action_button_set_active_icon_name (TubaWidgetsStatusActionButton* self,
                                                             const gchar* value);
VALA_EXTERN gboolean tuba_widgets_status_action_button_get_working (TubaWidgetsStatusActionButton* self);
VALA_EXTERN void tuba_widgets_status_action_button_set_show_counts (TubaWidgetsStatusActionButton* self,
                                                        gboolean value);
VALA_EXTERN void tuba_widgets_status_action_button_set_smaller (TubaWidgetsStatusActionButton* self,
                                                    gboolean value);
VALA_EXTERN gint64 tuba_widgets_status_action_button_get_amount (TubaWidgetsStatusActionButton* self);
VALA_EXTERN void tuba_widgets_status_action_button_set_amount (TubaWidgetsStatusActionButton* self,
                                                   gint64 value);
VALA_EXTERN void tuba_widgets_status_action_button_set_active (TubaWidgetsStatusActionButton* self,
                                                   gboolean value);
static GObject * tuba_widgets_status_action_button_constructor (GType type,
                                                         guint n_construct_properties,
                                                         GObjectConstructParam * construct_properties);
static void tuba_widgets_status_action_button_finalize (GObject * obj);
static GType tuba_widgets_status_action_button_get_type_once (void);
static void _vala_tuba_widgets_status_action_button_get_property (GObject * object,
                                                           guint property_id,
                                                           GValue * value,
                                                           GParamSpec * pspec);
static void _vala_tuba_widgets_status_action_button_set_property (GObject * object,
                                                           guint property_id,
                                                           const GValue * value,
                                                           GParamSpec * pspec);

static inline gpointer
tuba_widgets_status_action_button_get_instance_private (TubaWidgetsStatusActionButton* self)
{
	return G_STRUCT_MEMBER_P (self, TubaWidgetsStatusActionButton_private_offset);
}

static void
tuba_widgets_status_action_button_update_button_style (TubaWidgetsStatusActionButton* self,
                                                       gboolean value)
{
	g_return_if_fail (self != NULL);
	if (value) {
		const gchar* _tmp0_ = NULL;
		const gchar* _tmp1_;
		AdwButtonContent* _tmp4_;
		gtk_widget_remove_css_class ((GtkWidget*) self, "flat");
		gtk_widget_add_css_class ((GtkWidget*) self, "enabled");
		_tmp1_ = self->priv->_active_icon_name;
		_tmp0_ = _tmp1_;
		if (_tmp0_ == NULL) {
			const gchar* _tmp2_;
			const gchar* _tmp3_;
			_tmp2_ = tuba_widgets_status_action_button_get_default_icon_name (self);
			_tmp3_ = _tmp2_;
			_tmp0_ = _tmp3_;
		}
		_tmp4_ = self->priv->_content;
		adw_button_content_set_icon_name (_tmp4_, _tmp0_);
		gtk_accessible_update_state ((GtkAccessible*) self, GTK_ACCESSIBLE_STATE_PRESSED, GTK_ACCESSIBLE_TRISTATE_TRUE, -1, -1);
	} else {
		AdwButtonContent* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		gtk_widget_add_css_class ((GtkWidget*) self, "flat");
		gtk_widget_remove_css_class ((GtkWidget*) self, "enabled");
		_tmp5_ = self->priv->_content;
		_tmp6_ = tuba_widgets_status_action_button_get_default_icon_name (self);
		_tmp7_ = _tmp6_;
		adw_button_content_set_icon_name (_tmp5_, _tmp7_);
		gtk_accessible_update_state ((GtkAccessible*) self, GTK_ACCESSIBLE_STATE_PRESSED, GTK_ACCESSIBLE_TRISTATE_FALSE, -1, -1);
	}
}

static void
tuba_widgets_status_action_button_update_button_content (TubaWidgetsStatusActionButton* self,
                                                         gint64 new_value)
{
	gboolean _tmp0_ = FALSE;
	AdwButtonContent* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gint _tmp8_ = 0;
	gboolean _tmp9_;
	gboolean _tmp10_;
	AdwButtonContent* _tmp11_;
	gint _tmp12_ = 0;
	gboolean _tmp13_;
	gboolean _tmp14_;
	AdwButtonContent* _tmp15_;
	g_return_if_fail (self != NULL);
	if (new_value == ((gint64) 0)) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp1_;
		_tmp1_ = self->priv->_show_counts;
		_tmp0_ = !_tmp1_;
	}
	if (_tmp0_) {
		AdwButtonContent* _tmp2_;
		AdwButtonContent* _tmp3_;
		AdwButtonContent* _tmp4_;
		_tmp2_ = self->priv->_content;
		adw_button_content_set_label (_tmp2_, "");
		_tmp3_ = self->priv->_content;
		gtk_widget_set_margin_start ((GtkWidget*) _tmp3_, 0);
		_tmp4_ = self->priv->_content;
		gtk_widget_set_margin_end ((GtkWidget*) _tmp4_, 0);
		return;
	}
	_tmp5_ = self->priv->_content;
	_tmp6_ = tuba_utils_units_shorten (new_value);
	_tmp7_ = _tmp6_;
	adw_button_content_set_label (_tmp5_, _tmp7_);
	_g_free0 (_tmp7_);
	_tmp9_ = tuba_widgets_status_action_button_get_smaller (self);
	_tmp10_ = _tmp9_;
	if (_tmp10_) {
		_tmp8_ = 6;
	} else {
		_tmp8_ = 12;
	}
	_tmp11_ = self->priv->_content;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp11_, _tmp8_);
	_tmp13_ = tuba_widgets_status_action_button_get_smaller (self);
	_tmp14_ = _tmp13_;
	if (_tmp14_) {
		_tmp12_ = 4;
	} else {
		_tmp12_ = 9;
	}
	_tmp15_ = self->priv->_content;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp15_, _tmp12_);
}

void
tuba_widgets_status_action_button_block_clicked (TubaWidgetsStatusActionButton* self)
{
	g_return_if_fail (self != NULL);
	tuba_widgets_status_action_button_set_working (self, TRUE);
}

void
tuba_widgets_status_action_button_unblock_clicked (TubaWidgetsStatusActionButton* self)
{
	g_return_if_fail (self != NULL);
	tuba_widgets_status_action_button_set_working (self, FALSE);
}

TubaWidgetsStatusActionButton*
tuba_widgets_status_action_button_construct_with_icon_name (GType object_type,
                                                            const gchar* icon_name)
{
	TubaWidgetsStatusActionButton * self = NULL;
	g_return_val_if_fail (icon_name != NULL, NULL);
	self = (TubaWidgetsStatusActionButton*) g_object_new (object_type, "default-icon-name", icon_name, NULL);
	return self;
}

TubaWidgetsStatusActionButton*
tuba_widgets_status_action_button_new_with_icon_name (const gchar* icon_name)
{
	return tuba_widgets_status_action_button_construct_with_icon_name (TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, icon_name);
}

TubaWidgetsStatusActionButton*
tuba_widgets_status_action_button_construct (GType object_type)
{
	TubaWidgetsStatusActionButton * self = NULL;
	self = (TubaWidgetsStatusActionButton*) g_object_new (object_type, NULL);
	return self;
}

TubaWidgetsStatusActionButton*
tuba_widgets_status_action_button_new (void)
{
	return tuba_widgets_status_action_button_construct (TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON);
}

AdwButtonContent*
tuba_widgets_status_action_button_get_content (TubaWidgetsStatusActionButton* self)
{
	AdwButtonContent* result;
	AdwButtonContent* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_content;
	result = _tmp0_;
	return result;
}

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

void
tuba_widgets_status_action_button_set_content (TubaWidgetsStatusActionButton* self,
                                               AdwButtonContent* value)
{
	AdwButtonContent* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_widgets_status_action_button_get_content (self);
	if (old_value != value) {
		AdwButtonContent* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_content);
		self->priv->_content = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_CONTENT_PROPERTY]);
	}
}

const gchar*
tuba_widgets_status_action_button_get_default_icon_name (TubaWidgetsStatusActionButton* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_default_icon_name;
	result = _tmp0_;
	return result;
}

void
tuba_widgets_status_action_button_set_default_icon_name (TubaWidgetsStatusActionButton* self,
                                                         const gchar* value)
{
	gchar* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_default_icon_name);
	self->priv->_default_icon_name = _tmp0_;
	_tmp1_ = tuba_widgets_status_action_button_get_active (self);
	_tmp2_ = _tmp1_;
	tuba_widgets_status_action_button_update_button_style (self, _tmp2_);
	g_object_notify_by_pspec ((GObject *) self, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_DEFAULT_ICON_NAME_PROPERTY]);
}

const gchar*
tuba_widgets_status_action_button_get_active_icon_name (TubaWidgetsStatusActionButton* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_active_icon_name;
	result = _tmp0_;
	return result;
}

void
tuba_widgets_status_action_button_set_active_icon_name (TubaWidgetsStatusActionButton* self,
                                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_widgets_status_action_button_get_active_icon_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_active_icon_name);
		self->priv->_active_icon_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_ACTIVE_ICON_NAME_PROPERTY]);
	}
}

gboolean
tuba_widgets_status_action_button_get_working (TubaWidgetsStatusActionButton* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_working;
	return result;
}

static void
tuba_widgets_status_action_button_set_working (TubaWidgetsStatusActionButton* self,
                                               gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_widgets_status_action_button_get_working (self);
	if (old_value != value) {
		self->priv->_working = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_WORKING_PROPERTY]);
	}
}

gboolean
tuba_widgets_status_action_button_get_show_counts (TubaWidgetsStatusActionButton* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_counts;
	return result;
}

void
tuba_widgets_status_action_button_set_show_counts (TubaWidgetsStatusActionButton* self,
                                                   gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_widgets_status_action_button_get_show_counts (self);
	if (old_value != value) {
		self->priv->_show_counts = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_SHOW_COUNTS_PROPERTY]);
	}
}

gboolean
tuba_widgets_status_action_button_get_smaller (TubaWidgetsStatusActionButton* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_smaller;
	return result;
}

void
tuba_widgets_status_action_button_set_smaller (TubaWidgetsStatusActionButton* self,
                                               gboolean value)
{
	g_return_if_fail (self != NULL);
	if (self->priv->_smaller != value) {
		gint64 _tmp0_;
		gint64 _tmp1_;
		self->priv->_smaller = value;
		_tmp0_ = tuba_widgets_status_action_button_get_amount (self);
		_tmp1_ = _tmp0_;
		tuba_widgets_status_action_button_update_button_content (self, _tmp1_);
	}
	g_object_notify_by_pspec ((GObject *) self, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_SMALLER_PROPERTY]);
}

gint64
tuba_widgets_status_action_button_get_amount (TubaWidgetsStatusActionButton* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, -1LL);
	result = self->priv->_amount;
	return result;
}

void
tuba_widgets_status_action_button_set_amount (TubaWidgetsStatusActionButton* self,
                                              gint64 value)
{
	g_return_if_fail (self != NULL);
	self->priv->_amount = value;
	tuba_widgets_status_action_button_update_button_content (self, self->priv->_amount);
	g_object_notify_by_pspec ((GObject *) self, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_AMOUNT_PROPERTY]);
}

gboolean
tuba_widgets_status_action_button_get_active (TubaWidgetsStatusActionButton* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_active;
	return result;
}

void
tuba_widgets_status_action_button_set_active (TubaWidgetsStatusActionButton* self,
                                              gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_active = value;
	tuba_widgets_status_action_button_update_button_style (self, value);
	g_object_notify_by_pspec ((GObject *) self, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_ACTIVE_PROPERTY]);
}

static GObject *
tuba_widgets_status_action_button_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaWidgetsStatusActionButton * self;
	AdwButtonContent* _tmp0_;
	AdwButtonContent* _tmp1_;
	AdwButtonContent* _tmp2_;
	parent_class = G_OBJECT_CLASS (tuba_widgets_status_action_button_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButton);
	_tmp0_ = (AdwButtonContent*) adw_button_content_new ();
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	tuba_widgets_status_action_button_set_content (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = self->priv->_content;
	gtk_button_set_child ((GtkButton*) self, (GtkWidget*) _tmp2_);
	return obj;
}

static void
tuba_widgets_status_action_button_class_init (TubaWidgetsStatusActionButtonClass * klass,
                                              gpointer klass_data)
{
	tuba_widgets_status_action_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaWidgetsStatusActionButton_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_widgets_status_action_button_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_widgets_status_action_button_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_widgets_status_action_button_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_widgets_status_action_button_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_STATUS_ACTION_BUTTON_CONTENT_PROPERTY, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_CONTENT_PROPERTY] = g_param_spec_object ("content", "content", "content", adw_button_content_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_STATUS_ACTION_BUTTON_DEFAULT_ICON_NAME_PROPERTY, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_DEFAULT_ICON_NAME_PROPERTY] = g_param_spec_string ("default-icon-name", "default-icon-name", "default-icon-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_STATUS_ACTION_BUTTON_ACTIVE_ICON_NAME_PROPERTY, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_ACTIVE_ICON_NAME_PROPERTY] = g_param_spec_string ("active-icon-name", "active-icon-name", "active-icon-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_STATUS_ACTION_BUTTON_WORKING_PROPERTY, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_WORKING_PROPERTY] = g_param_spec_boolean ("working", "working", "working", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_STATUS_ACTION_BUTTON_SHOW_COUNTS_PROPERTY, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_SHOW_COUNTS_PROPERTY] = g_param_spec_boolean ("show-counts", "show-counts", "show-counts", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_STATUS_ACTION_BUTTON_SMALLER_PROPERTY, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_SMALLER_PROPERTY] = g_param_spec_boolean ("smaller", "smaller", "smaller", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_STATUS_ACTION_BUTTON_AMOUNT_PROPERTY, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_AMOUNT_PROPERTY] = g_param_spec_int64 ("amount", "amount", "amount", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_STATUS_ACTION_BUTTON_ACTIVE_PROPERTY, tuba_widgets_status_action_button_properties[TUBA_WIDGETS_STATUS_ACTION_BUTTON_ACTIVE_PROPERTY] = g_param_spec_boolean ("active", "active", "active", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_accessible_role (GTK_WIDGET_CLASS (klass), GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON);
}

static void
tuba_widgets_status_action_button_instance_init (TubaWidgetsStatusActionButton * self,
                                                 gpointer klass)
{
	gchar* _tmp0_;
	self->priv = tuba_widgets_status_action_button_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_default_icon_name = _tmp0_;
	self->priv->_active_icon_name = NULL;
	self->priv->_working = FALSE;
	self->priv->_show_counts = TRUE;
	self->priv->_smaller = FALSE;
	self->priv->_amount = (gint64) 0;
	self->priv->_active = FALSE;
}

static void
tuba_widgets_status_action_button_finalize (GObject * obj)
{
	TubaWidgetsStatusActionButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButton);
	_g_object_unref0 (self->priv->_content);
	_g_free0 (self->priv->_default_icon_name);
	_g_free0 (self->priv->_active_icon_name);
	G_OBJECT_CLASS (tuba_widgets_status_action_button_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_widgets_status_action_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaWidgetsStatusActionButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_widgets_status_action_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaWidgetsStatusActionButton), 0, (GInstanceInitFunc) tuba_widgets_status_action_button_instance_init, NULL };
	GType tuba_widgets_status_action_button_type_id;
	tuba_widgets_status_action_button_type_id = g_type_register_static (gtk_button_get_type (), "TubaWidgetsStatusActionButton", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaWidgetsStatusActionButton_private_offset = g_type_add_instance_private (tuba_widgets_status_action_button_type_id, sizeof (TubaWidgetsStatusActionButtonPrivate));
	return tuba_widgets_status_action_button_type_id;
}

GType
tuba_widgets_status_action_button_get_type (void)
{
	static GType tuba_widgets_status_action_button_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_widgets_status_action_button_type_id__once)) {
		GType tuba_widgets_status_action_button_type_id;
		tuba_widgets_status_action_button_type_id = tuba_widgets_status_action_button_get_type_once ();
		g_once_init_leave_pointer (&tuba_widgets_status_action_button_type_id__once, tuba_widgets_status_action_button_type_id);
	}
	return tuba_widgets_status_action_button_type_id__once;
}

static void
_vala_tuba_widgets_status_action_button_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec)
{
	TubaWidgetsStatusActionButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButton);
	switch (property_id) {
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_CONTENT_PROPERTY:
		g_value_set_object (value, tuba_widgets_status_action_button_get_content (self));
		break;
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_DEFAULT_ICON_NAME_PROPERTY:
		g_value_set_string (value, tuba_widgets_status_action_button_get_default_icon_name (self));
		break;
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_ACTIVE_ICON_NAME_PROPERTY:
		g_value_set_string (value, tuba_widgets_status_action_button_get_active_icon_name (self));
		break;
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_WORKING_PROPERTY:
		g_value_set_boolean (value, tuba_widgets_status_action_button_get_working (self));
		break;
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_SHOW_COUNTS_PROPERTY:
		g_value_set_boolean (value, tuba_widgets_status_action_button_get_show_counts (self));
		break;
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_SMALLER_PROPERTY:
		g_value_set_boolean (value, tuba_widgets_status_action_button_get_smaller (self));
		break;
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_AMOUNT_PROPERTY:
		g_value_set_int64 (value, tuba_widgets_status_action_button_get_amount (self));
		break;
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_ACTIVE_PROPERTY:
		g_value_set_boolean (value, tuba_widgets_status_action_button_get_active (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_widgets_status_action_button_set_property (GObject * object,
                                                      guint property_id,
                                                      const GValue * value,
                                                      GParamSpec * pspec)
{
	TubaWidgetsStatusActionButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButton);
	switch (property_id) {
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_CONTENT_PROPERTY:
		tuba_widgets_status_action_button_set_content (self, g_value_get_object (value));
		break;
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_DEFAULT_ICON_NAME_PROPERTY:
		tuba_widgets_status_action_button_set_default_icon_name (self, g_value_get_string (value));
		break;
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_ACTIVE_ICON_NAME_PROPERTY:
		tuba_widgets_status_action_button_set_active_icon_name (self, g_value_get_string (value));
		break;
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_WORKING_PROPERTY:
		tuba_widgets_status_action_button_set_working (self, g_value_get_boolean (value));
		break;
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_SHOW_COUNTS_PROPERTY:
		tuba_widgets_status_action_button_set_show_counts (self, g_value_get_boolean (value));
		break;
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_SMALLER_PROPERTY:
		tuba_widgets_status_action_button_set_smaller (self, g_value_get_boolean (value));
		break;
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_AMOUNT_PROPERTY:
		tuba_widgets_status_action_button_set_amount (self, g_value_get_int64 (value));
		break;
		case TUBA_WIDGETS_STATUS_ACTION_BUTTON_ACTIVE_PROPERTY:
		tuba_widgets_status_action_button_set_active (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

