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

/*
 * This file is part of budgie-desktop
 *
 * Copyright Budgie Desktop 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 2 of the License, or
 * (at your option) any later version.
 */

#include "separatorapplet.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "plugin.h"
#include <glib-object.h>
#include <gtk/gtk.h>
#include <libpeas.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  {
	SEPARATOR_PLUGIN_0_PROPERTY,
	SEPARATOR_PLUGIN_NUM_PROPERTIES
};
static GParamSpec* separator_plugin_properties[SEPARATOR_PLUGIN_NUM_PROPERTIES];
enum  {
	SEPARATOR_APPLET_0_PROPERTY,
	SEPARATOR_APPLET_NUM_PROPERTIES
};
static GParamSpec* separator_applet_properties[SEPARATOR_APPLET_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _SeparatorAppletPrivate {
	GtkSeparator* sep;
};

static gpointer separator_plugin_parent_class = NULL;
static BudgiePluginIface * separator_plugin_budgie_plugin_parent_iface = NULL;
static GType separator_plugin_type_id = 0;
static gint SeparatorApplet_private_offset;
static gpointer separator_applet_parent_class = NULL;
static GType separator_applet_type_id = 0;

static BudgieApplet* separator_plugin_real_get_panel_widget (BudgiePlugin* base,
                                                      const gchar* uuid);
static void separator_applet_finalize (GObject * obj);

static BudgieApplet*
separator_plugin_real_get_panel_widget (BudgiePlugin* base,
                                        const gchar* uuid)
{
	SeparatorPlugin * self;
	SeparatorApplet* _tmp0_;
	BudgieApplet* result;
	self = (SeparatorPlugin*) base;
	g_return_val_if_fail (uuid != NULL, NULL);
	_tmp0_ = separator_applet_new ();
	g_object_ref_sink (_tmp0_);
	result = (BudgieApplet*) _tmp0_;
	return result;
}

SeparatorPlugin*
separator_plugin_construct (GType object_type)
{
	SeparatorPlugin * self = NULL;
	self = (SeparatorPlugin*) g_object_new (object_type, NULL);
	return self;
}

SeparatorPlugin*
separator_plugin_new (void)
{
	return separator_plugin_construct (TYPE_SEPARATOR_PLUGIN);
}

static void
separator_plugin_class_init (SeparatorPluginClass * klass,
                             gpointer klass_data)
{
	separator_plugin_parent_class = g_type_class_peek_parent (klass);
}

static void
separator_plugin_budgie_plugin_interface_init (BudgiePluginIface * iface,
                                               gpointer iface_data)
{
	separator_plugin_budgie_plugin_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_panel_widget = (BudgieApplet* (*) (BudgiePlugin*, const gchar*)) separator_plugin_real_get_panel_widget;
}

static void
separator_plugin_instance_init (SeparatorPlugin * self,
                                gpointer klass)
{
}

GType
separator_plugin_get_type (void)
{
	return separator_plugin_type_id;
}

GType
separator_plugin_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (SeparatorPluginClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) separator_plugin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeparatorPlugin), 0, (GInstanceInitFunc) separator_plugin_instance_init, NULL };
	static const GInterfaceInfo budgie_plugin_info = { (GInterfaceInitFunc) separator_plugin_budgie_plugin_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	separator_plugin_type_id = g_type_module_register_type (module, peas_extension_base_get_type (), "SeparatorPlugin", &g_define_type_info, 0);
	g_type_module_add_interface (module, separator_plugin_type_id, budgie_plugin_get_type (), &budgie_plugin_info);
	return separator_plugin_type_id;
}

static inline gpointer
separator_applet_get_instance_private (SeparatorApplet* self)
{
	return G_STRUCT_MEMBER_P (self, SeparatorApplet_private_offset);
}

SeparatorApplet*
separator_applet_construct (GType object_type)
{
	SeparatorApplet * self = NULL;
	GtkSeparator* _tmp0_;
	GtkSeparator* _tmp1_;
	GtkSeparator* _tmp2_;
	GtkSeparator* _tmp3_;
	GtkSeparator* _tmp4_;
	self = (SeparatorApplet*) g_object_new (object_type, NULL);
	_tmp0_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_VERTICAL);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->sep);
	self->priv->sep = _tmp0_;
	_tmp1_ = self->priv->sep;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp1_);
	_tmp2_ = self->priv->sep;
	g_object_set ((GtkWidget*) _tmp2_, "margin", 2, NULL);
	_tmp3_ = self->priv->sep;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp3_, 6);
	_tmp4_ = self->priv->sep;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp4_, 6);
	gtk_widget_show_all ((GtkWidget*) self);
	return self;
}

SeparatorApplet*
separator_applet_new (void)
{
	return separator_applet_construct (TYPE_SEPARATOR_APPLET);
}

static void
separator_applet_class_init (SeparatorAppletClass * klass,
                             gpointer klass_data)
{
	separator_applet_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SeparatorApplet_private_offset);
	G_OBJECT_CLASS (klass)->finalize = separator_applet_finalize;
}

static void
separator_applet_instance_init (SeparatorApplet * self,
                                gpointer klass)
{
	self->priv = separator_applet_get_instance_private (self);
}

static void
separator_applet_finalize (GObject * obj)
{
	SeparatorApplet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SEPARATOR_APPLET, SeparatorApplet);
	_g_object_unref0 (self->priv->sep);
	G_OBJECT_CLASS (separator_applet_parent_class)->finalize (obj);
}

GType
separator_applet_get_type (void)
{
	return separator_applet_type_id;
}

GType
separator_applet_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (SeparatorAppletClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) separator_applet_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeparatorApplet), 0, (GInstanceInitFunc) separator_applet_instance_init, NULL };
	separator_applet_type_id = g_type_module_register_type (module, budgie_applet_get_type (), "SeparatorApplet", &g_define_type_info, 0);
	SeparatorApplet_private_offset = sizeof (SeparatorAppletPrivate);
	return separator_applet_type_id;
}

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

void
peas_register_types (GTypeModule* module)
{
	PeasObjectModule* objmodule = NULL;
	PeasObjectModule* _tmp0_;
	g_return_if_fail (module != NULL);
	separator_plugin_register_type (module);
	separator_applet_register_type (module);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (module, peas_object_module_get_type ()) ? ((PeasObjectModule*) module) : NULL);
	objmodule = _tmp0_;
	peas_object_module_register_extension_type (objmodule, budgie_plugin_get_type (), TYPE_SEPARATOR_PLUGIN);
	_g_object_unref0 (objmodule);
}

