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

/*
 * BrightnessController
 * This file is part of budgie-extras
 *
 * 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 <gtk/gtk.h>
#include <glib-object.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

enum  {
	BRIGHTNESS_CONTROLLER_WIDGETS_INDICATOR_BUTTON_0_PROPERTY,
	BRIGHTNESS_CONTROLLER_WIDGETS_INDICATOR_BUTTON_NUM_PROPERTIES
};
static GParamSpec* brightness_controller_widgets_indicator_button_properties[BRIGHTNESS_CONTROLLER_WIDGETS_INDICATOR_BUTTON_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _BrightnessControllerWidgetsIndicatorButtonPrivate {
	GtkImage* indicatorIcon;
};

static gint BrightnessControllerWidgetsIndicatorButton_private_offset;
static gpointer brightness_controller_widgets_indicator_button_parent_class = NULL;
static GType brightness_controller_widgets_indicator_button_type_id = 0;

static void brightness_controller_widgets_indicator_button_finalize (GObject * obj);

static inline gpointer
brightness_controller_widgets_indicator_button_get_instance_private (BrightnessControllerWidgetsIndicatorButton* self)
{
	return G_STRUCT_MEMBER_P (self, BrightnessControllerWidgetsIndicatorButton_private_offset);
}

BrightnessControllerWidgetsIndicatorButton*
brightness_controller_widgets_indicator_button_construct (GType object_type)
{
	BrightnessControllerWidgetsIndicatorButton * self = NULL;
	GtkImage* _tmp0_;
	GtkImage* _tmp1_;
	self = (BrightnessControllerWidgetsIndicatorButton*) g_object_new (object_type, NULL);
	_tmp0_ = (GtkImage*) gtk_image_new_from_icon_name ("budgie-brightness-controller-1-symbolic", (GtkIconSize) GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->indicatorIcon);
	self->priv->indicatorIcon = _tmp0_;
	_tmp1_ = self->priv->indicatorIcon;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp1_);
	gtk_widget_show_all ((GtkWidget*) self);
	return self;
}

BrightnessControllerWidgetsIndicatorButton*
brightness_controller_widgets_indicator_button_new (void)
{
	return brightness_controller_widgets_indicator_button_construct (BRIGHTNESS_CONTROLLER_WIDGETS_TYPE_INDICATOR_BUTTON);
}

static void
brightness_controller_widgets_indicator_button_class_init (BrightnessControllerWidgetsIndicatorButtonClass * klass,
                                                           gpointer klass_data)
{
	brightness_controller_widgets_indicator_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BrightnessControllerWidgetsIndicatorButton_private_offset);
	G_OBJECT_CLASS (klass)->finalize = brightness_controller_widgets_indicator_button_finalize;
}

static void
brightness_controller_widgets_indicator_button_instance_init (BrightnessControllerWidgetsIndicatorButton * self,
                                                              gpointer klass)
{
	self->priv = brightness_controller_widgets_indicator_button_get_instance_private (self);
}

static void
brightness_controller_widgets_indicator_button_finalize (GObject * obj)
{
	BrightnessControllerWidgetsIndicatorButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BRIGHTNESS_CONTROLLER_WIDGETS_TYPE_INDICATOR_BUTTON, BrightnessControllerWidgetsIndicatorButton);
	_g_object_unref0 (self->priv->indicatorIcon);
	G_OBJECT_CLASS (brightness_controller_widgets_indicator_button_parent_class)->finalize (obj);
}

GType
brightness_controller_widgets_indicator_button_get_type (void)
{
	return brightness_controller_widgets_indicator_button_type_id;
}

GType
brightness_controller_widgets_indicator_button_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (BrightnessControllerWidgetsIndicatorButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) brightness_controller_widgets_indicator_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BrightnessControllerWidgetsIndicatorButton), 0, (GInstanceInitFunc) brightness_controller_widgets_indicator_button_instance_init, NULL };
	brightness_controller_widgets_indicator_button_type_id = g_type_module_register_type (module, gtk_event_box_get_type (), "BrightnessControllerWidgetsIndicatorButton", &g_define_type_info, 0);
	BrightnessControllerWidgetsIndicatorButton_private_offset = sizeof (BrightnessControllerWidgetsIndicatorButtonPrivate);
	return brightness_controller_widgets_indicator_button_type_id;
}

