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

/*
 * BrightnessController
 * This file is part of UbuntuBudgie
 *
 * Author: Serdar ŞEN github.com/serdarsen
 *
 * Copyright © 2018 Ubuntu Budgie Developers
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 */

#include "brightnesscontroller.h"
#include <glib.h>
#include <float.h>
#include <math.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

struct _BrightnessControllerModelsDimPrivate {
	gdouble _Blue;
};

static gint BrightnessControllerModelsDim_private_offset;
static gpointer brightness_controller_models_dim_parent_class = NULL;
static GType brightness_controller_models_dim_type_id = 0;

static void brightness_controller_models_dim_finalize (BrightnessControllerModelsFlame * obj);

static inline gpointer
brightness_controller_models_dim_get_instance_private (BrightnessControllerModelsDim* self)
{
	return G_STRUCT_MEMBER_P (self, BrightnessControllerModelsDim_private_offset);
}

BrightnessControllerModelsDim*
brightness_controller_models_dim_construct (GType object_type)
{
	BrightnessControllerModelsDim* self = NULL;
	self = (BrightnessControllerModelsDim*) brightness_controller_models_flame_construct (object_type);
	return self;
}

BrightnessControllerModelsDim*
brightness_controller_models_dim_new (void)
{
	return brightness_controller_models_dim_construct (BRIGHTNESS_CONTROLLER_MODELS_TYPE_DIM);
}

gdouble
brightness_controller_models_dim_get_Blue (BrightnessControllerModelsDim* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_Blue;
	return result;
}

void
brightness_controller_models_dim_set_Blue (BrightnessControllerModelsDim* self,
                                           gdouble value)
{
	g_return_if_fail (self != NULL);
	self->priv->_Blue = value;
}

gchar*
brightness_controller_models_dim_get_MaxBrightnessText (BrightnessControllerModelsDim* self)
{
	gchar* result;
	gdouble _tmp0_;
	gdouble _tmp1_;
	gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = brightness_controller_models_flame_get_MaxBrightness ((BrightnessControllerModelsFlame*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = brightness_controller_models_flame_DoubleToString ((BrightnessControllerModelsFlame*) self, _tmp1_, "%.1f");
	result = _tmp2_;
	return result;
}

gchar*
brightness_controller_models_dim_get_BrightnessText (BrightnessControllerModelsDim* self)
{
	gchar* result;
	gdouble _tmp0_;
	gdouble _tmp1_;
	gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = brightness_controller_models_flame_get_Brightness ((BrightnessControllerModelsFlame*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = brightness_controller_models_flame_DoubleToString ((BrightnessControllerModelsFlame*) self, _tmp1_, "%.1f");
	result = _tmp2_;
	return result;
}

gchar*
brightness_controller_models_dim_get_BlueText (BrightnessControllerModelsDim* self)
{
	gchar* result;
	gdouble _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_Blue;
	_tmp1_ = brightness_controller_models_flame_DoubleToString ((BrightnessControllerModelsFlame*) self, _tmp0_, "%.1f");
	result = _tmp1_;
	return result;
}

static void
brightness_controller_models_dim_class_init (BrightnessControllerModelsDimClass * klass,
                                             gpointer klass_data)
{
	brightness_controller_models_dim_parent_class = g_type_class_peek_parent (klass);
	((BrightnessControllerModelsFlameClass *) klass)->finalize = brightness_controller_models_dim_finalize;
	g_type_class_adjust_private_offset (klass, &BrightnessControllerModelsDim_private_offset);
}

static void
brightness_controller_models_dim_instance_init (BrightnessControllerModelsDim * self,
                                                gpointer klass)
{
	self->priv = brightness_controller_models_dim_get_instance_private (self);
}

static void
brightness_controller_models_dim_finalize (BrightnessControllerModelsFlame * obj)
{
	BrightnessControllerModelsDim * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BRIGHTNESS_CONTROLLER_MODELS_TYPE_DIM, BrightnessControllerModelsDim);
	BRIGHTNESS_CONTROLLER_MODELS_FLAME_CLASS (brightness_controller_models_dim_parent_class)->finalize (obj);
}

GType
brightness_controller_models_dim_get_type (void)
{
	return brightness_controller_models_dim_type_id;
}

GType
brightness_controller_models_dim_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (BrightnessControllerModelsDimClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) brightness_controller_models_dim_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BrightnessControllerModelsDim), 0, (GInstanceInitFunc) brightness_controller_models_dim_instance_init, NULL };
	brightness_controller_models_dim_type_id = g_type_module_register_type (module, BRIGHTNESS_CONTROLLER_MODELS_TYPE_FLAME, "BrightnessControllerModelsDim", &g_define_type_info, 0);
	BrightnessControllerModelsDim_private_offset = sizeof (BrightnessControllerModelsDimPrivate);
	return brightness_controller_models_dim_type_id;
}

