/* slider.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from slider.vala, do not modify */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <json-glib/json-glib.h>
#include <gio/gio.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 SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET (sway_notification_center_widgets_base_widget_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidgetClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidgetClass))

typedef struct _SwayNotificationCenterWidgetsBaseWidget SwayNotificationCenterWidgetsBaseWidget;
typedef struct _SwayNotificationCenterWidgetsBaseWidgetClass SwayNotificationCenterWidgetsBaseWidgetClass;
typedef struct _SwayNotificationCenterWidgetsBaseWidgetPrivate SwayNotificationCenterWidgetsBaseWidgetPrivate;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER (sway_notification_center_widgets_slider_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_SLIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER, SwayNotificationCenterWidgetsSlider))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_SLIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER, SwayNotificationCenterWidgetsSliderClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_SLIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_SLIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_SLIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER, SwayNotificationCenterWidgetsSliderClass))

typedef struct _SwayNotificationCenterWidgetsSlider SwayNotificationCenterWidgetsSlider;
typedef struct _SwayNotificationCenterWidgetsSliderClass SwayNotificationCenterWidgetsSliderClass;
typedef struct _SwayNotificationCenterWidgetsSliderPrivate SwayNotificationCenterWidgetsSliderPrivate;
enum  {
	SWAY_NOTIFICATION_CENTER_WIDGETS_SLIDER_0_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_SLIDER_WIDGET_NAME_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_SLIDER_NUM_PROPERTIES
};
static GParamSpec* sway_notification_center_widgets_slider_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_SLIDER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL)))
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _SwayNotificationCenterWidgetsSliderQueueSetData SwayNotificationCenterWidgetsSliderQueueSetData;
typedef struct _SwayNotificationCenterWidgetsSliderQueueGetData SwayNotificationCenterWidgetsSliderQueueGetData;
typedef struct _SwayNotificationCenterWidgetsSliderOnUpdateData SwayNotificationCenterWidgetsSliderOnUpdateData;

struct _SwayNotificationCenterWidgetsBaseWidget {
	GtkBox parent_instance;
	SwayNotificationCenterWidgetsBaseWidgetPrivate * priv;
};

struct _SwayNotificationCenterWidgetsBaseWidgetClass {
	GtkBoxClass parent_class;
	void (*on_cc_visibility_change) (SwayNotificationCenterWidgetsBaseWidget* self, gboolean value);
	const gchar* (*get_widget_name) (SwayNotificationCenterWidgetsBaseWidget* self);
};

struct _SwayNotificationCenterWidgetsSlider {
	SwayNotificationCenterWidgetsBaseWidget parent_instance;
	SwayNotificationCenterWidgetsSliderPrivate * priv;
};

struct _SwayNotificationCenterWidgetsSliderClass {
	SwayNotificationCenterWidgetsBaseWidgetClass parent_class;
};

struct _SwayNotificationCenterWidgetsSliderPrivate {
	GtkLabel* label_widget;
	GtkScale* slider;
	gdouble min_limit;
	gdouble max_limit;
	gdouble* last_set;
	gboolean cmd_ing;
	gchar* cmd_setter;
	gchar* cmd_getter;
};

struct _SwayNotificationCenterWidgetsSliderQueueSetData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SwayNotificationCenterWidgetsSlider* self;
	gdouble value;
	gchar* cmd;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar** _tmp6_;
	gchar** _tmp7_;
	gint _tmp7__length1;
	gdouble* _tmp8_;
	gdouble* _tmp9_;
};

struct _SwayNotificationCenterWidgetsSliderQueueGetData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SwayNotificationCenterWidgetsSlider* self;
	gint retry;
	gchar* value;
	gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	gchar* _tmp5_;
};

struct _SwayNotificationCenterWidgetsSliderOnUpdateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SwayNotificationCenterWidgetsSlider* self;
	const gchar* _tmp0_;
	gchar* value_str;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gdouble value;
	const gchar* _tmp3_;
	gboolean _tmp4_;
	gdouble* _tmp5_;
	GtkScale* _tmp6_;
};

static gint SwayNotificationCenterWidgetsSlider_private_offset;
static gpointer sway_notification_center_widgets_slider_parent_class = NULL;

VALA_EXTERN GType sway_notification_center_widgets_base_widget_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsBaseWidget, g_object_unref)
VALA_EXTERN GType sway_notification_center_widgets_slider_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsSlider, g_object_unref)
VALA_EXTERN void sway_notification_center_widgets_base_widget_on_cc_visibility_change (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                           gboolean value);
VALA_EXTERN const gchar* sway_notification_center_widgets_base_widget_get_widget_name (SwayNotificationCenterWidgetsBaseWidget* self);
VALA_EXTERN SwayNotificationCenterWidgetsSlider* sway_notification_center_widgets_slider_new (const gchar* suffix);
VALA_EXTERN SwayNotificationCenterWidgetsSlider* sway_notification_center_widgets_slider_construct (GType object_type,
                                                                                        const gchar* suffix);
VALA_EXTERN SwayNotificationCenterWidgetsBaseWidget* sway_notification_center_widgets_base_widget_construct (GType object_type,
                                                                                                 const gchar* suffix);
static gint* _int_dup (gint* self);
VALA_EXTERN JsonObject* sway_notification_center_widgets_base_widget_get_config (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                     GtkWidget* widget);
VALA_EXTERN gpointer sway_notification_center_widgets_base_widget_get_prop (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                GType t_type,
                                                                GBoxedCopyFunc t_dup_func,
                                                                GDestroyNotify t_destroy_func,
                                                                JsonObject* config,
                                                                const gchar* value_key,
                                                                gboolean* found);
static void __lambda69_ (SwayNotificationCenterWidgetsSlider* self);
static gboolean _double_equal (const gdouble * s1,
                        const gdouble * s2);
static gdouble* _double_dup (gdouble* self);
VALA_EXTERN void sway_notification_center_widgets_slider_queue_set (SwayNotificationCenterWidgetsSlider* self,
                                                        gdouble value,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_);
VALA_EXTERN void sway_notification_center_widgets_slider_queue_set_finish (SwayNotificationCenterWidgetsSlider* self,
                                                               GAsyncResult* _res_);
static void ___lambda69__gtk_range_value_changed (GtkRange* _sender,
                                           gpointer self);
VALA_EXTERN gchar* sway_notification_center_widgets_slider_expand_cmd (SwayNotificationCenterWidgetsSlider* self,
                                                           const gchar* cmd,
                                                           const gchar* regex,
                                                           const gchar* value);
static void sway_notification_center_widgets_slider_queue_set_data_free (gpointer _data);
static gboolean sway_notification_center_widgets_slider_queue_set_co (SwayNotificationCenterWidgetsSliderQueueSetData* _data_);
VALA_EXTERN void sway_notification_center_functions_execute_command (const gchar* cmd,
                                                         gchar** env_additions,
                                                         gint env_additions_length1,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
VALA_EXTERN gboolean sway_notification_center_functions_execute_command_finish (GAsyncResult* _res_,
                                                                    gchar** msg);
static void sway_notification_center_widgets_slider_queue_set_ready (GObject* source_object,
                                                              GAsyncResult* _res_,
                                                              gpointer _user_data_);
static void sway_notification_center_widgets_slider_queue_get_data_free (gpointer _data);
VALA_EXTERN void sway_notification_center_widgets_slider_queue_get (SwayNotificationCenterWidgetsSlider* self,
                                                        gint retry,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_);
VALA_EXTERN void sway_notification_center_widgets_slider_queue_get_finish (SwayNotificationCenterWidgetsSlider* self,
                                                               GAsyncResult* _res_,
                                                               gchar** value);
static gboolean sway_notification_center_widgets_slider_queue_get_co (SwayNotificationCenterWidgetsSliderQueueGetData* _data_);
static void sway_notification_center_widgets_slider_queue_get_ready (GObject* source_object,
                                                              GAsyncResult* _res_,
                                                              gpointer _user_data_);
static void sway_notification_center_widgets_slider_on_update_data_free (gpointer _data);
VALA_EXTERN void sway_notification_center_widgets_slider_on_update (SwayNotificationCenterWidgetsSlider* self,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_);
VALA_EXTERN void sway_notification_center_widgets_slider_on_update_finish (SwayNotificationCenterWidgetsSlider* self,
                                                               GAsyncResult* _res_);
static gboolean sway_notification_center_widgets_slider_on_update_co (SwayNotificationCenterWidgetsSliderOnUpdateData* _data_);
static void sway_notification_center_widgets_slider_on_update_ready (GObject* source_object,
                                                              GAsyncResult* _res_,
                                                              gpointer _user_data_);
static void sway_notification_center_widgets_slider_real_on_cc_visibility_change (SwayNotificationCenterWidgetsBaseWidget* base,
                                                                           gboolean value);
static void sway_notification_center_widgets_slider_finalize (GObject * obj);
static GType sway_notification_center_widgets_slider_get_type_once (void);
static void _vala_sway_notification_center_widgets_slider_get_property (GObject * object,
                                                                 guint property_id,
                                                                 GValue * value,
                                                                 GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
sway_notification_center_widgets_slider_get_instance_private (SwayNotificationCenterWidgetsSlider* self)
{
	return G_STRUCT_MEMBER_P (self, SwayNotificationCenterWidgetsSlider_private_offset);
}

static gint*
_int_dup (gint* self)
{
	gint* dup;
	dup = g_new0 (gint, 1);
	memcpy (dup, self, sizeof (gint));
	return dup;
}

static gpointer
__int_dup0 (gpointer self)
{
	return self ? _int_dup (self) : NULL;
}

static gchar*
double_to_string (gdouble self)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint _tmp1__length1;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
	_tmp0_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
	_tmp1_ = _tmp0_;
	_tmp1__length1 = G_ASCII_DTOSTR_BUF_SIZE;
	_tmp2_ = g_ascii_dtostr (_tmp1_, (gint) G_ASCII_DTOSTR_BUF_SIZE, self);
	_tmp3_ = g_strdup (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp1_ = (g_free (_tmp1_), NULL);
	result = _tmp4_;
	return result;
}

static gboolean
_double_equal (const gdouble * s1,
               const gdouble * s2)
{
	if (s1 == s2) {
		return TRUE;
	}
	if (s1 == NULL) {
		return FALSE;
	}
	if (s2 == NULL) {
		return FALSE;
	}
	return (*s1) == (*s2);
}

static gdouble*
_double_dup (gdouble* self)
{
	gdouble* dup;
	dup = g_new0 (gdouble, 1);
	memcpy (dup, self, sizeof (gdouble));
	return dup;
}

static gpointer
__double_dup0 (gpointer self)
{
	return self ? _double_dup (self) : NULL;
}

static void
__lambda69_ (SwayNotificationCenterWidgetsSlider* self)
{
	gdouble value = 0.0;
	GtkScale* _tmp0_;
	GtkScale* _tmp1_;
	GtkScale* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean _tmp5_ = FALSE;
	const gchar* _tmp6_;
	_tmp0_ = self->priv->slider;
	value = gtk_range_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_range_get_type (), GtkRange));
	if (value > self->priv->max_limit) {
		value = self->priv->max_limit;
	}
	if (value < self->priv->min_limit) {
		value = self->priv->min_limit;
	}
	_tmp1_ = self->priv->slider;
	gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_range_get_type (), GtkRange), value);
	_tmp2_ = self->priv->slider;
	_tmp3_ = double_to_string (value);
	_tmp4_ = _tmp3_;
	gtk_widget_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), _tmp4_);
	_g_free0 (_tmp4_);
	_tmp6_ = self->priv->cmd_setter;
	if (g_strcmp0 (_tmp6_, "") != 0) {
		gdouble* _tmp7_;
		_tmp7_ = self->priv->last_set;
		_tmp5_ = _double_equal (_tmp7_, &value) != TRUE;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		gdouble* _tmp8_;
		_tmp8_ = __double_dup0 (&value);
		_g_free0 (self->priv->last_set);
		self->priv->last_set = _tmp8_;
		sway_notification_center_widgets_slider_queue_set (self, value, NULL, NULL);
	}
}

static void
___lambda69__gtk_range_value_changed (GtkRange* _sender,
                                      gpointer self)
{
	__lambda69_ ((SwayNotificationCenterWidgetsSlider*) self);
}

SwayNotificationCenterWidgetsSlider*
sway_notification_center_widgets_slider_construct (GType object_type,
                                                   const gchar* suffix)
{
	SwayNotificationCenterWidgetsSlider * self = NULL;
	gint* round_digits = NULL;
	gint _tmp0_;
	gint* _tmp1_;
	JsonObject* config = NULL;
	JsonObject* _tmp2_;
	JsonObject* _tmp3_;
	GtkScale* _tmp62_;
	GtkScale* _tmp63_;
	gint* _tmp64_;
	GtkScale* _tmp65_;
	GtkScale* _tmp66_;
	GtkScale* _tmp67_;
	GtkLabel* _tmp68_;
	GtkScale* _tmp69_;
	g_return_val_if_fail (suffix != NULL, NULL);
	self = (SwayNotificationCenterWidgetsSlider*) sway_notification_center_widgets_base_widget_construct (object_type, suffix);
	_tmp0_ = 0;
	_tmp1_ = __int_dup0 (&_tmp0_);
	round_digits = _tmp1_;
	_tmp2_ = sway_notification_center_widgets_base_widget_get_config (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	config = _tmp2_;
	_tmp3_ = config;
	if (_tmp3_ != NULL) {
		gchar* label = NULL;
		JsonObject* _tmp4_;
		gpointer _tmp5_;
		const gchar* _tmp6_ = NULL;
		const gchar* _tmp7_;
		GtkLabel* _tmp8_;
		gchar* _tmp9_ = NULL;
		JsonObject* _tmp10_;
		gpointer _tmp11_;
		gchar* _tmp13_;
		gchar* _tmp14_ = NULL;
		JsonObject* _tmp15_;
		gpointer _tmp16_;
		gchar* _tmp18_;
		gint* min = NULL;
		JsonObject* _tmp19_;
		gpointer _tmp20_;
		gint _tmp21_;
		gint* _tmp22_;
		gint* max = NULL;
		JsonObject* _tmp23_;
		gpointer _tmp24_;
		gint _tmp25_;
		gint* _tmp26_;
		gint* maxl = NULL;
		JsonObject* _tmp27_;
		gpointer _tmp28_;
		gint _tmp29_;
		gint* _tmp30_;
		gint* minl = NULL;
		JsonObject* _tmp31_;
		gpointer _tmp32_;
		gint _tmp33_;
		gint* _tmp34_;
		JsonObject* _tmp35_;
		gpointer _tmp36_;
		gint _tmp37_;
		gint* _tmp38_;
		gint* _tmp39_;
		gint* _tmp42_;
		gint* _tmp45_;
		gdouble _tmp48_ = 0.0;
		gint* _tmp49_;
		gdouble _tmp53_ = 0.0;
		gint* _tmp54_;
		gdouble scale = 0.0;
		gint* _tmp58_;
		GtkScale* _tmp59_;
		gint* _tmp60_;
		gint* _tmp61_;
		_tmp4_ = config;
		_tmp5_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _tmp4_, "label", NULL);
		label = (gchar*) _tmp5_;
		_tmp7_ = label;
		_tmp6_ = _tmp7_;
		if (_tmp6_ == NULL) {
			_tmp6_ = "Slider";
		}
		_tmp8_ = self->priv->label_widget;
		gtk_label_set_label (_tmp8_, _tmp6_);
		_tmp10_ = config;
		_tmp11_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _tmp10_, "cmd_setter", NULL);
		_tmp9_ = (gchar*) _tmp11_;
		if (_tmp9_ == NULL) {
			gchar* _tmp12_;
			_tmp12_ = g_strdup ("");
			_g_free0 (_tmp9_);
			_tmp9_ = _tmp12_;
		}
		_tmp13_ = _tmp9_;
		_tmp9_ = NULL;
		_g_free0 (self->priv->cmd_setter);
		self->priv->cmd_setter = _tmp13_;
		_tmp15_ = config;
		_tmp16_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _tmp15_, "cmd_getter", NULL);
		_tmp14_ = (gchar*) _tmp16_;
		if (_tmp14_ == NULL) {
			gchar* _tmp17_;
			_tmp17_ = g_strdup ("");
			_g_free0 (_tmp14_);
			_tmp14_ = _tmp17_;
		}
		_tmp18_ = _tmp14_;
		_tmp14_ = NULL;
		_g_free0 (self->priv->cmd_getter);
		self->priv->cmd_getter = _tmp18_;
		_tmp19_ = config;
		_tmp20_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_INT, NULL, NULL, _tmp19_, "min", NULL);
		_tmp21_ = (gint) ((gintptr) _tmp20_);
		_tmp22_ = __int_dup0 (&_tmp21_);
		min = _tmp22_;
		_tmp23_ = config;
		_tmp24_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_INT, NULL, NULL, _tmp23_, "max", NULL);
		_tmp25_ = (gint) ((gintptr) _tmp24_);
		_tmp26_ = __int_dup0 (&_tmp25_);
		max = _tmp26_;
		_tmp27_ = config;
		_tmp28_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_INT, NULL, NULL, _tmp27_, "max_limit", NULL);
		_tmp29_ = (gint) ((gintptr) _tmp28_);
		_tmp30_ = __int_dup0 (&_tmp29_);
		maxl = _tmp30_;
		_tmp31_ = config;
		_tmp32_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_INT, NULL, NULL, _tmp31_, "min_limit", NULL);
		_tmp33_ = (gint) ((gintptr) _tmp32_);
		_tmp34_ = __int_dup0 (&_tmp33_);
		minl = _tmp34_;
		_tmp35_ = config;
		_tmp36_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_INT, NULL, NULL, _tmp35_, "value_scale", NULL);
		_tmp37_ = (gint) ((gintptr) _tmp36_);
		_tmp38_ = __int_dup0 (&_tmp37_);
		_g_free0 (round_digits);
		round_digits = _tmp38_;
		_tmp39_ = min;
		if (_tmp39_ == NULL) {
			gint _tmp40_;
			gint* _tmp41_;
			_tmp40_ = 0;
			_tmp41_ = __int_dup0 (&_tmp40_);
			_g_free0 (min);
			min = _tmp41_;
		}
		_tmp42_ = max;
		if (_tmp42_ == NULL) {
			gint _tmp43_;
			gint* _tmp44_;
			_tmp43_ = 100;
			_tmp44_ = __int_dup0 (&_tmp43_);
			_g_free0 (max);
			max = _tmp44_;
		}
		_tmp45_ = round_digits;
		if (_tmp45_ == NULL) {
			gint _tmp46_;
			gint* _tmp47_;
			_tmp46_ = 0;
			_tmp47_ = __int_dup0 (&_tmp46_);
			_g_free0 (round_digits);
			round_digits = _tmp47_;
		}
		_tmp49_ = maxl;
		if (_tmp49_ != NULL) {
			gint* _tmp50_;
			gint* _tmp51_;
			_tmp50_ = max;
			_tmp51_ = maxl;
			_tmp48_ = MIN (*_tmp50_, *_tmp51_);
		} else {
			gint* _tmp52_;
			_tmp52_ = max;
			_tmp48_ = *_tmp52_;
		}
		self->priv->max_limit = _tmp48_;
		_tmp54_ = minl;
		if (_tmp54_ != NULL) {
			gint* _tmp55_;
			gint* _tmp56_;
			_tmp55_ = min;
			_tmp56_ = minl;
			_tmp53_ = MAX (*_tmp55_, *_tmp56_);
		} else {
			gint* _tmp57_;
			_tmp57_ = min;
			_tmp53_ = *_tmp57_;
		}
		self->priv->min_limit = _tmp53_;
		_tmp58_ = round_digits;
		scale = pow ((gdouble) 10, *_tmp58_);
		self->priv->min_limit = self->priv->min_limit / scale;
		self->priv->max_limit = self->priv->max_limit / scale;
		_tmp59_ = self->priv->slider;
		_tmp60_ = min;
		_tmp61_ = max;
		gtk_range_set_range (G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, gtk_range_get_type (), GtkRange), (*_tmp60_) / scale, (*_tmp61_) / scale);
		_g_free0 (minl);
		_g_free0 (maxl);
		_g_free0 (max);
		_g_free0 (min);
		_g_free0 (_tmp14_);
		_g_free0 (_tmp9_);
		_g_free0 (label);
	}
	_tmp62_ = self->priv->slider;
	gtk_scale_set_draw_value (_tmp62_, FALSE);
	_tmp63_ = self->priv->slider;
	_tmp64_ = round_digits;
	gtk_range_set_round_digits (G_TYPE_CHECK_INSTANCE_CAST (_tmp63_, gtk_range_get_type (), GtkRange), *_tmp64_);
	_tmp65_ = self->priv->slider;
	gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, gtk_widget_get_type (), GtkWidget), TRUE);
	_tmp66_ = self->priv->slider;
	gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_FILL);
	_tmp67_ = self->priv->slider;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp67_, gtk_range_get_type (), GtkRange), "value-changed", (GCallback) ___lambda69__gtk_range_value_changed, self, 0);
	_tmp68_ = self->priv->label_widget;
	gtk_box_append (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_box_get_type (), GtkBox), G_TYPE_CHECK_INSTANCE_CAST (_tmp68_, gtk_widget_get_type (), GtkWidget));
	_tmp69_ = self->priv->slider;
	gtk_box_append (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_box_get_type (), GtkBox), G_TYPE_CHECK_INSTANCE_CAST (_tmp69_, gtk_widget_get_type (), GtkWidget));
	_json_object_unref0 (config);
	_g_free0 (round_digits);
	return self;
}

SwayNotificationCenterWidgetsSlider*
sway_notification_center_widgets_slider_new (const gchar* suffix)
{
	return sway_notification_center_widgets_slider_construct (SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER, suffix);
}

gchar*
sway_notification_center_widgets_slider_expand_cmd (SwayNotificationCenterWidgetsSlider* self,
                                                    const gchar* cmd,
                                                    const gchar* regex,
                                                    const gchar* value)
{
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_SLIDER (self), NULL);
	g_return_val_if_fail (cmd != NULL, NULL);
	g_return_val_if_fail (regex != NULL, NULL);
	g_return_val_if_fail (value != NULL, NULL);
	{
		GRegex* _regx = NULL;
		gchar* _tmp0_;
		gchar* _tmp1_;
		GRegex* _tmp2_;
		GRegex* _tmp3_;
		gchar* _tmp4_ = NULL;
		GRegex* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp0_ = g_regex_escape_string (regex, -1);
		_tmp1_ = _tmp0_;
		_tmp2_ = g_regex_new (_tmp1_, 0, 0, &_inner_error0_);
		_tmp3_ = _tmp2_;
		_g_free0 (_tmp1_);
		_regx = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp5_ = _regx;
		_tmp6_ = g_regex_replace_literal (_tmp5_, cmd, (gssize) -1, 0, value, 0, &_inner_error0_);
		_tmp4_ = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (_regx);
			goto __catch0_g_error;
		}
		_tmp7_ = _tmp4_;
		_tmp4_ = NULL;
		result = _tmp7_;
		_g_free0 (_tmp4_);
		_g_regex_unref0 (_regx);
		return result;
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp8_;
		const gchar* _tmp9_;
		gchar* _tmp10_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp8_ = e;
		_tmp9_ = _tmp8_->message;
		g_warning ("slider.vala:92: failed to expand cmd: %s\n", _tmp9_);
		_tmp10_ = g_strdup (cmd);
		result = _tmp10_;
		_g_error_free0 (e);
		return result;
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static void
sway_notification_center_widgets_slider_queue_set_data_free (gpointer _data)
{
	SwayNotificationCenterWidgetsSliderQueueSetData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (SwayNotificationCenterWidgetsSliderQueueSetData, _data_);
}

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

void
sway_notification_center_widgets_slider_queue_set (SwayNotificationCenterWidgetsSlider* self,
                                                   gdouble value,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	SwayNotificationCenterWidgetsSliderQueueSetData* _data_;
	SwayNotificationCenterWidgetsSlider* _tmp0_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_SLIDER (self));
	_data_ = g_slice_new0 (SwayNotificationCenterWidgetsSliderQueueSetData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, sway_notification_center_widgets_slider_queue_set_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->value = value;
	sway_notification_center_widgets_slider_queue_set_co (_data_);
}

void
sway_notification_center_widgets_slider_queue_set_finish (SwayNotificationCenterWidgetsSlider* self,
                                                          GAsyncResult* _res_)
{
	SwayNotificationCenterWidgetsSliderQueueSetData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
sway_notification_center_widgets_slider_queue_set_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_)
{
	SwayNotificationCenterWidgetsSliderQueueSetData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	sway_notification_center_widgets_slider_queue_set_co (_data_);
}

static gboolean
sway_notification_center_widgets_slider_queue_set_co (SwayNotificationCenterWidgetsSliderQueueSetData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->self->priv->cmd_ing) {
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->self->priv->cmd_ing = TRUE;
	_data_->_tmp0_ = _data_->self->priv->cmd_setter;
	_data_->_tmp1_ = double_to_string (_data_->value);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = sway_notification_center_widgets_slider_expand_cmd (_data_->self, _data_->_tmp0_, "$value", _data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	_g_free0 (_data_->_tmp2_);
	_data_->cmd = _data_->_tmp4_;
	_data_->_tmp5_ = _data_->cmd;
	_data_->_tmp6_ = g_new0 (gchar*, 0 + 1);
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp7__length1 = 0;
	_data_->_state_ = 1;
	sway_notification_center_functions_execute_command (_data_->_tmp5_, _data_->_tmp7_, (gint) 0, sway_notification_center_widgets_slider_queue_set_ready, _data_);
	return FALSE;
	_state_1:
	sway_notification_center_functions_execute_command_finish (_data_->_res_, NULL);
	_data_->_tmp7_ = (_vala_array_free (_data_->_tmp7_, _data_->_tmp7__length1, (GDestroyNotify) g_free), NULL);
	_data_->self->priv->cmd_ing = FALSE;
	_data_->_tmp8_ = _data_->self->priv->last_set;
	if (_double_equal (&_data_->value, _data_->_tmp8_) != TRUE) {
		_data_->_tmp9_ = _data_->self->priv->last_set;
		_data_->_state_ = 2;
		sway_notification_center_widgets_slider_queue_set (_data_->self, *_data_->_tmp9_, sway_notification_center_widgets_slider_queue_set_ready, _data_);
		return FALSE;
		_state_2:
		sway_notification_center_widgets_slider_queue_set_finish (_data_->self, _data_->_res_);
	}
	_g_free0 (_data_->cmd);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
sway_notification_center_widgets_slider_queue_get_data_free (gpointer _data)
{
	SwayNotificationCenterWidgetsSliderQueueGetData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (SwayNotificationCenterWidgetsSliderQueueGetData, _data_);
}

void
sway_notification_center_widgets_slider_queue_get (SwayNotificationCenterWidgetsSlider* self,
                                                   gint retry,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	SwayNotificationCenterWidgetsSliderQueueGetData* _data_;
	SwayNotificationCenterWidgetsSlider* _tmp0_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_SLIDER (self));
	_data_ = g_slice_new0 (SwayNotificationCenterWidgetsSliderQueueGetData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, sway_notification_center_widgets_slider_queue_get_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->retry = retry;
	sway_notification_center_widgets_slider_queue_get_co (_data_);
}

void
sway_notification_center_widgets_slider_queue_get_finish (SwayNotificationCenterWidgetsSlider* self,
                                                          GAsyncResult* _res_,
                                                          gchar** value)
{
	SwayNotificationCenterWidgetsSliderQueueGetData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (value) {
		*value = _data_->value;
	} else {
		_g_free0 (_data_->value);
	}
	_data_->value = NULL;
}

static void
sway_notification_center_widgets_slider_queue_get_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_)
{
	SwayNotificationCenterWidgetsSliderQueueGetData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	sway_notification_center_widgets_slider_queue_get_co (_data_);
}

static gboolean
sway_notification_center_widgets_slider_queue_get_co (SwayNotificationCenterWidgetsSliderQueueGetData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->self->priv->cmd_ing) {
		if (_data_->retry <= 0) {
			_data_->_tmp0_ = g_strdup ("");
			_g_free0 (_data_->value);
			_data_->value = _data_->_tmp0_;
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp1_ = NULL;
		_data_->_state_ = 1;
		sway_notification_center_widgets_slider_queue_get (_data_->self, _data_->retry - 1, sway_notification_center_widgets_slider_queue_get_ready, _data_);
		return FALSE;
		_state_1:
		sway_notification_center_widgets_slider_queue_get_finish (_data_->self, _data_->_res_, &_data_->_tmp1_);
		_g_free0 (_data_->value);
		_data_->value = _data_->_tmp1_;
	}
	_data_->self->priv->cmd_ing = TRUE;
	_data_->_tmp2_ = _data_->self->priv->cmd_getter;
	_data_->_tmp3_ = g_new0 (gchar*, 0 + 1);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp4__length1 = 0;
	_data_->_tmp5_ = NULL;
	_data_->_state_ = 2;
	sway_notification_center_functions_execute_command (_data_->_tmp2_, _data_->_tmp4_, (gint) 0, sway_notification_center_widgets_slider_queue_get_ready, _data_);
	return FALSE;
	_state_2:
	sway_notification_center_functions_execute_command_finish (_data_->_res_, &_data_->_tmp5_);
	_g_free0 (_data_->value);
	_data_->value = _data_->_tmp5_;
	_data_->_tmp4_ = (_vala_array_free (_data_->_tmp4_, _data_->_tmp4__length1, (GDestroyNotify) g_free), NULL);
	_data_->self->priv->cmd_ing = FALSE;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
sway_notification_center_widgets_slider_on_update_data_free (gpointer _data)
{
	SwayNotificationCenterWidgetsSliderOnUpdateData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (SwayNotificationCenterWidgetsSliderOnUpdateData, _data_);
}

void
sway_notification_center_widgets_slider_on_update (SwayNotificationCenterWidgetsSlider* self,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	SwayNotificationCenterWidgetsSliderOnUpdateData* _data_;
	SwayNotificationCenterWidgetsSlider* _tmp0_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_SLIDER (self));
	_data_ = g_slice_new0 (SwayNotificationCenterWidgetsSliderOnUpdateData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, sway_notification_center_widgets_slider_on_update_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	sway_notification_center_widgets_slider_on_update_co (_data_);
}

void
sway_notification_center_widgets_slider_on_update_finish (SwayNotificationCenterWidgetsSlider* self,
                                                          GAsyncResult* _res_)
{
	SwayNotificationCenterWidgetsSliderOnUpdateData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
sway_notification_center_widgets_slider_on_update_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_)
{
	SwayNotificationCenterWidgetsSliderOnUpdateData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	sway_notification_center_widgets_slider_on_update_co (_data_);
}

static gdouble
double_parse (const gchar* str)
{
	gdouble result;
	g_return_val_if_fail (str != NULL, 0.0);
	result = g_ascii_strtod (str, NULL);
	return result;
}

static gboolean
sway_notification_center_widgets_slider_on_update_co (SwayNotificationCenterWidgetsSliderOnUpdateData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->cmd_getter;
	if (g_strcmp0 (_data_->_tmp0_, "") == 0) {
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp1_ = g_strdup ("");
	_data_->value_str = _data_->_tmp1_;
	_data_->_tmp2_ = NULL;
	_data_->_state_ = 1;
	sway_notification_center_widgets_slider_queue_get (_data_->self, 4, sway_notification_center_widgets_slider_on_update_ready, _data_);
	return FALSE;
	_state_1:
	sway_notification_center_widgets_slider_queue_get_finish (_data_->self, _data_->_res_, &_data_->_tmp2_);
	_g_free0 (_data_->value_str);
	_data_->value_str = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->value_str;
	_data_->value = double_parse (_data_->_tmp3_);
	if (_data_->value <= _data_->self->priv->max_limit) {
		_data_->_tmp4_ = _data_->value >= _data_->self->priv->min_limit;
	} else {
		_data_->_tmp4_ = FALSE;
	}
	if (_data_->_tmp4_) {
		_data_->_tmp5_ = __double_dup0 (&_data_->value);
		_g_free0 (_data_->self->priv->last_set);
		_data_->self->priv->last_set = _data_->_tmp5_;
		_data_->_tmp6_ = _data_->self->priv->slider;
		gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp6_, gtk_range_get_type (), GtkRange), _data_->value);
	}
	_g_free0 (_data_->value_str);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
sway_notification_center_widgets_slider_real_on_cc_visibility_change (SwayNotificationCenterWidgetsBaseWidget* base,
                                                                      gboolean value)
{
	SwayNotificationCenterWidgetsSlider * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER, SwayNotificationCenterWidgetsSlider);
	if (value) {
		sway_notification_center_widgets_slider_on_update (self, NULL, NULL);
	}
}

static const gchar*
sway_notification_center_widgets_slider_real_get_widget_name (SwayNotificationCenterWidgetsBaseWidget* base)
{
	const gchar* result;
	SwayNotificationCenterWidgetsSlider* self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER, SwayNotificationCenterWidgetsSlider);
	result = "slider";
	return result;
}

static void
sway_notification_center_widgets_slider_class_init (SwayNotificationCenterWidgetsSliderClass * klass,
                                                    gpointer klass_data)
{
	sway_notification_center_widgets_slider_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SwayNotificationCenterWidgetsSlider_private_offset);
	((SwayNotificationCenterWidgetsBaseWidgetClass *) klass)->on_cc_visibility_change = (void (*) (SwayNotificationCenterWidgetsBaseWidget*, gboolean)) sway_notification_center_widgets_slider_real_on_cc_visibility_change;
	SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_CLASS (klass)->get_widget_name = (const gchar* (*) (SwayNotificationCenterWidgetsBaseWidget*)) sway_notification_center_widgets_slider_real_get_widget_name;
	G_OBJECT_CLASS (klass)->get_property = _vala_sway_notification_center_widgets_slider_get_property;
	G_OBJECT_CLASS (klass)->finalize = sway_notification_center_widgets_slider_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_SLIDER_WIDGET_NAME_PROPERTY, sway_notification_center_widgets_slider_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_SLIDER_WIDGET_NAME_PROPERTY] = g_param_spec_string ("widget-name", "widget-name", "widget-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
sway_notification_center_widgets_slider_instance_init (SwayNotificationCenterWidgetsSlider * self,
                                                       gpointer klass)
{
	GtkLabel* _tmp0_;
	GtkScale* _tmp1_;
	self->priv = sway_notification_center_widgets_slider_get_instance_private (self);
	_tmp0_ = (GtkLabel*) gtk_label_new (NULL);
	if (_tmp0_) {
		g_object_set_data ((GObject *) _tmp0_, "vala-creation-function", "");
	}
	g_object_ref_sink (_tmp0_);
	self->priv->label_widget = _tmp0_;
	_tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 0, (gdouble) 100, (gdouble) 1);
	if (_tmp1_) {
		g_object_set_data ((GObject *) _tmp1_, "vala-creation-function", "");
	}
	g_object_ref_sink (_tmp1_);
	self->priv->slider = _tmp1_;
	self->priv->cmd_ing = FALSE;
}

static void
sway_notification_center_widgets_slider_finalize (GObject * obj)
{
	SwayNotificationCenterWidgetsSlider * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER, SwayNotificationCenterWidgetsSlider);
	_g_object_unref0 (self->priv->label_widget);
	_g_object_unref0 (self->priv->slider);
	_g_free0 (self->priv->last_set);
	_g_free0 (self->priv->cmd_setter);
	_g_free0 (self->priv->cmd_getter);
	G_OBJECT_CLASS (sway_notification_center_widgets_slider_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
sway_notification_center_widgets_slider_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SwayNotificationCenterWidgetsSliderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sway_notification_center_widgets_slider_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SwayNotificationCenterWidgetsSlider), 0, (GInstanceInitFunc) sway_notification_center_widgets_slider_instance_init, NULL };
	GType sway_notification_center_widgets_slider_type_id;
	sway_notification_center_widgets_slider_type_id = g_type_register_static (SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, "SwayNotificationCenterWidgetsSlider", &g_define_type_info, 0);
	SwayNotificationCenterWidgetsSlider_private_offset = g_type_add_instance_private (sway_notification_center_widgets_slider_type_id, sizeof (SwayNotificationCenterWidgetsSliderPrivate));
	return sway_notification_center_widgets_slider_type_id;
}

GType
sway_notification_center_widgets_slider_get_type (void)
{
	static gsize sway_notification_center_widgets_slider_type_id__once = 0;
	if (g_once_init_enter (&sway_notification_center_widgets_slider_type_id__once)) {
		GType sway_notification_center_widgets_slider_type_id;
		sway_notification_center_widgets_slider_type_id = sway_notification_center_widgets_slider_get_type_once ();
		g_once_init_leave (&sway_notification_center_widgets_slider_type_id__once, sway_notification_center_widgets_slider_type_id);
	}
	return sway_notification_center_widgets_slider_type_id__once;
}

static void
_vala_sway_notification_center_widgets_slider_get_property (GObject * object,
                                                            guint property_id,
                                                            GValue * value,
                                                            GParamSpec * pspec)
{
	SwayNotificationCenterWidgetsSlider * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER, SwayNotificationCenterWidgetsSlider);
	switch (property_id) {
		case SWAY_NOTIFICATION_CENTER_WIDGETS_SLIDER_WIDGET_NAME_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_base_widget_get_widget_name (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget)));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

